explain

explain is a command for Claude Code from shdennlin/agent-plugins. It costs 41 tokens per session (2,461 once invoked), scanned A, original, MIT.

An explanation command that investigates code or a technical question and produces a self-contained HTML explanation.

In plain words
What is it for?
Use it to explain the current conversation, a file, a code symbol, or a free-form technical question for a chosen audience.
Why use it?
It turns an unfamiliar code path, design, change, or bug into an understandable account of how it works and why.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the digest plugin — 3 skills, 3 commands shipped together

Good fit Use it to explain the current conversation, a file, a code symbol, or a free-form technical question for a chosen audience.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add shdennlin/agent-plugins
Claude Code
/plugin install digest

Made for: Claude Code.

Or install digest, the plugin that ships this one along with the rest of its 3 skills, 3 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/shdennlin/agent-plugins/explain/github.svg)](https://agentmods.dev/commands/shdennlin/agent-plugins/explain)
Your own site
<a href="https://agentmods.dev/commands/shdennlin/agent-plugins/explain"><img src="https://agentmods.dev/badge/commands/shdennlin/agent-plugins/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/shdennlin/agent-plugins/explain"><img src="https://agentmods.dev/badge/commands/shdennlin/agent-plugins/explain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,461 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00041 $0.02461
Opus 5.5 $0.00016 $0.00984
Sonnet 5.5 $0.00008 $0.00492
Haiku 4.5 $0.00004 $0.00246

Measured 5d ago against content hash 5441932ec81a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

explain 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 5d 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.

plugins/digest/commands/explain.md · 162 lines

How it starts

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

Explain Command

Turn an investigation into understanding. explain covers the current state — what something is, how it works end-to-end, why it was designed this way, where a bug comes from — and a change — what a pull request, a branch, or the current branch does and why.

  • Default, every target (path, symbol, question, #PR, branch, current branch, the conversation's findings): a self-contained HTML explainer; the reply is a short conclusion plus the file path.
  • --print: the answer in the chat and no file: a card for a change target, a concise answer for a state target.
  • --teach: a short, read-only lesson in chat.

MANDATORY FIRST STEP — DO NOT SKIP

You MUST run this BEFORE doing anything else. The script parses the arguments, classifies the target, and prints a JSON object. Never classify the target or parse flags yourself.

"${CLAUDE_PLUGIN_ROOT}/scripts/classify-target.sh" <<'DIGEST_EXPLAIN_ARGS_9f3a'
$ARGUMENTS
DIGEST_EXPLAIN_ARGS_9f3a

If the script exits non-zero, show its stderr verbatim and stop. If --help or -h was in the arguments, the script prints the help text and exits 0. Show it verbatim and stop.

The JSON has: audience, teach, print, forced, target, kind (file | pr | branch | symbol | question | empty), slug, resolved_line, branch, base, on_base, diff_empty, gh_ok.

Instructions

Step 1: Say how the target was read

Print resolved_line as the first line of your reply, unchanged. (For empty, print the line from the stage you land on in Step 2.)

Step 2: Select the mode

  1. teach is true → Teach mode (inline). Read the Teach mode section of ${CLAUDE_PLUGIN_ROOT}/skills/explain/SKILL.md and follow it with the JSON. Reply in chat and stop.
  2. kind is empty → three stages, first match wins:
    1. The current conversation contains an investigation, finding, or analysis worth explaining → print 解析為:conversation, then Conversation mode.
    2. Else, on_base is false, base is not empty, and diff_empty is false → print 解析為:current-branch <branch> vs <base>, then Change mode with target kind current-branch and target HEAD.
    3. Else print exactly this and stop (no file, no dispatch): Nothing to explain from this conversation yet. Pass a path, symbol, question, #PR, or branch: /digest:explain <target>
  3. kind is pr and gh_ok is false → print this and stop: gh is unavailable or not logged in, so PR #<n> cannot be read. Pass the branch name instead: /digest:explain <branch>
  4. kind is branch and base is empty → print this and stop: No base branch (develop or main) found, so <target> cannot be compared. Ask a question about it instead: /digest:explain "<question>"
  5. kind is branch and (on_base is true or diff_empty is true) → print this and stop: <target> has no changes against <base>, so there is nothing to summarize.
  6. kind is pr or branch → Change mode.
  7. kind is file, symbol, or question → Investigation mode (state target).

Read the full file on GitHub · 162 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. 5d ago Changed · +14 lines · +10 tokens per session 5441932ec81a
  2. 20d ago Changed · +23 lines 2e9127d8eacd
  3. 3mo ago First seen · 125 lines · 31 tokens per session scan A 18f2c9bb185d

Subscribe to this mod's changes

explain is a command published in the GitHub repository shdennlin/agent-plugins (3 stars, last pushed 5d ago), licensed MIT. It adds 41 tokens to every session and 2,461 once invoked, about $0.0002 per session on Opus 5.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.

Related

explain compared with commands from other repositories

explain next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
explainshdennlin/agent-pluginsCommand35d agoMITA41Claude Code
prep-rolefourleafai/clover-publicCommand810d agoMITA0Claude Code
start-10-1minicoohei/ai-agent-campCommand3461mo agononeA2Claude Code
start-0-8minicoohei/ai-agent-campCommand3461mo agononeA2Claude Code
start-1kimsanguine/AI_PMCommand595d agononeA0Claude Code
startruvnet/flow-nexusCommand10824d agononeA0Claude Code
setup-vercel.esminicoohei/ai-agent-campCommand3461mo agononeB2Claude Code