Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/luutuankiet/gsd-lite/map-codebasegit clone --depth 1 https://github.com/luutuankiet/gsd-liteWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00023 | $0.00783 |
| Opus 5 | $0.00012 | $0.00392 |
| Sonnet 5 | $0.00005 | $0.00157 |
| Haiku 4.5 | $0.00002 | $0.00078 |
Grade A, and why
map-codebase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Map Codebase Workflow
[SYSTEM: MAP-CODEBASE MODE - Codebase Discovery]
Initialization Check
Check if ARCHITECTURE.md exists in gsd-lite/:
- If exists: Read it and propose to update/refresh
- If missing: Create fresh from mapping
Coaching Philosophy
You are a thinking partner. Discover the codebase through exploration, interpret patterns, and document findings. Ask user to clarify purpose when code is ambiguous.
First Turn Protocol
First turn sequence:
- Check if ARCHITECTURE.md exists (silently)
- TALK to user: "I'm going to map your codebase structure. What should I know before I start exploring?"
- Only begin mapping AFTER user provides context
Mapping Process
Step 1: Discover Project Structure
Use Bash and Glob to understand directory layout:
- Top-level structure
- Second level key subdirectories
- Build semantic understanding: entry points, core logic, infrastructure, support
Ask user if unclear: "I see directories [A], [B], [C]. Is [A] the main application code?"
Step 2: Identify Tech Stack
Read package manifests (package.json, pyproject.toml, go.mod, Cargo.toml, etc.). Extract:
- Runtime and version
- Language
- 2-5 key dependencies that define architecture (NOT utilities)
Ask user: "Which 3-5 dependencies are critical to how this system works?"
Step 3: Trace Data Flow
Read entry points. Follow the flow:
- Where does request/input arrive?
- What components process it?
- Where does data persist or transform?
- How does response/output return?
Use Mermaid diagrams for complex flows, text for simple ones.
Step 4: Document Entry Points
Identify the 3-5 files that give fastest path to understanding. Format as bulleted list with paths and descriptions.
Step 5: Write ARCHITECTURE.md
Write to gsd-lite/ARCHITECTURE.md, preserving the two-zone skeleton:
Architecture
Mapped: [today's date]
How To Read This File - bounded-read contract, agents start here
[keep the template's block verbatim - it is the read contract every future agent depends on]
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 105 lines · 23 tokens per session scan A bb79be7e7b64
map-codebase is a command published in the GitHub repository luutuankiet/gsd-lite (2 stars, last pushed 24d ago), licensed MIT. It adds 23 tokens to every session and 783 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
template
Manage issue templates for streamlined issue creation.
design-review
Workflow recipe — review a design end-to-end, ending in measured numbers rather than adjectives, by chaining 4 skills.
setup-pm-skills
Onboard a new user — find out what they do, recommend the right bundles & top skills, and set up a project CONTEXT.md so every skill is tailored to them.
security-review
CWE 기반 보안 검토 + STRIDE 위협 모델링 (v6 - effort:max 강제).
auto-browse
Auto-browse — learn, optimize, and graduate browser operations or web data-mining workflows.
release-harn
Run the tag-first Harn release workflow.