project-discovery
Skill1 starsChanged 7 months agoMITView on GitHub
Khám phá sâu một codebase lạ và xuất báo cáo `discovery.md` ở root: kiến trúc, dependency graph, từng module/crate/package, patterns, testing, CI/CD, số liệu. Dùng khi user nói 'discover', 'khám phá dự án', 'phân tích codebase', 'project discovery', 'deep dive', hoặc mở một repo lần đầu cần hiểu tổng thể.
- Reads credentials
6 other projects use a version of this.
Adopted by
Most recently taken up by
- upex-galaxy/agentic-qa-boilerplatetheir own version, first seen Nov 7, 2026
- NAVANEETHVVINOD/agent-orchestratortheir own version, first seen Oct 3, 2026
- rikvanriel/code-hygienetheir own version, first seen Sep 17, 2026
- bhagyamudgal/skillstheir own version, first seen Sep 9, 2026
- ntaffzii/Skill-Agentstheir own version, first seen Sep 2, 2026
- kognar-ai/claude-skillstheir own version, first seen Jan 20, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- upex-galaxy/agentic-qa-boilerplate★ 26same name
- ntaffzii/Skill-Agents★ 4same name
- bhagyamudgal/skills★ 2same name
- rikvanriel/code-hygiene★ 2same name
- kognar-ai/claude-skills★ 0same name
- NAVANEETHVVINOD/agent-orchestrator★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- deep-questionsSkill
- understand-questionsSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Read: README.md, CLAUDE.md, AGENTS.md, ARCHITECTURE.md, discovery.md (nếu tồn tại — đọc để biết format đã có)
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mục tiêu: tạo file discovery.md ở root project — báo cáo kiến trúc đủ sâu để một dev mới đọc xong có thể tự đóng góp. KHÔNG hỏi xác nhận, scan rồi viết.
Format tham chiếu chính: discovery.md ở root claurst (16 sections, ~700 dòng) — nếu có thì đọc trước để bám style.
Nguyên tắc cốt lõi
- Song song tối đa: mọi Glob/Read/Grep độc lập gửi trong 1 message
- Subagent cho mỗi crate/module lớn: dùng
Agent(subagent_type=Explore) khi project có >5 crates/packages — mỗi agent 1 module, chạy song song. Tránh nhồi context chính - Sample, đừng đọc tất: 1 file đại diện/nhóm là đủ. Đừng đọc file > 500 dòng trừ khi là entry point
- Tiếng Việt cho phân tích, tiếng Anh cho code/tên/thuật ngữ
- Số liệu thật: chạy
wc -l,git log,cargo metadata,tokei(nếu có) để có con số chính xác — không bịa - Không tạo file khác: chỉ ghi 1 file duy nhất là
discovery.md. Không tạo doc phụ, không update README
Phase 1: Reconnaissance (1 message, song song)
Chạy đồng thời:
Cấu trúc & manifest:
- Glob:
package.json,Cargo.toml,go.mod,pyproject.toml,*.csproj,Gemfile,pom.xml,build.gradle*,mix.exs - Glob:
**/Cargo.toml,**/go.mod,**/package.jsonđể phát hiện workspace/monorepo - Glob top-level:
src/*,crates/*,packages/*,apps/*,cmd/*,internal/*,lib/*,app/*
Tài liệu sẵn có:
- Read:
README.md,CLAUDE.md,AGENTS.md,ARCHITECTURE.md,discovery.md(nếu tồn tại — đọc để biết format đã có) - Glob:
spec/**/*.md,docs/**/*.md(chỉ list, không đọc hết)
Build & CI:
- Glob:
.github/workflows/*,.gitea/workflows/*,Dockerfile*,Makefile,justfile - Glob:
.cargo/config.toml,tsconfig.json,tox.ini,noxfile.py
Git context (Bash, chạy song song):
git log --oneline -20git log --all --format=%an | sort -u | head -20— số contributorgit ls-files | wc -l— số filegit remote -v
Sau Phase 1 phải xác định được: ngôn ngữ chính, build tool, monorepo hay không, số lượng module/crate/package, có spec/docs sẵn không.
Phase 2: Deep dive theo module
Quyết định chiến lược:
- Project nhỏ (<5 modules, <10k LoC): tự đọc trực tiếp, song song hoá Read
- Project lớn (>=5 modules HOẶC >10k LoC): spawn 1 subagent
Exploreper module, trong 1 message duy nhất
Brief mỗi subagent (template):
Khám phá crate/package
<tên>tại<path>. Cần biết:
- Vai trò trong hệ thống (1-2 câu)
- Các file/module chính, mỗi cái làm gì (bullet list)
- Public API quan trọng nhất (struct/trait/function tên)
- Dependency tới crate/package khác trong workspace
- Patterns đáng chú ý (vd: trait-based abstraction, async, plugin) Đọc tối đa 8 file. Báo cáo dưới 300 từ, tiếng Việt, có dấu.
Nếu project có ngôn ngữ phụ (vd Rust + TS frontend), spawn riêng 1 agent cho mỗi side.
Phase 3: Cross-cutting analysis
Sau khi có dữ liệu module, tự thực hiện (không subagent):
- Dependency graph: từ kết quả Phase 2, vẽ bằng ASCII (kiểu
cli ──→ core, api) - Entry points: tìm
main.rs,main.go,index.ts,__main__.py, đọc 50 dòng đầu - Config & runtime: tìm chỗ load config, env var, secret. Grep
dotenv|env::var|os.getenv|process.env - Testing: Glob
**/tests/**,**/*_test.go,**/*.test.ts,**/test_*.py. Đếm và phân loại unit/integration - Patterns: scan có MCP, plugin system, provider abstraction, hooks, feature flags không (Grep tên đặc trưng)
- Số liệu: nếu có
tokeithì chạy, không thìgit ls-files | xargs wc -lfilter theo extension
Phase 4: Viết discovery.md
Template cố định 16 mục (bám discovery.md mẫu của claurst):
# <PROJECT_NAME> — Deep Discovery Report
> <1 câu mô tả + version + license + quy mô>
## 1. Kiến trúc tổng quan
- ASCII diagram các tầng/module
- Dependency graph
## 2..N. Module/Crate/Package <tên>
- Vai trò
- Cấu trúc file
- Public API chính
- Dependencies
- Pattern đặc trưng
## N+1. Entry point(s)
## N+2. Configuration & Runtime
## N+3. Testing strategy
## N+4. CI/CD
## N+5. Feature flags / build profiles (nếu có)
## N+6. Patterns đáng chú ý
## N+7. Số liệu tổng hợp
- LoC theo ngôn ngữ
- Số file, số module
- Số contributor, commit gần nhất
- Test coverage (nếu detect được)Quy tắc viết:
- Dùng bảng Markdown cho liệt kê crate/module (cột: tên, role, LoC nếu có)
- Mỗi section có ít nhất 1 code reference dạng
path/to/file.rs:42để user click được - Không lặp lại README — bổ sung góc nhìn architecture, không phải tutorial
- Không bịa: nếu không kiểm chứng được thì ghi
(chưa xác minh)hoặc bỏ qua - Cuối file thêm dòng:
> Generated by project-discovery skill on YYYY-MM-DD
Phase 5: Verification
Sau khi Write discovery.md:
- Đếm dòng (
wc -l discovery.md) — báo cho user - Báo cáo cuối: số module phân tích, LoC tổng, file output, 3 phát hiện thú vị nhất (1 câu mỗi cái)
KHÔNG commit, KHÔNG push, KHÔNG mở PR — chỉ ghi file và dừng.
Anti-patterns — đừng làm
| Sai | Đúng |
| Đọc tuần tự từng file | 1 message với nhiều Read song song |
| Đọc hết file > 500 dòng | Đọc 100 dòng đầu, grep symbol nếu cần thêm |
| Viết doc generic kiểu "src/ chứa source code" | Viết cụ thể "src/api/providers/anthropic.rs:120 dispatch streaming chunks" |
Tạo thêm architecture.md, modules.md phụ | CHỈ 1 file discovery.md |
| Hỏi user "bạn muốn cover gì?" | Tự quyết định, scan rồi làm |
| Bịa số liệu (LoC, số test) | Chạy lệnh thật hoặc bỏ qua |
| Spawn 20 subagent cho project 3 crate | Tự đọc trực tiếp, subagent chỉ khi >=5 module |
Test thực tế
Skill này được phát triển trên repo claurst (Rust monorepo, 12 crates, ~50k LoC). File discovery.md ở root là output tham chiếu — chạy skill lại trên claurst phải tạo ra báo cáo có cấu trúc tương đương (16 sections, có dependency graph, có per-crate breakdown, có số liệu).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

