Trigger Conditions
Activate this skill when the user says "show me the project structure", "how is this repository organized", "directory tree", "help me understand this codebase", or similar requests.
Workflow
- Scan the root directory — Use Bash
findandlsto get the top-level structure - Analyze key directories — Read key files (package.json, Cargo.toml, pyproject.toml, go.mod, etc.) to get project metadata
- Recursive scan — Scan the main directories in depth to understand the responsibilities of each module
- Generate structure diagram — Output an ASCII directory tree + Chinese annotation descriptions
Output Format
## 📂 项目结构地图
🔧 Project Information
- Language: TypeScript / Python / Go / ...
- Framework: Next.js / FastAPI / Gin / ...
- Package management: pnpm / pip / go mod
🌳 Directory Tree
project-root/
├── src/ # 📦 核心源码
│ ├── components/ # 🧩 UI 组件
│ ├── services/ # 🔌 业务逻辑层
│ ├── utils/ # 🔧 工具函数
│ └── index.ts # 🚀 入口文件
├── tests/ # 🧪 测试文件
├── docs/ # 📖 文档
├── .github/ # 🔄 CI/CD 配置
├── package.json # 📋 依赖管理
└── README.md # 📝 项目说明
🗺️ Module Descriptions
| Directory | Responsibility | Key Files |
|---|---|---|
src/ |
Core source code | index.ts, app.ts |
src/components/ |
UI components | Button.tsx, Modal.tsx |
💡 Entry Point Suggestions
- 🚀 Startup entry:
src/index.ts - 📖 Getting started documentation:
README.md - ⚙️ Configuration files:
config.yaml
## 注意事项
- 跳过 node_modules, .git, vendor, __pycache__ 等常见忽略目录
- 对每个关键目录给出一行中文说明
- 如果项目有 monorepo 结构,分别列出各 packages
- 最多展示 3 层深度,避免输出过长