explain

explain is a command for coding agents from dykyi-roman/awesome-claude-code. It costs 49 tokens per session (1,791 once invoked), scanned A, original, MIT.

A code explanation command that describes structure, business logic, data flow, and architecture. It accepts files, folders, HTTP routes, or console commands and supports quick, deep, onboarding, business, and quality-assurance explanations.

In plain words
What is it for?
Use it to explain an API route, a command, a file, a directory, or an entire project, with the explanation focused on a chosen audience or question.
Why use it?
It helps you understand unfamiliar code and trace what happens without reading every part of the project first.

Command

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 commands/dykyi-roman/awesome-claude-code/explain
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

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/dykyi-roman/awesome-claude-code/explain.svg)](https://agentmods.dev/commands/dykyi-roman/awesome-claude-code/explain)
Your own site
<a href="https://agentmods.dev/commands/dykyi-roman/awesome-claude-code/explain"><img src="https://agentmods.dev/badge/commands/dykyi-roman/awesome-claude-code/explain.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00049 $0.01791
Opus 5 $0.00024 $0.00896
Sonnet 5 $0.00010 $0.00358
Haiku 4.5 $0.00005 $0.00179

Measured today against content hash 6a6e2229c7bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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.

commands/explain.md · 217 lines

How it starts

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

Code Explain Command

Explain code structure, business logic, data flows, and architecture patterns for any scope — from a single file to an entire project, HTTP route, or console command.

Input Parsing

Parse $ARGUMENTS to extract input, mode, and optional meta-instructions:

Format: <input> [mode] [-- instructions]

Arguments:
- input: File, directory, ".", HTTP route, or console command (required)
- mode: quick|deep|onboarding|business|qa (optional, auto-detected)
- -- instructions: Focus area or specific question (optional)

Input types (auto-detected):
1. HTTP route:    GET /api/orders
2. HTTP route:    POST /api/orders/{id}/status
3. Console cmd:   app:process-payments
4. Console cmd:   import:products
5. File path:     src/Domain/Order/Order.php
6. Directory:     src/Domain/Order/
7. Project root:  .

Examples:
- /acc:explain GET /api/orders
- /acc:explain POST /api/orders/{id}/status deep
- /acc:explain app:process-payments
- /acc:explain import:products -- explain data transformation pipeline
- /acc:explain src/Domain/Order/Order.php
- /acc:explain src/Domain/Order/
- /acc:explain . onboarding
- /acc:explain src/Payment business
- /acc:explain src/Domain/Order/ deep -- focus on state transitions
- /acc:explain . qa -- how does payment processing work?

Parsing rules:

  1. Split $ARGUMENTS by -- (space-dash-dash-space)
  2. First part = input + optional mode, Second part = meta-instructions
  3. Check if last word of first part is a valid mode (quick|deep|onboarding|business|qa)
  4. If valid mode found, extract it; everything else is the input
  5. If no mode specified, auto-detect based on input type

Input Type Detection

Before path validation, detect input type from the parsed input:

  1. If input matches ^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)\s+/input_type = "route"
  2. If input matches ^[a-z][a-z0-9_-]*:[a-z][a-z0-9:_-]*$input_type = "command"
  3. If test -f inputinput_type = "file"
  4. If test -d inputinput_type = "directory"
  5. If input = "." → input_type = "project"
  6. Otherwise → report error: "Invalid input. Provide a file/directory path, HTTP route (GET /path), or console command (namespace:name)."

Read the full file on GitHub · 217 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. today First seen · 217 lines · 0 tokens per session scan A 6a6e2229c7bc

Subscribe to this mod's changes

explain is a command published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 19d ago), licensed MIT. It adds 49 tokens to every session and 1,791 once invoked, about $0.0002 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-09-03.