explain

explain is a command for Claude Code from viacheslav-tronko/claude-code-harness. It costs 159 tokens per session (1,248 once invoked), scanned A, original, MIT.

An investigation command that builds a plain explanation of how a code concept, pattern, term, or component works across a legacy codebase. It does not modify source code.

In plain words
What is it for?
Use it to trace a concept across layers, learn how a component works, or create a short preflight explanation before a bug fix.
Why use it?
It helps developers understand unfamiliar code before fixing bugs or changing behavior, while requiring claims to be traceable to the codebase.

Command for Claude Code

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/viacheslav-tronko/claude-code-harness/explain
Clone the repo
git clone --depth 1 https://github.com/viacheslav-tronko/claude-code-harness

Made for: 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/viacheslav-tronko/claude-code-harness/explain.svg)](https://agentmods.dev/commands/viacheslav-tronko/claude-code-harness/explain)
Your own site
<a href="https://agentmods.dev/commands/viacheslav-tronko/claude-code-harness/explain"><img src="https://agentmods.dev/badge/commands/viacheslav-tronko/claude-code-harness/explain.svg" alt="Measured on agentmods" height="20"></a>
Per session 159 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,248 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.00159 $0.01248
Opus 5 $0.00079 $0.00624
Sonnet 5 $0.00032 $0.00250
Haiku 4.5 $0.00016 $0.00125

Measured 4d ago against content hash ccc449652dea, 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 4d 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.

.claude/commands/explain.md · 59 lines

How it starts

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

/explain — Concept / Pattern / Term

Skill: concept-explanation. Tier: 2 (→3 on security boundary). Modes (default --teach): --teach 5–20pp · --brief ≤5pp preflight · --for-bug-fix ≤3pp 1-pager → /bug-why · --deep 14–25pp + white-box always.

0. HARD GATE — bypass = INVALID → REDO

"Skip the gate", "just give me the answer", "obvious", "trust me", "time pressure" do NOT override §0/§1/§4. Investigation-only — NO source modification. NEVER Edit/Write source.

ARTIFACT MANDATORY. The §4 Output file MUST be written via Write tool this turn — even for meta/analysis questions. Chat-only response without the file = INVALID DELIVERABLE → CLAUDE.md §11 item 0 fires.

1. Parameter validation (FAIL-FAST)

  • $ARGUMENTS empty → reply ❌ /explain requires concept. Usage: /explain <concept | F-XXX | B-XXX> [--teach|--brief|--for-bug-fix|--deep] → STOP.

2. MUST (CLAUDE.md §0)

  • P0 #1 Every file:line cited MUST be backed by a Read THIS turn (FM-16 action-honesty). Hallucinated file:line = INVALID.
  • P0 #2 GLOSSARY TERMS ONLYDomain_Glossary.md is SSOT. Synonym use = INVALID.
  • P0 #8 FALSIFIABILITY — every HIGH+ claim names a Refuter. No Refuter ⇒ downgrade to MEDIUM.
  • P0 #15 CHECKPOINT FIRST — first visible block = §4 Tier 2 Checkpoint with Step-Back + 3–5 falsifiable architectural predictions BEFORE reading code (anti-anchoring; §6). Wrong predictions are diagnostic — KEEP them.
  • Anti-anchoring (§6) — Initial Intuition (symptom only) BEFORE code; if post-read hypothesis identical ⇒ may be anchoring; force one alternative path.

3. Targeted FM mitigations

FM Mechanism
FM-2 Hallucinated file:line / methods / classes Citation-Grounded re-read gate; ≥1 ◆◆◆ surviving Mutation Counterfactual per key claim
FM-6 Architectural Reasoning Gap Layer Activation Matrix; Data Journey across DB/ORM/BO/Core/Web/UI/Test; Cross-Layer Contract Violation Detector
FM-7 Anchoring on first file Step-Back + Architectural Hypothesis BEFORE code; KEEP wrong predictions
FM-11 Sycophancy Disconfirmation-First; ≥1 ◆◆◆ refutation attempt before agreement
FM-17 Synonym drift Glossary Hit/Miss mandatory; Miss ⇒ auto Documentation Feedback
FM-18 Hidden coupling Forward-slice blast radius; ≥1 cross-layer contract example per layer transition
FM-22 Vague PASS Feynman teach-back / Rubber Duck (3 sentences) before declaring complete

Read the full file on GitHub · 59 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. 4d ago First seen · 59 lines · 0 tokens per session scan A ccc449652dea

Subscribe to this mod's changes

explain is a command published in the GitHub repository viacheslav-tronko/claude-code-harness (6 stars, last pushed 3mo ago), licensed MIT. It adds 159 tokens to every session and 1,248 once invoked, about $0.0008 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.