deepwiki-skill
deepwiki-skill is an agent skill for Claude Code (and any other AI agent that supports agent skills) that automatically generates comprehensive, wiki-style documentation for any codebase.
Why use deepwiki-skill
- Standard Agent Skill: Not another standalone agent, but a reusable skill that works across multiple AI agents
- Zero Configuration Hassle: Leverage your existing subscription without complex setup
- Evidence-Based & Hallucination-Free: Every key statement includes precise line-level citations from source code
- Manual Structure Control: Available to take full control of document structure, solving the problem of uncontrollable auto-generated content
- CI/CD Ready: Built-in incremental updates feature makes it easy to deploy in CI/CD pipelines, keeping docs synchronized with code changes
Features
- Evidence-Based Documentation: Every statement traced back to source files with line numbers
- Mermaid Diagram Support: Generate and validate flowcharts, sequence diagrams, class diagrams, and more
- Flexible Execution Modes: Fully automatic, TOC-file-based, or incremental updates
- Parallel Processing: Subagents for faster documentation generation and better context isolation
- Smart Code Analysis: Detects multiple programming languages, handles encoding detection, filters binary files
- Multi-Language & Markdown-Based Output: Output as Markdown, simple control over output language
Quick Start
Prerequisites
Installation
Note: While deepwiki-skill works with any coding agent that supports agent skills, Claude Code currently offers the best subagent support for optimal documentation generation. Claude Code is recommended for the best experience.
Claude Code
In Claude Code, register the marketplace and install this plugin
/plugin marketplace add natsu1211/deepwiki-skill
/plugin install deepwiki-skill@deepwiki-skill-marketplace
Execute /skills command in Claude Code then you should see wiki skill in the list.
Gemini CLI
Note: Version >=0.24.0 is required to use agent skills. Manual installation will not install subagents, and generation quality may degrade due to the limited context window.
via Gemini CLI Extension
coming soon...
manual
Copy the skills folder into ~/.gemini (user scope) or project_dir/.gemini(workspace scope)
git clone https://github.com/natsu1211/deepwiki-skill && cd deepwiki-skill
cp -R skills ~/.gemini
Execute /skills command in Gemini CLI then you should see wiki skill in the list.
Codex
Note: Generation quality may degrade due to limited context window.
Copy the skills folder into ~/.codex (user scope) or project_dir/.codex(workspace scope)
git clone https://github.com/natsu1211/deepwiki-skill && cd deepwiki-skill
cp -R skills ~/.codex
Execute /skills command in Codex then you should see wiki skill in the list.
Usage
Just write something like Use wiki skill to generate wiki documentation or Invoke wiki skill to update documents at docs/wiki based on docs/wiki/toc.yaml to tell agent to invoke skill.
Custom command gen is also provided to parse the arguments and explicitly invoke the skill. This allows you to use the skill like a regular CLI tool, making inputs more concise while expressing intent more precisely.
Basic Usage
Fully automatic wiki document generation:
/deepwiki-skill:gen
Generate TOC file only:
/deepwiki-skill:gen --structure
Generate from existing TOC:
/deepwiki-skill:gen docs/wiki/toc.yaml
Update documentation after manually changing toc.yaml and/or code changes:
/deepwiki-skill:gen docs/wiki/toc.yaml --update
Specify output directory:
/deepwiki-skill:gen --output ./documentation/wiki
Generate documentation in Chinese:
/deepwiki-skill:gen --language zh-CN
Include only specific files:
/deepwiki-skill:gen --include "src/**/*.ts"
Exclude test files:
/deepwiki-skill:gen --exclude "**/*.test.js"
Combined arguments:
/deepwiki-skill:gen --language zh-CN --output ./docs --exclude "**/*.test.js"
Run from CLI (yolo mode / headless mode):
claude -p "/deepwiki-skill:gen" --dangerously-skip-permissions
Use Cases
-
Quickly understand a new project
- Use fully automatic mode:
/deepwiki-skill:gen
-
Generate wiki documentation for your project with control over chapter structure
- First use structure-only mode to generate initial
toc.yaml: /deepwiki-skill:gen --structure
- Modify
docs/wiki/toc.yaml according to your needs
- Then use TOC-based mode to regenerate documentation:
/deepwiki-skill:gen docs/wiki/toc.yaml