explain

explain is a skill for Claude Code, Codex from thoughtbot/rails-consultant. It costs 45 tokens per session (1,073 once invoked), scanned A, original, MIT.

A guide for explaining code or a user-facing software flow in plain language. It covers both close explanations of files, classes, and methods and short overviews of flows such as password resets or checkout.

In plain words
What is it for?
Use it when someone asks what a file, class, method, or feature does, so the explanation covers its outcome, reasoning, and operation in an understandable order.
Why use it?
It gives a consistent way to explain what code does and why, including checking recent Git history for context before describing the implementation.

Skill for Claude CodeCodex

Part of the rails-consultant plugin — 12 skills shipped together

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 skills/thoughtbot/rails-consultant/explain
Any agent
npx skills add thoughtbot/rails-consultant --skill explain
Clone the repo
git clone --depth 1 https://github.com/thoughtbot/rails-consultant

Made for: Claude Code, Codex.

Or install rails-consultant, the plugin that ships this one along with the rest of its 12 skills.

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/skills/thoughtbot/rails-consultant/explain.svg)](https://agentmods.dev/skills/thoughtbot/rails-consultant/explain)
Your own site
<a href="https://agentmods.dev/skills/thoughtbot/rails-consultant/explain"><img src="https://agentmods.dev/badge/skills/thoughtbot/rails-consultant/explain.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,073 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.00045 $0.01073
Opus 5 $0.00023 $0.00536
Sonnet 5 $0.00009 $0.00215
Haiku 4.5 $0.00005 $0.00107

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

skills/explain/SKILL.md · 99 lines

How it starts

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

Behavior

Explain $ARGUMENTS. Do the research and deliver the explanation in one pass.

Determine the mode from the argument:

  • If the argument is a file path, class name, or method — this is a code explanation. Follow the Code Explanation section.
  • If the argument is a user action, feature, or flow description (e.g. "password reset", "checkout", "authentication") — this is a flow explanation. Follow the Flow Explanation section.

Code Explanation

Start by checking the git history for the file: git log --oneline -15 <file> and git log -1 -p <file> for the most recent change. Commit messages often reveal the "why" that the code itself doesn't — a bug that was fixed, a refactor that simplified something, a workaround for an external constraint. Note anything that reframes the code before diving into it.

Then read the code carefully and explain in this order:

1. What it does — in one paragraph

Plain English. No jargon, no code. Describe what this code accomplishes from the outside — what goes in, what comes out, what changes as a result. Write it the way you'd explain it to the client who asked for the feature.

2. How it does it — walking through the logic

Narrate the code path in plain English, step by step. For each meaningful chunk:

  • What is this step doing?
  • Why is it doing it here, in this order?
  • What would break if it wasn't here?

Don't narrate every line — skip the obvious. Focus on the parts that require interpretation.

3. Patterns and conventions in use

Name the Rails, Ruby, or design patterns this code is using — and why they appear here. Examples:

  • "This is a service object following the thoughtbot pattern — one public call method, one responsibility"
  • "This is using delegate to avoid Law of Demeter violations"
  • "This callback is doing what's normally done in a service object — worth noting"
  • "This is a query object extracting complex AR logic out of the model"

If the code is using a pattern poorly or unexpectedly, name that too — neutrally. This isn't a review, but understanding requires knowing when something is off-label.

Read the full file on GitHub · 99 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 99 lines · 45 tokens per session scan A 017f18273999

Subscribe to this mod's changes

explain is a skill published in the GitHub repository thoughtbot/rails-consultant (23 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 1,073 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-08-30.

Related

Other skills, from other repositories

recursive-decomposition

Handle tasks that exceed the context window by decomposing them: size and filter the input, chunk it, run recursive sub-agents on independent parts, verify on small windows, and synthesise programmatically, following the Recursive Language Models (RLM) research by Zhang, Kraska and Khattab (2025). Use when a task…

massimodeluisa/recursive-decomposition-skill · 151 tokens

swarm

Run a multi-agent audit of a codebase by spawning specialized parallel subagents (security, performance, tests, architecture, dead-code), then synthesize their findings into a single prioritized action plan. Use this whenever the user runs /swarm, asks to "audit the repo," "review this codebase," "find issues across…

Zintellix/Claude-Skills · 138 tokens

brainstorm

Guided game concept ideation — from zero idea to a structured game concept document. Uses professional studio ideation techniques, player psychology frameworks, and structured creative exploration.

IdoCohen560/claude-unity-game-studio · 36 tokens

balance-check

Analyzes game balance data files, formulas, and configuration to identify outliers, broken progressions, degenerate strategies, and economy imbalances. Use after modifying any balance-related data or design. Use when user says 'balance report', 'check game balance', 'run a balance check'.

IdoCohen560/claude-unity-game-studio · 61 tokens

adherencia-reglas

Mide qué fracción de las reglas propias del proyecto se cumple de verdad, contándolo sobre el historial de sesiones que Claude Code ya guarda en disco. Se activa al preguntar si una norma, protocolo o convención se está aplicando, al revisar si un CLAUDE.md sirve de algo, al decidir si una regla debe pasar a ser hook…

jleonceo/skill-adherencia-reglas · 127 tokens

remove-ai-slop

Review and clean AI-slop from writing: filler and marketing adverbs, empty openers, overused jargon, hedging, false agency, structural tells, future tense for current behavior, and em-dash overuse. Use when asked to remove AI-sounding phrasing, tighten prose, de-AI text, edit out "simply/just/easily", flag or strip…

christiangalsterer/documentation-plugin · 143 tokens