codebase-understanding

A source-based codebase question-answering workflow that supports every factual claim with a file and line reference.

In plain words
What is it for?
Use it to find which components publish events, which files handle payment authorization, or where particular code behavior is implemented.
Why use it?
It prevents guesses about how a repository works and reports insufficient evidence when the source does not support an answer.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/hellothisworld/agent-skill-verification-template/codebase-understanding
Any agent
npx skills add HelloThisWorld/agent-skill-verification-template --skill codebase-understanding
Clone the repo
git clone --depth 1 https://github.com/HelloThisWorld/agent-skill-verification-template

Made for: Claude Code, Codex.

Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 552 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00041 $0.00552
Opus 5 $0.00020 $0.00276
Sonnet 5 $0.00008 $0.00110
Haiku 4.5 $0.00004 $0.00055

Measured yesterday against content hash f6281f37d4e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codebase-understanding 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.

skills/codebase-understanding/SKILL.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codebase Understanding

A Claude-style skill that answers natural-language questions about a codebase and backs every claim with file:line evidence. It is designed to be verified like a production component — see skill-contract.json for the machine-readable contract and verification-rules.md for how outputs are graded.

When to use

Use this skill to answer questions such as "Which component publishes UserCreatedEvent?" or "Which file handles payment authorization?" against a known repository (here, the fixture repo under fixtures/sample-repo).

Tools

Tool Purpose
repo_search Case-insensitive substring search. Returns {file, line, text} matches.
read_file Read a file by repo-relative path to confirm evidence.

Contract rule: repo_search must be used before read_file.

Procedure

  1. Identify the key symbols/keywords in the question.
  2. Use repo_search to locate candidate evidence.
  3. Use read_file to confirm the strongest candidate.
  4. Produce a structured answer where every claim cites a real file:line.
  5. If the evidence is missing or ambiguous, return insufficient_evidence with an empty claims array. Never invent an answer or a citation.

Output contract

The skill must return JSON with:

  • status: answered | insufficient_evidence | refused
  • answer: a short natural-language answer
  • claims: array of { text, citations: [{ file, line }] }
  • toolCalls: array of { tool, arguments }
  • confidence (optional): low | medium | high

See examples.md for concrete input/output pairs.

Design note: contract vs. model

This SKILL.md and the contract are model-independent — they describe what a correct answer looks like. How reliably a given model satisfies the contract (pass rate, latency, cost, failure modes) is measured separately by the eval harness and will differ per model. The offline mock adapter is a reference implementation that satisfies the contract deterministically.

Read the full file on GitHub · 61 lines

Files

What ships with it

3 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.

Changes

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.

  1. yesterday First seen · 61 lines · 41 tokens per session scan A f6281f37d4e7

Subscribe to this mod's changes

codebase-understanding is a skill published in the GitHub repository HelloThisWorld/agent-skill-verification-template (1 stars, last pushed 9d ago), licensed MIT. It adds 41 tokens to every session and 552 once invoked, about $0.0002 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.