explain

explain is a command for Claude Code from NikiforovAll/claude-code-rules. It costs 0 tokens per session (528 once invoked), scanned A, original, Apache-2.0.

A command for explaining code, technical ideas, or system behavior at a level and in a format suited to the reader.

In plain words
What is it for?
Analyzing code or systems, explaining concepts progressively, adding examples or diagrams, and consulting framework documentation when needed.
Why use it?
It turns difficult technical material into a structured explanation instead of assuming the reader already understands it.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: names the TodoWrite tool; positional $N argument.

Part of the handbook-extras plugin — 7 commands, 4 agents shipped together

Good fit Analyzing code or systems, explaining concepts progressively, adding examples or diagrams, and consulting framework documentation when needed.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nikiforovall/claude-code-rules/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/NikiforovAll/claude-code-rules

Made for: Claude Code.

Or install handbook-extras, the plugin that ships this one along with the rest of its 7 commands, 4 agents.

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/nikiforovall/claude-code-rules/explain/github.svg)](https://agentmods.dev/commands/nikiforovall/claude-code-rules/explain)
Your own site
<a href="https://agentmods.dev/commands/nikiforovall/claude-code-rules/explain"><img src="https://agentmods.dev/badge/commands/nikiforovall/claude-code-rules/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/nikiforovall/claude-code-rules/explain"><img src="https://agentmods.dev/badge/commands/nikiforovall/claude-code-rules/explain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 528 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.00000 $0.00528
Opus 5.5 $0.00000 $0.00211
Sonnet 5.5 $0.00000 $0.00106
Haiku 4.5 $0.00000 $0.00053

Measured 1mo ago against content hash 0dfb78b7f18d, 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 1mo 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/handbook-extras/commands/explain.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.

Target: $1, Level : $2, Format : $3, Context : $4

Behavioral Flow

  1. Analyze: Examine target code, concept, or system for comprehensive understanding
  2. Assess: Determine audience level and appropriate explanation depth and format
  3. Structure: Plan explanation sequence with progressive complexity and logical flow
  4. Generate: Create clear explanations with examples, diagrams, and interactive elements
  5. Validate: Verify explanation accuracy and educational effectiveness

Key behaviors:

  • Framework-specific explanations via Context7 integration via MCP
  • Adaptive explanation depth based on audience and complexity

Tool Coordination

  • Read/Grep/Glob: Code analysis and pattern identification for explanation content
  • TodoWrite: Progress tracking for complex multi-part explanations
  • Task: Delegation for comprehensive explanation workflows requiring systematic breakdown

Key Patterns

  • Progressive Learning: Basic concepts → intermediate details → advanced implementation
  • Framework Integration: Context7 documentation → accurate official patterns and practices
  • Multi-Domain Analysis: Technical accuracy + educational clarity + security awareness
  • Interactive Explanation: Static content → examples → interactive exploration

Examples

Basic Code Explanation

/explain authentication.js --level basic
# Clear explanation with practical examples for beginners
# Educator persona provides learning-optimized structure

Framework Concept Explanation

/explain react-hooks --level intermediate --context react
# Structured explanation with progressive complexity

System Architecture Explanation

/explain microservices-system --level advanced --format interactive
# Architect persona explains system design and patterns
# Interactive exploration with Sequential analysis breakdown

Security Concept Explanation

/explain jwt-authentication --context security --level basic
# Security persona explains authentication concepts and best practices
# Framework-agnostic security principles with practical examples

Read the full file on GitHub · 69 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. 1mo ago First seen · 69 lines · 0 tokens per session scan A 0dfb78b7f18d

Subscribe to this mod's changes

explain is a command published in the GitHub repository NikiforovAll/claude-code-rules (141 stars, last pushed 15d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 528 tokens. 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.