Claude Templates / A-tier · High leverage

Growth & SEO

The Pre-Sale Chatbot Playbook

A grounded pre-sale assistant that builds its own knowledge base on install.

PRE-SALE-CHATBOT-PLAYBOOK.md · 13 sections · 2,787 words · 20 KB · markdown

A floating chat widget that answers pre-sale questions from your actual site and codebase — not hallucinated feature claims. The install step crawls your marketing site and reads your code to build the corpus, so it ships ready to answer. No lead capture, no gate.

What's inside

When to use it

Once a marketing site exists and signup is self-serve.

Build these first

Topical Authority

Straight from the file

Owned (copied + adapted per app): 1. src/lib/help/public-corpus.ts — the knowledge base (auto-generated, §3). This is the part that "understands the app." 2. src/app/api/public-chat/route.ts — streaming, corpus-grounded, provider-fallback endpoint. 3. src/components/landing/LandingChat.tsx — the floating widget (thread persistence, SSE render, link-rewriting). 4. src/components/landing/LandingChatLazy.tsx + LandingChatGate — dynamic-import wrapper + route gate that self-hides the widget on app routes.

Table of contents

  1. 0. When to use this — and the tier rationale
  2. 1. What you get (the install surface)
  3. 2. Architecture
  4. 3. The knowledge-base autobuild ← the heart of "one action"
  5. 4. Provider + key config (OpenAI-primary, admin-console keys)
  6. 5. System prompt contract
  7. 6. The widget
  8. 7. Anonymous rate limiting (required)
  9. 8. The one-action install sequence
  10. 9. Verification / smoke test
  11. 10. Keeping the corpus fresh (it does NOT self-update)
  12. 11. Common pitfalls
  13. 12. Kickoff prompt

How to run it

Drop PRE-SALE-CHATBOT-PLAYBOOK.md into your repo, then tell Claude Code: “Read PRE-SALE-CHATBOT-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.

↓ Download the playbook

More growth & seo playbooks

← All 28 Claude templates