Build local documentation reference material for AI coding agents.
This repo is designed to be used with Claude Code. Open this repo in Claude Code and use slash commands (
/build-my-context7,/generate-agent-skills,/install-agent-skills) to download docs, generate skills, and install them. The skills and scripts are meant to be invoked by Claude Code, not run manually.
local-context7 downloads official documentation from various sources, filters it with AI assistance to keep only developer-relevant content, and generates skills that make the docs available as context during development.
Supported AI Agents:
- Claude Code (
~/.claude/skills/) - OpenAI Codex CLI (
~/.codex/skills/) - OpenCode (
~/.config/opencode/skills/)
Included Documentation:
| Skill | Source | Files | Description |
|---|---|---|---|
claude-code-docs |
Anthropic | 30 | Claude Code CLI features, hooks, MCP, skills |
codex-docs |
OpenAI | 12 | Codex CLI configuration, skills, agents |
langchain-docs |
LangChain | 1688 | LangChain, LangGraph, agents, RAG, tools |
nextjs-canary-docs |
Vercel | 376 | Next.js App Router, Server Components, APIs |
opencode-docs |
OpenCode | 70 | OpenCode tools, agents, MCP, plugins |
prisma-docs |
Prisma | 415 | Prisma ORM, Client, Schema, migrations |
tsf-docs |
TanStack | 192 | TanStack Form validation, React/Vue/Solid/Angular |
zod-docs |
Zod | 13 | Zod schema validation, TypeScript type inference |
- Claude Code installed
jq,git,curlavailable in your shell
- Open this repo in Claude Code
- Run the slash commands:
/build-my-context7 # Download and filter all manifests
/generate-agent-skills # Generate skills for all agents
/install-agent-skills # Install skills to system locations
To process a single library:
/build-my-context7 zod-docs # Download only zod-docs
/generate-agent-skills zod-docs # Generate only zod-docs skill
/install-agent-skills zod-docs # Install only zod-docs skill
After installation, the skills are available in your other projects. For example, when working on a Next.js app, Claude Code will automatically have access to nextjs-canary-docs.
Just give Claude Code the GitHub URL of the docs folder:
"Add docs from https://github.com/prisma/docs/tree/main/content"
Claude Code will automatically create the manifest and run the build commands. This is the fastest way to add new documentation.
Or create a manifest manually:
- Create a JSON file in
.claude/skills/download-docs/scripts/manifests/ - Run
/build-my-context7 <name>→/generate-agent-skills <name>→/install-agent-skills <name>
Manifests use JSON Schema for validation. Add "$schema": "./manifest.schema.json" for IDE autocomplete and validation.
GitHub Source (for repos with docs):
{
"$schema": "./manifest.schema.json",
"_source": {
"type": "github",
"repo": "owner/repo-name",
"branch": "main",
"path": "docs",
"extensions": [".md", ".mdx"],
"exclude": ["**/internal/**"]
}
}URL Source (for individual files):
{
"$schema": "./manifest.schema.json",
"_source": { "type": "url" },
"files": {
"getting-started": {
"installation": "https://example.com/docs/install.md"
}
}
}URL Source with HTML Conversion (requires pandoc):
{
"$schema": "./manifest.schema.json",
"_source": { "type": "url", "convert": "html" },
"files": {
"docs": { "overview": "https://example.com/docs/overview.html" }
}
}Limitation: HTML conversion only works for static HTML pages. Single Page Applications (SPAs) that render content via JavaScript (e.g., React/Angular apps) will produce empty output. See TODO below for planned Playwright support.
.claude/ # Working config for this repo
├── skills/ # Skills for building docs
│ ├── build-my-context7/ # Main orchestration skill
│ ├── download-docs/ # Downloads from manifests
│ ├── filter-docs/ # AI-assisted filtering
│ ├── generate-agent-skills/
│ └── install-agent-skills/
└── agents/ # Sub-agents
dotfiles/ # Generated skills (source of truth)
├── shared/ # Documentation stored once
├── claude/skills/ # SKILL.md → ~/.claude/skills/
├── codex/skills/ # SKILL.md → ~/.codex/skills/
└── opencode/skills/ # SKILL.md → ~/.config/opencode/skills/
output/ # Intermediate files (gitignored)
- Download - Fetches documentation from GitHub repos or URLs based on manifest configurations
- Filter - AI reviews each file and removes non-useful content (changelogs, contribution guides, marketing pages, etc.)
- Generate - Creates skills for each AI agent following their specific format requirements
- Install - Symlinks generated skills to system locations where agents can find them
- Offline access - Documentation available without internet
- Version control - Pin to specific documentation versions
- Customization - Add your own documentation sources
- Privacy - No data sent to external services during development
- Speed - Instant context loading without API calls
- Playwright handler for SPA sites - Add a
"type": "playwright"source handler to support JavaScript-rendered documentation sites (e.g., antigravity.google). Would use headless Chromium to render pages before extracting content.
This project is open source and available under the MIT License.