community-chatbot-builder
Skill0 starsChanged 8 months agoMITView on GitHub
Build RAG-powered AI chatbots for online communities (Skool, Circle, Discord, Mighty Networks). Handles the full pipeline: content scraping, voice analysis, ChromaDB ingestion, system prompt configuration, model routing, sync automation, and deployment. Use this skill whenever someone wants to build a chatbot for a community, membership site, course platform, or knowledge base. Also trigger when the user mentions Skool bots, community AI assistants, course chatbots, membership chatbots, RAG chatbots for communities, or wants to turn community content into an AI assistant — even if they don't say "chatbot" explicitly.
In this repository2 other files it gives its agents.
- agent-osSkill
- business-readiness-assessorSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 122
Document topic-specific language (e.g., a trading educator explaining candlesticks vs a mindset coach talking about discipline)
- Very specific: line 157
Use chromadb.PersistentClient for persistence across restarts
- Distinctive: line 179
Never hallucinate sources — only reference content that appears in retrieved context chunks.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Community Chatbot Builder
Build production-ready AI chatbots that know a community's content and speak in its voice. This skill encodes a proven 7-phase framework battle-tested on real communities.
Why This Approach Works
Generic AI assistants fail communities because they don't know the community's actual content, terminology, or teaching style. A community-specific RAG chatbot retrieves real lessons, references real videos by name, and speaks the way the educators speak. Members get answers that feel like they came from the community itself — with citations linking back to the source material.
The economics are compelling: ~$5-15/month in API costs per client, deliverable in under 48 hours, with 90%+ margins at $500-1000 setup + $100-200/month.
The 7-Phase Build Process
Work through these phases sequentially. Each phase builds on the previous one. Skip phases only if the user explicitly says they don't need that component.
Phase 1: Content Audit (2-4 hours)
Map every content source the community has. The more content you ingest, the smarter the chatbot.
Content source checklist — go through each with the user:
| Source Type | Where to Find | Extraction Method | Priority |
| Courses/Classroom | Skool classroom, Teachable, Kajabi | Browser automation + JS extraction | P0 |
| Community Posts | Skool community, Circle, Discord | API or browser scraping | P0 |
| Video Transcripts | Platform-hosted or YouTube | VTT extraction or Whisper API | P1 |
| Website Pages | Main site, landing pages | Web scraping to markdown | P1 |
| Google Drive | Shared drives, folders | Drive API via service account | P2 |
| Email Newsletters | Mailchimp, ConvertKit archives | API extraction | P3 |
Key questions to answer during audit:
- What platforms host the content? (Skool, Circle, Teachable, etc.)
- How much content exists? (rough page/post/video count)
- Who are the key educators/voices? (their names, teaching styles)
- What's the community's unique terminology? (jargon, acronyms, catchphrases)
- Is the audience members-only, prospects, or mixed?
Phase 2: Content Scraping (4-8 hours)
Extract all content into structured JSON files. Platform-specific patterns matter here.
Skool-specific extraction patterns (reusable across any Skool community):
# Community posts live in window globals:
window._compactPosts → pipe-delimited: id|title|likes|comments|author|date|category|pinned
window._sortedPosts → array of post objects with full content
# Classroom/course data:
window.__NEXT_DATA__ → course structure (modules, sections, lessons)
React fiber nodes → module titles, sections, IDs
# Pagination for large communities:
Infinite scroll loads ~30 posts per batch
Use: scrollTo(0, document.body.scrollHeight) + wait(2000) pattern
Repeat until no new posts loadStandard output structure — use this for every client:
data/
scraped/ # Website markdown pages
transcripts/ # Video transcripts + module_lookup.json
community/ # posts.json, top_posts.json, community_stats.json
drive/ # drive_structure.json (if applicable)
voice/ # Voice style guide
chromadb/ # Vector database
logs/ # Sync logs
sync_state.json # Sync trackingScraping best practices:
- Batch extract using browser console JS — don't scrape page by page
- Filter community posts by engagement (5+ likes threshold keeps the KB high-signal)
- Cross-reference transcript IDs with module titles/sections/URLs for rich metadata
- For Google Cloud forms, use
form_inputwith element refs (nottypeaction)
Phase 3: Voice Analysis (1-2 hours)
This is what separates a good community chatbot from a generic one. The bot must sound like the community, not like corporate AI.
Create a voice style guide using this template:
# [Community Name] Voice Style Guide
## Key Educators
- [Name]: [Teaching style, catchphrases, tone]
Example: "So the first thing we're gonna look for is..."
## Topic-Specific Voices
- [Technical topic]: [Who teaches it, how they explain things]
- [Mindset/motivation topic]: [Who teaches it, their speaking style]
## Language Patterns
- Pronouns: "our system", "we", "together" (inclusive)
- Comprehension checks: "okay?", "make sense?", "right?"
- Encouragement style: [How they motivate members]
- What they NEVER say: [Anti-patterns to avoid]
## Guardrails
- [Domain-specific restrictions]
e.g., trading community: never give specific financial advice
e.g., health community: always recommend consulting a professional
- [Audience assumptions — member vs prospect behavior]How to build the voice guide:
- Listen to or read 3-5 pieces of content from each key educator
- Note their verbal tics, catchphrases, and sentence structures
- Note what they explicitly avoid saying
- Document topic-specific language (e.g., a trading educator explaining candlesticks vs a mindset coach talking about discipline)
Phase 4: Ingestion Pipeline (2-4 hours)
Chunk the scraped content and load it into ChromaDB for RAG retrieval.
Chunk sizes by content type:
| Content Type | Chunk Size (words) | Overlap (words) | Why |
| Website pages | 500 | 50 | Short, focused context windows |
| Video transcripts | 500-800 | 50-100 | Longer to preserve conversational flow |
| Community posts | Full post | 0 | Posts are natural semantic units |
| Voice guide | 600 | 50 | Style context needs coherence |
Standard metadata schema — attach to every chunk:
{
"source": "unique_id",
"source_type": "transcript|community|scraped_page|voice_guide",
"content_type": "video_transcript|community_post|scraped_page|voice_guide",
"course": "Course Name",
"section": "Section Name",
"module_title": "Module Title",
"author": "Author Name",
"url": "https://...",
"engagement_tier": "viral|high|medium|low",
"ingested_at": "ISO timestamp"
}Technical notes:
- Batch upserts at 200 items — individual upserts on 4K+ items will time out
- SQLite (ChromaDB backend) can fail on some mounted filesystems — use
/tmpfallback all-MiniLM-L6-v2embedding runs locally, is free, and is good enough for v1- Use
chromadb.PersistentClientfor persistence across restarts
Phase 5: Chatbot Configuration (2-4 hours)
Configure the system prompt, model routing, and safety guardrails.
System prompt structure (follow this order):
- Identity — who the bot is, what community it serves
- Member context — are users members, prospects, or mixed?
- Voice instructions — reference the voice guide, include specific phrases and tone
- Citation rules — every teaching response MUST reference a specific video/module with a link. This is the #1 differentiator from generic AI.
- Guardrails — domain-specific restrictions (no financial advice, no medical diagnosis, etc.)
- Response format — length, style, how to end responses
Model routing for cost optimization:
- Simple questions (greetings, FAQs, definitions) → Haiku (~$0.001/query)
- Complex teaching (multi-step explanations, concept connections) → Sonnet (~$0.01/query)
- Classify by keyword lists, customizable per client
Non-negotiable design rules:
- Citations are mandatory — every teaching response must link to a source. This is what makes community chatbots valuable vs generic AI.
- Voice styling must be active — "So the first thing we're gonna look for is..." beats "The initial step in the process is to..."
- Never hallucinate sources — only reference content that appears in retrieved context chunks.
Phase 6: Sync Pipeline (2-4 hours)
Set up automated daily sync to keep the knowledge base fresh as new content is posted.
Architecture:
Scheduled Task (daily, e.g., 7am)
|
v
Browser automation → data/sync_inbox/new_*.json
|
v
sync_helpers.py → merge, deduplicate, update metrics
|
v
ingest.py → upsert into ChromaDB
|
v
Sync report → data/logs/sync_YYYYMMDD.txtDeduplication strategy:
- Community posts: by post ID
- Classroom modules: by module ID
- Drive files: by file ID or filename
- Cross-source: title matching (exact + partial fuzzy)
Phase 7: Deployment (1-2 hours)
Make the chatbot accessible. Options ranked by simplicity:
- Streamlit + Cloudflare Tunnel — free, instant, great for demos and small communities
- Streamlit Community Cloud — free persistent hosting via GitHub repo
- Railway/Render — paid ($5-10/month) but reliable for production
- Client's own infrastructure — hand off the codebase
Crash-proof demo pattern:
nohup bash -c 'while true; do
# Check if streamlit is running, restart if dead
pgrep -f "streamlit run" || streamlit run app.py --server.port 8501 &
# Check if tunnel is running, restart if dead
sleep 15
done' &
disownReplication Checklist
Copy this for each new client build:
Pre-Build:
- Community URL and access credentials obtained
- Claude API key configured
- All content sources identified (courses, community, drive, etc.)
- Voice analysis done — listened to 2-3 recordings, noted speech patterns
- Voice style guide created
- Member vs. prospect audience determined
Build:
- Classroom/course structure scraped
- Community posts scraped (filtered by engagement)
- Video transcripts extracted
- Website pages scraped
- Ingestion pipeline run — all content in ChromaDB
- System prompt customized (voice, identity, guardrails, citations)
- Topic classifier keywords customized
- RAG retrieval tested (3 query types: technical, mindset, community)
Deploy:
- Hosting method chosen and configured
- Daily sync scheduled task set up
- Demo link created and shared with client
- End-to-end test with real queries passed
Handoff:
- Client can access the chatbot URL
- Sync pipeline runs daily unattended
- Client knows how to stop/restart if needed
- Monitoring configured for sync health
Cost Model
| Component | Monthly Cost | Notes |
| ChromaDB | Free | Local, open-source |
| Embeddings | Free | all-MiniLM-L6-v2 runs locally |
| Claude Haiku queries | ~$3-5 | At 50-100 queries/day |
| Claude Sonnet queries | ~$5-10 | Complex questions only |
| Hosting | Free-$10 | Streamlit Cloud free, Railway $5-10 |
| Automated sync | ~$0 | Scheduled task, minimal compute |
| Total | $5-15/mo |
Pricing suggestion: $500-1000 setup fee + $100-200/month management. 90%+ profit margin.
Adapting to Different Platforms
The framework is built on Skool patterns but adapts to any community platform:
- Circle: Uses API for posts/spaces, similar content structure to Skool
- Discord: Bot API for channel history, thread extraction, role-based content filtering
- Mighty Networks: Browser automation for courses, API for community posts
- Teachable/Kajabi: Course structure via API or scraping, no native community (pair with Skool/Discord)
- Custom platforms: Adapt scraping to the platform's DOM structure; the ingestion pipeline and chatbot layer stay identical
Future Improvements
Once the v1 is running, these upgrades increase value:
- Usage analytics — track what members ask, surface content gaps
- Auto-escalation — route unanswerable questions to human educators
- Webhook sync — real-time content updates vs daily batch
- Platform embed — iframe or widget for native-feeling integration
- Multi-language support — translate content for international communities
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

