Analyze GitHub repos and auto-generate documentation with Mermaid architecture diagrams. Use when generating documentation for repos. Triggers on "/deepwiki", "生成文件", "repo documentation", "分析 repo".
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Analyze GitHub repos and auto-generate documentation with Mermaid architecture diagrams. Use when generating documentation for repos. Triggers on "/deepwiki", "生成文件", "repo documentation", "分析 repo".
# Default: display in conversation
/deepwiki yei-finance/yei-lending
# Output to Notion
/deepwiki yei-finance/clovis --output notion
# Output to local file
/deepwiki yei-finance/pit --output ./docs/pit.md
# Output to Obsidian
/deepwiki yei-finance/yeiswap --output obsidian
Workflow
graph TD
A[Input: repo URL/name] --> B[Clone or read repo]
B --> C[Analyze directory structure]
C --> D[Identify key files]
D --> E[Read core source code]
E --> F[Generate Wiki structure]
F --> G[Generate Mermaid diagrams]
G --> H{Output location?}
H -->|default| I[Display in conversation]
H -->|notion| J[Write to Notion]
H -->|path| K[Write to local file]
H -->|obsidian| L[Write to Obsidian]
Phase 1: Repo Analysis
1.1 Clone Repository
# Verify GitHub account
gh auth status
# Clone to temp directory
REPO_DIR="/tmp/deepwiki/<repo-name>"
gh repo clone <repo> "$REPO_DIR" -- --depth 1
# If already exists, pull latestcd"$REPO_DIR" && git pull
1.2 Analyze Directory Structure
# Exclude common non-code directories
tree -L 3 -I 'node_modules|.git|dist|build|coverage|__pycache__|.next|target'
1.3 Identify Tech Stack
File
Tech Stack
package.json
Node.js/TypeScript
Cargo.toml
Rust
requirements.txt / pyproject.toml
Python
hardhat.config.js / hardhat.config.ts
Solidity + Hardhat
foundry.toml
Solidity + Foundry
Move.toml
Move
go.mod
Go
1.4 Identify Key Files
Priority reading order:
README.md - Existing documentation
package.json / Cargo.toml etc. - Dependencies and scripts