deepwiki
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeepWiki Documentation Generator
DeepWiki文档生成器
Generate DeepWiki-style documentation for local codebases with a clear, repeatable pipeline and explicit outputs.
为本地代码库生成DeepWiki风格的文档,拥有清晰、可重复的流程和明确的输出。
When to Use
适用场景
Use this Skill when you need to:
- Produce structured codebase documentation for onboarding or long-term maintenance
- Capture architecture, modules, and key flows using consistent templates
Do NOT use this Skill when:
- You only need API reference docs (use TypeDoc/JSDoc)
- The codebase is trivial (< 100 lines)
- A proprietary tool format is required
在以下场景中使用本技能:
- 为新员工入职或长期维护生成结构化的代码库文档
- 使用统一模板记录架构、模块和关键流程
请勿在以下场景中使用本技能:
- 仅需要API参考文档(使用TypeDoc/JSDoc)
- 代码库非常简单(少于100行)
- 需要使用专有工具格式
Core Principles
核心原则
- Big picture before details
- Responsibilities before implementation
- Semantic-level explanation (avoid line‑by‑line translation)
- Use domain terminology, not tutorial tone
- 先整体后细节
- 先职责后实现
- 语义层面解释(避免逐行翻译代码)
- 使用领域术语,而非教程语气
Output Contract
输出规范
docs/
├── overview.md # Project overview: what it is, tech stack, entry points
├── architecture.md # Architecture design: module division, dependencies, diagrams
├── modules/ # Module-level documentation
│ ├── [module-name].md # Independent documentation for each core module
│ └── ...
├── flows.md # Behavior and flows: how the system runs
├── design-decisions.md # Design decisions: why designed this way
└── appendix.md # Glossary and references (optional)Each page must be independently readable and RAG‑friendly.
docs/
├── overview.md # 项目概述:项目定位、技术栈、入口点
├── architecture.md # 架构设计:模块划分、依赖关系、图表
├── modules/ # 模块级文档
│ ├── [module-name].md # 每个核心模块的独立文档
│ └── ...
├── flows.md # 行为与流程:系统运行方式
├── design-decisions.md # 设计决策:为何如此设计
└── appendix.md # 术语表与参考资料(可选)每个页面必须具备独立可读性且适合RAG检索。
Workflow (Five-Phase Analysis)
工作流程(五阶段分析)
Phase 1: Codebase Reconnaissance
阶段1:代码库侦察
Goal: Identify project type and tech stack.
Actions:
- Scan directory structure
- Identify primary language/framework/build system
- Determine project type (app / library / tool / mono‑repo)
Ignored by default:
- ,
node_modules/,dist/,build/.git/ - Generated/cache directories
Output:
- Overview draft + tech stack tags
目标: 确定项目类型与技术栈。
行动:
- 扫描目录结构
- 识别主要语言/框架/构建系统
- 确定项目类型(应用/库/工具/单仓项目)
默认忽略内容:
- ,
node_modules/,dist/,build/.git/ - 生成的/缓存目录
输出:
- 概述草稿 + 技术栈标签
Phase 2: Structure Modeling
阶段2:结构建模
Goal: Explain how the project is organized.
Actions:
- System/subsystem decomposition
- Module boundaries from directory + dependencies
- Identify core vs peripheral modules
Output:
architecture.md- Dependency diagrams (Mermaid)
- System/subsystem hierarchy table
Template: use templates.md.
目标: 说明项目的组织方式。
行动:
- 系统/子系统分解
- 根据目录与依赖关系确定模块边界
- 区分核心模块与外围模块
输出:
architecture.md- 依赖关系图表(Mermaid)
- 系统/子系统层级表
模板: 使用templates.md。
Phase 3: Module Understanding
阶段3:模块理解
Goal: Explain each core module’s purpose and boundaries.
Actions:
- Extract key entities (classes/functions/interfaces)
- Summarize responsibilities and public API
- Identify common usage patterns
Output:
modules/[module-name].md- Key entity relationship diagrams
Template: use templates.md.
目标: 说明每个核心模块的用途与边界。
行动:
- 提取关键实体(类/函数/接口)
- 总结职责与公开API
- 识别常见使用模式
输出:
modules/[module-name].md- 关键实体关系图
模板: 使用templates.md。
Phase 4: Flow Synthesis
阶段4:流程综合
Goal: Describe how the system runs end‑to‑end.
Actions:
- Find entry points (CLI / main / server / job)
- Trace main call chains
- Summarize critical flows and exceptions
Output:
flows.md
Template: use templates.md.
目标: 描述系统端到端的运行方式。
行动:
- 找到入口点(CLI / 主程序 / 服务 / 任务)
- 追踪主要调用链
- 总结关键流程与异常情况
输出:
flows.md
模板: 使用templates.md。
Phase 5: Design Insight
阶段5:设计洞察
Goal: Explain why the system is designed this way.
Actions:
- Summarize trade‑offs and design patterns
- Mark inferred reasoning vs confirmed facts
Output:
design-decisions.md
Template: use templates.md.
目标: 解释系统为何如此设计。
行动:
- 总结权衡与设计模式
- 标记推断的推理与已确认的事实
输出:
design-decisions.md
模板: 使用templates.md。
Quality Gates
质量校验标准
- Every page answers: purpose / boundary / when to care
- No line‑by‑line code narration
- Mermaid diagrams render correctly
- Internal links are valid
- Terminology is consistent
- 每个页面需回答:用途 / 边界 / 适用场景
- 无逐行代码叙述
- Mermaid图表可正确渲染
- 内部链接有效
- 术语一致
References
参考资料
| Topic | Description | Reference |
|---|---|---|
| Templates | Page templates for each document | reference |
| Mermaid Guide | Diagram conventions | reference |
| VitePress Config | Docs site setup | reference |
| Framework Patterns | Framework-specific analysis focus | reference |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| 模板 | 各文档的页面模板 | 参考 |
| Mermaid指南 | 图表规范 | 参考 |
| VitePress配置 | 文档站点设置 | 参考 |
| 框架模式 | 特定框架的分析重点 | 参考 |