explain

explain is a command for Claude Code from gkaria/vibe-learn. It costs 29 tokens per session (907 once invoked), scanned B, original, MIT.

A guided tour command for a file or subsystem changed during the current coding session. It explains the entry point, important parts, boundaries, and connections between them.

In plain words
What is it for?
Use it after coding work to review the main files touched, understand how a subsystem fits together, and mark concepts as learned.
Why use it?
It helps you understand unfamiliar or newly changed code without tracing every file manually. It can use the session log and a cross-session knowledge record when those are available.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

Part of the vibe-learn plugin — 5 skills, 4 commands shipped together

Good fit Use it after coding work to review the main files touched, understand how a subsystem fits together, and mark concepts as learned.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/gkaria/vibe-learn/explain
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.

Clone the repo
git clone --depth 1 https://github.com/gkaria/vibe-learn

Made for: Claude Code.

Or install vibe-learn, the plugin that ships this one along with the rest of its 5 skills, 4 commands.

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

agentmods badge for explain

README.md
[![agentmods](https://agentmods.dev/badge/commands/gkaria/vibe-learn/explain/github.svg)](https://agentmods.dev/commands/gkaria/vibe-learn/explain)
Your own site
<a href="https://agentmods.dev/commands/gkaria/vibe-learn/explain"><img src="https://agentmods.dev/badge/commands/gkaria/vibe-learn/explain/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.

agentmods 80×15 button for explain

Your own site · 80×15
<a href="https://agentmods.dev/commands/gkaria/vibe-learn/explain"><img src="https://agentmods.dev/badge/commands/gkaria/vibe-learn/explain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 907 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00029 $0.00907
Opus 5 $0.00015 $0.00453
Sonnet 5 $0.00006 $0.00181
Haiku 4.5 $0.00003 $0.00091

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

Security

Grade B, and why

explain scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

3. The install directory this project's hooks point at: read the vibe-learn hook command from `.claude/settings.local.json` (or `~/.claude/settings.json`) — it ends in `<install-dir>/scripts/bootstrap.sh`, and `knowledge
.claude/commands/explain.md · 57 lines

How it starts

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

Read .vibe-learn/session-log.jsonl to see what this session touched and why (the user_prompt events carry the intent). Read .vibe-learn/knowledge.json if it exists (the cross-session knowledge ledger).

Knowledge helper: to mark concepts as seen, use the knowledge.sh helper via Bash — never hand-edit the JSON. Locate it in this order:

  1. vibe-learn-knowledge on PATH (plugin install — check with command -v vibe-learn-knowledge)
  2. ~/.vibe-learn/scripts/knowledge.sh (global install)
  3. The install directory this project's hooks point at: read the vibe-learn hook command from .claude/settings.local.json (or ~/.claude/settings.json) — it ends in <install-dir>/scripts/bootstrap.sh, and knowledge.sh sits in the same directory
  4. scripts/knowledge.sh in the vibe-learn repo, if this project is the vibe-learn repo itself

If none of these exist, skip the ledger step silently — the tour itself still works.

Parse $ARGUMENTS to pick the target:


Target: none

If $ARGUMENTS is empty: tour the most significant file or subsystem this session touched. Prefer, in order: a newly created file that other touched files import; the file edited most often; the file behind the goal stated in the last user_prompt. Say which one you picked and why in one line.

Target: <file>

If $ARGUMENTS names a path that exists: tour that file.

Target: <topic>

Otherwise treat $ARGUMENTS as a topic (e.g. auth flow, the retry logic): find the files behind it — start from the session log, then grep the codebase — and tour them as one subsystem. If nothing matches, say so and list what the session did touch.


Tour structure (all targets)

Read the target file(s) and their immediate callers and callees before writing anything. Walk the code top-down as a colleague would at a whiteboard:

  1. Entry point — where execution starts and what triggers it (a request, a hook event, a CLI call, an import).
  2. The spine — the 3–5 load-bearing pieces, in execution order. For each, say why it is there, not just what it does. Quote the real line with a path:line reference.
  3. The edges — error paths, ordering constraints, defaults, and anything that would break if rearranged or removed.
  4. Connections — what calls this, what this calls, and where a change here would ripple.

Read the full file on GitHub · 57 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. yesterday First seen · 57 lines · 29 tokens per session scan B edf72db63649

Subscribe to this mod's changes

explain is a command published in the GitHub repository gkaria/vibe-learn (54 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 907 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.