explaining-codebases

A method for explaining how a real codebase is structured and how its parts work together. A codebase is the collection of source files that make up a software project.

In plain words
What is it for?
Use it to create onboarding guides for an entire repository or detailed walkthroughs of one feature, algorithm, or subsystem. It can show architecture, data flow, execution traces, and annotated code paths.
Why use it?
New contributors often need a map of modules, data flow, and execution paths before they can work safely. This method bases the explanation on the repository’s actual code rather than a generic description.

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/analyticalmonk/explain-this/explaining-codebases
Any agent
npx skills add analyticalmonk/explain-this --skill explaining-codebases
Clone the repo
git clone --depth 1 https://github.com/analyticalmonk/explain-this

Made for: Claude Code, Codex.

Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,054 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.00084 $0.01054
Opus 5 $0.00042 $0.00527
Sonnet 5 $0.00017 $0.00211
Haiku 4.5 $0.00008 $0.00105

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

Security

Grade A, and why

explaining-codebases 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/explaining-codebases/SKILL.md · 69 lines

How it starts

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

Explaining Codebases

Overview

This skill explains code as it actually exists - a repository, a service, or a set of source files. The output is the same distill-style, single self-contained interactive explainer that creating-explainers produces. What differs is the intake (navigating real code instead of reading a paper) and the figure types (architecture diagrams, data-flow, execution traces, annotated code walkthroughs). It handles both onboarding overviews of a whole codebase and deep-dives on one mechanism.

Required Background

REQUIRED: Use creating-explainers for everything about the output - the HTML template, voice and style, base figure archetypes, color palettes, the outline/scaffold/prose/polish workflow, and the quality checklist. This skill only adds what is specific to code. Do not duplicate that material here.

When to Use

Use when the subject is code:

  • Architecture / onboarding overview - how a project is structured: its modules, how data flows between them, the key abstractions, how the pieces fit. For a new contributor who needs the map.
  • Single-mechanism deep-dive - how one algorithm, feature, or subsystem works, traced through the real implementation.

The skill picks the angle from the request and confirms it with the user during intake (overview and deep-dive want different figures and different depth).

When NOT to use: a paper, a topic, or any non-code source. Use creating-explainers instead.

Code Intake

See references/code-intake.md. In short: pick the angle, navigate the repository to find entry points and module structure, identify the spine concept (the one path or idea the article tracks), map the architecture, and pull real code snippets anchored to path:line. Quote actual code; never paraphrase code as if quoting it.

Code-Specific Figures

See references/code-figure-archetypes.md for the patterns:

  • Architecture / module diagram - modules as boxes, dependencies as arrows
  • Data-flow / sequence diagram - an item (request, message, token) moving through stages
  • Execution-trace stepper - step through an algorithm with state and the current line highlighted
  • Annotated code walkthrough - a code block whose lines reveal annotations as you step or hover

Read the full file on GitHub · 69 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. 2d ago First seen · 69 lines · 84 tokens per session scan A 6d52de745455

Subscribe to this mod's changes

explaining-codebases is a skill published in the GitHub repository analyticalmonk/explain-this (19 stars, last pushed 1mo ago), licensed MIT. It adds 84 tokens to every session and 1,054 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

ego-browser

Skill "ego-browser" from citrolabs/ego-lite, covering ego-browser, quick start, common helpers, task spaces and control handoff.

citrolabs/ego-lite · 210 tokens

temporal-developer

Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust. Use when the user is building workflows, activities, or workers with a Temporal SDK, debugging issues like non-determinism errors, stuck workflows, or activity retries, using Temporal CLI, Temporal Server, or…

temporalio/skill-temporal-developer · 161 tokens

review-loop

Bounded review-apply-resolve convergence loop for a GitHub PR (draft PRs are fine). Runs up to N=5 iterations of pr-reviewer → implement-suggestion (--resolve-all) → polish simplify, converging until every review thread is resolved — through a fix OR a reply (answered question, recorded rationale) — so the PR is left…

mthines/agent-skills · 373 tokens

create-pr

Generate a short, narrative GitHub pull request description (≤ 25 lines, hard ceiling 40), push the branch, open the PR as a draft, then run the review-loop skill for a bounded review-apply-simplify convergence before finalizing. The review-loop (pr-reviewer → implement-suggestion → polish simplify, up to 5…

mthines/agent-skills · 260 tokens

autonomous-workflow

Execute complete feature development cycles autonomously — from task intake through tested PR delivery — using isolated Git worktrees. Phase-based workflow (0–7) with optional companion skills for planning, quality gates, TDD, UX, code quality, docs, and CI verification. Companions skip silently if not installed.…

mthines/agent-skills · 104 tokens

aw-create-plan

Create the plan artifact (plan.md + checks.yaml executable acceptance checks) in .agent/{branch}/ from the current conversation context. Captures all Phase 0-1 discussion into a structured, self-contained document that enables context recovery and session handoff. On every invocation, writes plan.md and re-derives…

mthines/agent-skills · 150 tokens