exploring-a-codebase

A method for understanding an unfamiliar codebase before changing it. It covers the project layout, entry points, relevant code, callers, and local conventions.

In plain words
What is it for?
Use it when joining a project or starting a change to find how the software runs, locate the code responsible for a behavior, and understand how it is tested and structured.
Why use it?
It reduces the risk of editing the wrong file or breaking code that depends on the behavior.

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/new1direction/korgex/exploring-a-codebase
Any agent
npx skills add New1Direction/korgex --skill exploring-a-codebase
Clone the repo
git clone --depth 1 https://github.com/New1Direction/korgex

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 286 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.00020 $0.00286
Opus 5 $0.00010 $0.00143
Sonnet 5 $0.00004 $0.00057
Haiku 4.5 $0.00002 $0.00029

Measured 2d ago against content hash 5f0265b93437, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

exploring-a-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 2d 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.

src/skills_builtin/exploring-a-codebase/SKILL.md · 24 lines

What it actually says

Don't edit code you haven't located in context. A few minutes mapping prevents editing the wrong file or breaking a caller you didn't know about.

  1. Orient. Read README/AGENTS.md, the project config (pyproject/package.json/ Cargo.toml), and the directory layout. Learn how it's built, tested, and run.
  2. Find the entrypoints. Locate where execution starts and the main modules. Glob for structure, Grep for symbols.
  3. Trace to the target. For a change, find the exact code that owns the behaviour — search by symbol/string, read the function AND its callers. Confirm you've found the real source, not a generated/duplicated copy.
  4. Learn the conventions. Note the existing patterns (naming, error handling, test layout, comment density) so your change reads like the surrounding code.
  5. For broad exploration, delegate. If mapping spans many files, dispatch a subagent (see delegating-to-subagents) to sweep and report, keeping your context focused.
  6. Only then edit — and read a file fully before you Edit it.
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. 2d ago First seen · 24 lines · 20 tokens per session scan A 5f0265b93437

Subscribe to this mod's changes

exploring-a-codebase is a skill published in the GitHub repository New1Direction/korgex (5 stars, last pushed 2mo ago), licensed MIT. It adds 20 tokens to every session and 286 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.