skills/codewiki-generator/SKILL.md
Generate a deep, code-first project wiki and VitePress documentation site (DeepWiki-style) for a repository. Use when asked to create a complete wiki/manual for a new codebase, build a code-first documentation site, or generate a `codewiki/` folder with structured Markdown, diagrams, and navigation based on the source code (not existing docs).
npx skillsauth add samzong/samzong codewiki-generatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate a DeepWiki-style, code-first documentation site for a given repository. The output will reside in the codewiki/ directory, including a VitePress configuration and an auto-generated sidebar. The documentation must reflect the project's current state and prioritize explaining the system's design rationale over merely describing its functionality.
Ask the user: "What language should the documentation be written in? (e.g., English, 中文, 日本語, etc.)" IF the user specifies a language THEN store the provided language and apply it to all generated prose content. ELSE IF the user does not specify a language THEN default to English.
README, docs/) as secondary hints.Execute the analyzer script to scan the codebase and generate structured metadata. <skill-root> refers to the directory containing this SKILL.md.
python3 <skill-root>/scripts/codewiki_analyze.py \
--repo-root <repo-root> \
--out-dir codewiki \
--force
This command generates the following outputs:
codewiki/.meta/ directory containing deps.json, entrypoints.json, evidence.json, doc_plan.json, and symbols.json (if ctags is available).codewiki/quality-report.md detailing coverage and pages with low confidence..md files.Note: This step does not generate placeholder .md files. The LLM is responsible for writing documentation content directly in Step 4.
Note: Images referenced in existing Markdown files are copied into codewiki/assets/.
references/structure-and-heuristics.md.Read codewiki/.meta/doc_plan.json and process each planned page:
.md file only for pages containing actual content.Writing guidelines:
# Related Code block (fenced text block), not a heading./, (), and : in labels, and prefer node[plain label].Refer to references/doc-templates.md for detailed, evidence-linked page templates.
After documentation generation, update the sidebar to reflect the actual files:
python3 <skill-root>/scripts/codewiki_bootstrap.py \
--repo-root <repo-root> \
--out-dir codewiki \
--refresh-sidebar
Install documentation dependencies (Mermaid support is enabled by default):
npm --prefix codewiki install
Launch the documentation site:
npm --prefix codewiki run docs:dev
Alternative launch command (without prior npm install):
npx -p vitepress -p vitepress-plugin-mermaid -p mermaid vitepress dev codewiki
After the site is operational, inform the user about available options:
"Documentation site is ready! You can now:
Let me know if you'd like to proceed with any of these."
These workflows are available for execution after the core documentation generation process is complete.
Deploy the documentation site to Cloudflare Pages using the wrangler CLI.
Trigger: The user requests to deploy, publish, or host the documentation.
See: references/deploy-cloudflare.md for comprehensive instructions (including wrangler installation, login verification, build process, deployment, and updating index.md with the live URL).
Translate existing documentation into a second language and configure the VitePress language switcher.
Trigger: The user requests translation, multi-language, or internationalization (i18n) support.
See: references/i18n-setup.md for comprehensive instructions (including directory structure, VitePress locales configuration, and translation guidelines).
codewiki_analyze.py: Scans the codebase and generates .meta/*.json metadata files.codewiki_bootstrap.py: Scaffolds the codewiki/ directory, copies referenced images, and generates the sidebar.structure-and-heuristics.md: Contains rules for module selection and signal identification.doc-templates.md: Provides comprehensive, evidence-linked templates for all page types.deploy-cloudflare.md: Details the workflow for deploying to Cloudflare Pages.i18n-setup.md: Outlines the configuration process for multi-language support.vitepress/: Contains minimal VitePress configuration and a landing page template.documentation
撰写微信公众号技术文章的结构化工作流。使用场景:用户要写一篇公众号文章、需要创建文章目录、组织素材、迭代草稿。强制遵循 blogs/wechat/README.md 的命名规范和目录结构。
tools
Cross-tool vibe coding profiler. Scans AI coding tool data on the machine (Claude Code sessions, OpenCode DB, Codex sessions), combined with git history and project memory, to build a true user portrait, discover workflow automation opportunities, and update the target tool's instruction file (CLAUDE.md or AGENTS.md) accordingly. Use when: "calibrate", "vibe-calibrate", "分析我的习惯", "profile me", "update my CLAUDE.md based on my history", "我的效率怎么提升", "analyze my patterns", "优化我的配置", or at the start of a long-term engagement with a new user.
development
Ruthless code simplifier: flatten abstractions, inline wrappers, remove unnecessary layers, delete dead code — without changing behavior. Use when: user says "simplify", "simplify this", "flatten", "inline", "too complex", "over-engineered", "remove abstraction", "unwrap", "reduce complexity", "make it simpler", "this is too complicated", or points at code that has unnecessary indirection. Does NOT change behavior, break public APIs, or remove meaningful error handling.
testing
Ship staged changes through a narrow release flow: auto-clean staged files, block unexpected non-i18n CJK additions, create or keep a branch, commit staged work, push, and open a pull request — all without confirmation. Use mainly when the user explicitly invokes `/ship` or says "ship it", "push and PR", or "commit and PR". Do not use for commit-only, push-only, PR-only, or existing-PR editing requests. All generated git and GitHub text must be in English.