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 skills add OKHP3/skillz --skill codebase-discoverygit clone --depth 1 https://github.com/OKHP3/skillzWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/okhp3/skillz/codebase-discovery)<a href="https://agentmods.dev/skills/okhp3/skillz/codebase-discovery"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/codebase-discovery/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/okhp3/skillz/codebase-discovery"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/codebase-discovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00108 | $0.02502 |
| Opus 5.5 | $0.00043 | $0.01001 |
| Sonnet 5.5 | $0.00022 | $0.00500 |
| Haiku 4.5 | $0.00011 | $0.00250 |
Grade A, and why
codebase-discovery 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 2mo ago.
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 — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). It identifies the codebase (or subsystem) to analyse and, optionally, the mode.
Purpose
Reverse-engineer enough business and domain knowledge out of an existing codebase to onboard a new team member — human or AI — and to give AI harness tooling (e.g. Spec Kit) the context it needs before any specification or change work begins.
The output is a small, lean set of onboarding documents under docs/, not a
comprehensive knowledge base. Each document is written so it can be linked from a
CLAUDE.md / AGENTS.md without consuming an unreasonable amount of context.
This skill is the orchestrator. It runs five phases, each defined in its own playbook
under playbooks/. Read and follow the relevant playbook at each phase.
Core principle
The code is ground truth for what the system does. Only people hold the why.
So the method is: mine the code first to form evidence-backed hypotheses, then spend the human's time validating intent and explaining, not re-deriving mechanics. Existing docs (README, CLAUDE.md, AGENTS.md, wikis) are a valuable starting point, but because documentation naturally drifts from code over time, the source code is the source of truth — everything is verified against it before being relied on.
Roles
Adopt the role that fits the phase:
- Recon / synthesis: act as a Senior Software Engineer + Solution Architect reading the system as-is. Understanding existing architecture is in scope; designing new architecture or proposing changes is not, unless explicitly asked.
- Interview: act as a Senior Business Analyst supported by a Product Manager. Understand business intent, users, rules and domain language.
Modes
Determine the mode from the user input (default to full and confirm):
- full — Pre-check → Recon → Interview → Synthesis → Verify. Requires a stakeholder (senior BA / Product Owner / SME) to validate findings.
- code-only — Pre-check → Recon → Synthesis → Verify, with no interview.
Everything that would need human confirmation is emitted as
[assumption]/[unverified]for later validation. Use when no SME is available yet.
What ships with it
27 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- playbooks/00-pre-check.md 3.2 KB
- playbooks/01-deep-recon.md 6.8 KB
- playbooks/02-interview.md 3.9 KB
- playbooks/03-synthesis.md 6.0 KB
- playbooks/04-verification.md 2.6 KB
- README.md 5.8 KB
- references/code-intelligence.md 4.7 KB
- references/lsp-mcp/claude-code.mcp.json 601 B
- references/lsp-mcp/config.yaml 1.2 KB
- references/output-conventions.md 3.9 KB
- references/provenance-and-status.md 2.9 KB
- references/question-bank.md 3.3 KB
- references/recon-heuristics.md 3.9 KB
- templates/agent-onboarding-file.md 1.6 KB
- templates/assumptions-register.md 854 B
- templates/business-requirements.md 1.4 KB
- templates/business-rules.md 933 B
- templates/current-architecture.md 1.2 KB
- templates/discovery-state.md 1.1 KB
- templates/domain-glossary.md 741 B
- templates/domain-model.md 994 B
- templates/integrations.md 988 B
- templates/project-readme.md 2.0 KB
- templates/recon-manifest.md 1018 B
- templates/traceability-index.md 590 B
- templates/user-personas.md 815 B
- templates/workflows.md 939 B
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.
- 2mo ago First seen · 207 lines · 108 tokens per session scan A ab813652857a
codebase-discovery is a skill published in the GitHub repository OKHP3/skillz (4 stars, last pushed 3d ago), licensed MIT. It adds 108 tokens to every session and 2,502 once invoked, about $0.0004 per session on Opus 5.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-09-03.
codebase-discovery compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| codebase-discoveryOKHP3/skillz | Skill | 4 | 3d ago | MIT | A | 108 | Claude Code |
| baoyu-comicJimLiu/baoyu-skills | Skill | 28k | 10d ago | MIT | A | 61 | Claude Code |
| anatomyanbeime/skill | Skill | 10k | yesterday | none | A | 230 | Codex |
| anything2explaineranbeime/skill | Skill | 10k | yesterday | none | A | 209 | Claude Code, Codex |
| cy-carouselanbeime/skill | Skill | 10k | yesterday | none | A | 178 | Claude Code, Codex |
| kb-to-mptanbeime/skill | Skill | 10k | yesterday | none | A | 102 | Claude Code, Codex |
| pm-career-coachkonglong87/superPM | Skill | 96 | 1mo ago | MIT | A | 46 | Claude Code |