code-explainer

A visual guide for understanding an unfamiliar codebase through architecture diagrams, code-flow tracing, and focused explanations.

In plain words
What is it for?
Finding entry points, understanding project structure, tracing important flows, and exploring a codebase from a broad overview to specific details.
Why use it?
It gives a newcomer a map of the project before asking them to follow individual files or execution paths.

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/christyjacob4/claude-tricks/code-explainer
Any agent
npx skills add christyjacob4/claude-tricks --skill code-explainer
Clone the repo
git clone --depth 1 https://github.com/christyjacob4/claude-tricks

Made for: Claude Code, Codex.

Per session 236 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,625 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.00236 $0.02625
Opus 5 $0.00118 $0.01313
Sonnet 5 $0.00047 $0.00525
Haiku 4.5 $0.00024 $0.00263

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

Security

Grade A, and why

code-explainer 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.

skills/code-explainer/SKILL.md · 239 lines

How it starts

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

Codebase Explainer

You help users understand codebases they're seeing for the first time. You create clear, visual explanations using ASCII diagrams and progressive exploration — starting with the big picture and letting users drill into specific flows.

The core idea: treat the codebase like a map. First show the terrain from above, then let the user zoom into any road they want to travel.

Two Modes

  1. Overview mode (default) — scan the codebase, present architecture, entrypoints, and available flows
  2. Deep-dive mode — user picks a flow, you trace it in detail with diagrams and code references

Phase 1: Discovery

Scan the codebase to build a mental model. Be efficient — don't read every file. Read strategically.

What to look at first (in rough priority order):

  1. Directory structure (top 2-3 levels)
  2. Package/config files (package.json, pyproject.toml, Cargo.toml, go.mod, Makefile, docker-compose.yml, settings.py, pom.xml, etc.)
  3. README (skim for architecture notes, not usage instructions)
  4. Entrypoint files (main.*, index.*, app.*, server.*, cli.*, __main__.py, route definitions, cmd/ directories)
  5. Key structural directories (src/, lib/, cmd/, api/, routes/, handlers/, models/, services/, core/)

Entrypoint detection heuristics:

  • Scripts defined in package managers (npm scripts, pyproject scripts, Makefile targets)
  • Files with if __name__ == "__main__", func main(), public static void main
  • HTTP server setup, route registration, WSGI/ASGI app creation
  • CLI argument parsing (argparse, click, cobra, clap)
  • Event handlers, queue consumers, cron jobs, lambda handlers
  • Exported modules that serve as the public API surface

Sizing the codebase: Get a rough sense of scale early. This determines how deep you go in the overview:

  • Small (< ~20 files): You can be thorough
  • Medium (20-100 files): Focus on the critical paths, mention the rest
  • Large (100+ files): Stay high-level in overview, offer many sub-paths to explore

Read the full file on GitHub · 239 lines

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 · 239 lines · 236 tokens per session scan A 23c9d7fb3bb2

Subscribe to this mod's changes

code-explainer is a skill published in the GitHub repository christyjacob4/claude-tricks (2 stars, last pushed 4mo ago), licensed MIT. It adds 236 tokens to every session and 2,625 once invoked, about $0.0012 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.