From doc-generator
Generate structured project documentation by scanning code and calling AI. Use when users ask to "generate docs", "create documentation", "document this project", "generate project doc", "写文档", "生成文档", "生成项目文档", "帮我写项目文档", "分析代码生成文档", or ask "这个项目是干什么的", "介绍一下这个项目", "帮我分析这个代码库", "what does this project do", "explain this codebase". Also use when users want an AI-generated README or project overview of a code directory. Also trigger for API configuration: "重新配置API", "reconfigure API", "修改API配置", "更改API配置", "切换模型", "switch model", "change API key", "重置API配置", "reset API config", "配置API", "configure API", "设置API", "setup API".
How this skill is triggered — by the user, by Claude, or both
Slash command
/doc-generator:doc-generatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automatically scan a code directory and generate `GENERATED_DOC.md` using any OpenAI-compatible API.
Automatically scan a code directory and generate GENERATED_DOC.md using any OpenAI-compatible API.
Trigger immediately when the user's request matches any of these patterns:
If unsure whether to use this skill, use it. False positives are harmless.
First, determine if the user is asking to reconfigure their API. Reconfigure triggers include: "重新配置", "reconfigure", "修改配置", "更改配置", "切换模型", "switch model", "change API", "重置配置", "reset config", "配置API", "configure API", "设置API", "setup API".
Run this to check if API_KEY is already set:
echo "${API_KEY:-NOT_SET}"
If user is asking to reconfigure: Go to Step 2 regardless of current API_KEY state. Tell the user: "好的,我来帮你重新配置 API。"
If API_KEY is set AND user is NOT asking to reconfigure: Go directly to Step 3.
If API_KEY is NOT set AND user is NOT asking to reconfigure: Go to Step 2 for setup.
Help the user configure their API. Ask these questions one by one, not all at once:
Question 1 — Which API provider?
Present these options:
| # | Provider | API_BASE_URL | Example models |
|---|---|---|---|
| 1 | 小米 MiMo | https://api.xiaomimimo.com/v1 | mimo-v2.5-pro |
| 2 | OpenAI | https://api.openai.com/v1 | (用户输入) |
| 3 | DeepSeek | https://api.deepseek.com/v1 | deepseek-v4-flash, deepseek-v4-pro |
| 4 | Ollama (本地) | http://localhost:11434/v1 | (用户输入) |
| 5 | 其他(自定义) | (用户输入) | (用户输入) |
Let the user choose by number.
Question 2 — API Key?
Ask for their API key. If they chose Ollama, tell them any non-empty value works (e.g., ollama).
Question 3 — Model name?
If the chosen provider has example models listed, show them and let the user pick or press Enter for the first one as default.
If the chosen provider has (用户输入) in the model column, ask the user to enter the model name directly (no default).
Then set the environment variables:
For each confirmed value, run:
export API_BASE_URL="<value>"
export API_KEY="<value>"
export MODEL_NAME="<value>"
Tell the user: "配置完成。以后使用时如果切换了终端,需要重新设置,或者把以下内容加到 ~/.bashrc / ~/.zshrc 中:"
export API_BASE_URL="<value>"
export API_KEY="<value>"
export MODEL_NAME="<value>"
--path .--exclude tests,docs,node_modules for better resultspython <skill-root>/scripts/doc_generator.py --path <target> --exclude tests,docs,node_modules
After generation, tell the user:
GENERATED_DOC.md was savedEdge cases:
doc_gen_error.log and verify their API keyPython, JavaScript, TypeScript, Java, C/C++, Go, Rust, Shell, Ruby, PHP, Swift, Kotlin, and more.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.
npx claudepluginhub wkrabbit/doc-generator-skill --plugin doc-generator