Confluence to Agent Knowledge Base
Turn any Confluence Cloud instance into a private, searchable AI knowledge base on GitHub.
A Claude Code skill that walks you through converting your company's Confluence spaces into a structured, LLM-powered knowledge base — with access-tiered repos so sensitive docs stay locked down.
Your Confluence ──► Private GitHub Repos ──► Searchable AI Knowledge Base
(access-tiered) (search, Q&A, auto-sync)
6-phase interactive walkthrough:
- Discovery — Finds your Confluence instance and lists all spaces (no API tokens needed)
- Access Tiers — Groups spaces by who should see them (general, leadership, sales, etc.)
- Ingest — Pulls all pages into clean markdown with metadata
- Compile — Builds a categorized wiki with summaries and indexes
- GitHub — Creates private repos per tier and pushes
- Auto-Sync — Sets up weekly sync to keep the Knowledge Base current
claude skill add jpmim/confluence-to-agent-knowledge-baseOr manually:
git clone https://github.com/jpmim/confluence-to-agent-knowledge-base.git ~/.claude/skills/confluence-to-agent-knowledge-base- Claude Code with Claude Pro or Max subscription
- Atlassian MCP connector connected in Claude Code
- Python 3.9+
- Git with push access to your GitHub org
In Claude Code, just say:
"Set up a knowledge base from our Confluence"
Or:
"Migrate our Confluence to a private GitHub knowledge base"
Claude will walk you through the entire process interactively.
For each access tier, you get a private GitHub repo containing:
your-company-kb/
raw/ # Original Confluence pages as markdown
wiki/ # Compiled knowledge base
_index.md # Master index
_summaries.md # One-line summaries of all pages
operations/ # Categorized articles
technical/
onboarding/
...
confluence_kb/ # Python CLI tool
CLAUDE.md # Agent instructions (so your AI agents can use the KB)
CLI commands included:
ckb search "query"— Full-text search (no API key needed)ckb query "question"— LLM-powered Q&A with citationsckb interactive— Chat-style Q&A sessionckb compile --fast— Recompile the wikickb lint— Health checks and quality auditckb status— Show Knowledge Base stats
Most companies have sensitive content in Confluence that shouldn't be visible to everyone:
- Management spaces with strategy, financials, board docs
- Sales spaces with pricing, contracts, client data
- HR spaces with compensation, performance reviews
This skill separates those into different private repos with different GitHub collaborator lists. Everyone gets the general Knowledge Base, but restricted content stays restricted.
- Uses the Atlassian MCP connector for all Confluence access — no API tokens to manage
- Converts pages to markdown with YAML frontmatter for maximum portability
- Compiles a structured wiki with categories, summaries, and indexes
- Includes a TF-IDF search engine for instant full-text search
- Sets up weekly auto-sync via Claude Code scheduled tasks
- Each repo includes CLAUDE.md so AI agents can read and contribute to the Knowledge Base
Karpathy's LLM Knowledge Base approach — raw data compiled by LLMs into a wiki that agents maintain and query.
MIT