.codex/skills/codebase-overview/SKILL.md
Analyze codebase architecture. Creates ./.gtd/CODEBASE.md
npx skillsauth add Hoang604/get-thing-done codebase-overviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Core responsibilities:
Flow: Discover → Classify → Split → Document </objective>
<context> **Outputs:**./.gtd/CODEBASE.md as the thin index./.gtd/codebase/architecture.md./.gtd/codebase/entrypoints.md./.gtd/codebase/patterns.md./.gtd/codebase/open-questions.md./.gtd/codebase/domains/*.md./.gtd/codebase/infra/*.md
</context>
Document what IS, not what SHOULD BE. Save opinions for later.
Do not let CODEBASE.md grow into a monolith. Keep it short and use targeted documents for durable knowledge.
Start with structure and entry points. Go deep only when:
Each output file should carry:
GeneratedLast UpdatedLast VerifiedLast Verified means the date this file's content was checked against the current codebase during this run.
NEVER describe a module based on its name alone.
UserService might delete users, not serve themutils/ might contain critical business logiccache.ts might write to databaseEvery description requires reading actual code.
Every claim must cite evidence inline.
Use compact evidence format directly in the document:
Evidence: path/to/file:lineEvidence: path/a:line, path/b:lineNo citation = don't write it.
If you cannot verify something, write it to open-questions.md instead of filling gaps with inference.
Check if $ARGUMENTS contains --refresh.
If REFRESH mode:
./.gtd/CODEBASE.md./.gtd/codebase/If NEW mode:
ls -la
cat package.json 2>/dev/null || cat Cargo.toml 2>/dev/null || cat go.mod 2>/dev/null || cat requirements.txt 2>/dev/null || echo "No manifest found"
Identify:
find . -type d -maxdepth 3 | grep -v node_modules | grep -v .git | grep -v __pycache__ | head -80
Classify top-level and major subdirectories into:
Find entry points by convention and actual wiring:
main.*, index.*, app.*server.*, cli.*, worker boot filespackage.json scriptsCMD or ENTRYPOINTFor each major directory or subsystem, classify:
| Type | Description | Output |
| ---- | ----------- | ------ |
| Domain | Business logic or core product concepts | domains/<name>.md |
| Infrastructure | DB, cache, queue, external services, persistence | infra/<name>.md |
| API | HTTP, CLI, RPC, workers, public integration points | entrypoints.md or subsystem doc |
| Shared | Types, utilities, common libraries | architecture.md or a focused doc if central |
If classification is unclear, investigate before writing.
Look for verified patterns such as:
Only include patterns demonstrated in at least two files.
Bash:
mkdir -p ./.gtd/codebase/domains ./.gtd/codebase/infra
./.gtd/CODEBASE.mdThis file is the index only. Keep it short.
Required structure:
# Codebase Index
**Generated:** {date}
**Last Updated:** {date}
**Last Verified:** {date}
## Purpose
- One short paragraph summarizing the codebase.
- Include `Evidence: ...`
## Documentation Map
- [Architecture](./codebase/architecture.md) — overall structure and major subsystems
- [Entrypoints](./codebase/entrypoints.md) — application boot paths, commands, servers, workers
- [Patterns](./codebase/patterns.md) — verified conventions used across files
- [Open Questions](./codebase/open-questions.md) — unresolved items requiring later investigation
## Domain Docs
- [Domain: {name}](./codebase/domains/{name}.md) — one-line purpose
## Infrastructure Docs
- [Infra: {name}](./codebase/infra/{name}.md) — one-line purpose
./.gtd/codebase/architecture.mdRequired structure:
# Architecture
**Generated:** {date}
**Last Updated:** {date}
**Last Verified:** {date}
## Tech Stack
| Layer | Technology | Evidence |
| ----- | ---------- | -------- |
| Language | {value} | {path:line} |
| Runtime | {value} | {path:line} |
| Framework | {value} | {path:line} |
## Project Structure
{annotated tree or concise list}
Evidence: {paths and lines used}
## Major Subsystems
### {Subsystem Name}
- Type: {Domain | Infrastructure | API | Shared}
- Path: `{path}`
- Purpose: {verified sentence}
- Depends on: {verified dependencies}
- Used by: {verified callers or consumers}
- Evidence: {path:line, path:line}
./.gtd/codebase/entrypoints.mdRequired structure:
# Entrypoints
**Generated:** {date}
**Last Updated:** {date}
**Last Verified:** {date}
| Entrypoint | Type | File | Purpose | Evidence |
| ---------- | ---- | ---- | ------- | -------- |
| {name} | HTTP/CLI/Worker/Test/Script | `{file}` | {verified purpose} | {path:line} |
## Startup Flows
### {Flow Name}
1. {step}
2. {step}
Evidence: {path:line, path:line}
./.gtd/codebase/patterns.mdRequired structure:
# Patterns And Conventions
**Generated:** {date}
**Last Updated:** {date}
**Last Verified:** {date}
## Verified Patterns
### {Pattern Name}
- Description: {verified description}
- Why it appears to exist: {brief observation only if evidence supports it}
- Examples: `{path}`, `{path}`
- Evidence: {path:line, path:line}
./.gtd/codebase/open-questions.mdRequired structure:
# Open Questions
**Generated:** {date}
**Last Updated:** {date}
**Last Verified:** {date}
- {question}
- Why unresolved: {brief reason}
- Next place to inspect: `{path}` if known
For each meaningful domain or infrastructure area, create one focused file.
Domain doc template:
# Domain: {Name}
**Generated:** {date}
**Last Updated:** {date}
**Last Verified:** {date}
## Purpose
{verified summary}
Evidence: {path:line, path:line}
## Key Files
| File | Responsibility | Evidence |
| ---- | -------------- | -------- |
| `{file}` | {verified responsibility} | {path:line} |
## Important Flows
### {Flow Name}
1. {step}
2. {step}
Evidence: {path:line, path:line}
## Dependencies
- `{dependency/module}` — {verified relationship}. Evidence: {path:line}
Infrastructure doc template:
# Infrastructure: {Name}
**Generated:** {date}
**Last Updated:** {date}
**Last Verified:** {date}
## Purpose
{verified summary}
Evidence: {path:line, path:line}
## Interfaces
| File | Responsibility | Evidence |
| ---- | -------------- | -------- |
| `{file}` | {verified responsibility} | {path:line} |
## Integration Points
- `{caller or consumer}` — {verified connection}. Evidence: {path:line}
## Operational Notes
- Only include if directly supported by code or config.
- Each note must end with `Evidence: {path:line}`
On refresh:
Last Verified for every file you inspectedCODEBASE.md concise even if the repo grows<offer_next>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GTD ► CODEBASE OVERVIEW COMPLETE ✓
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Index written to ./.gtd/CODEBASE.md
Split docs written to ./.gtd/codebase/
| File Group | Items |
|------------|-------|
| Domain Docs | {N} |
| Infra Docs | {N} |
| Shared Docs | {N} |
─────────────────────────────────────────────────────
▶ Next Up
/spec — define what you want to build with codebase context available
─────────────────────────────────────────────────────
</offer_next>
<forced_stop> STOP. The workflow is complete. Do NOT automatically run the next command. Wait for the user. </forced_stop>
testing
manual trigger by user, do not auto invoke
tools
manual trigger by user, do not auto invoke
development
Trace execution paths and document how code actually behaves. Use when you need to understand how features work, walk through code flows, explain component behavior, trace where data comes from, understand relationships between components, or audit for orphaned events and dead code.
testing
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.