explain

explain is a skill for Claude Code 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 Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: agent in frontmatter.

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

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thoughtbot/rails-consultant/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.

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.

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/github.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/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/skills/thoughtbot/rails-consultant/explain"><img src="https://agentmods.dev/badge/skills/thoughtbot/rails-consultant/explain.svg" alt="Reviewed on agentmods" width="80" 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. 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.00045 $0.01073
Opus 5.5 $0.00018 $0.00429
Sonnet 5.5 $0.00009 $0.00215
Haiku 4.5 $0.00005 $0.00107

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

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. 1mo 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 (26 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.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

learn-from-fix

Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning, record a lesson, prevent a fixed mistake, or remember package guidance with --library.

oliver-kriska/claude-elixir-phoenix · 46 tokens

elixir-idioms

OTP/BEAM patterns and Elixir idioms — GenServer, Supervisor, Task, Registry, pattern matching, with chains, pipes. Use when designing processes or debugging BEAM issues.

oliver-kriska/claude-elixir-phoenix · 44 tokens

examples

Provide Phoenix, LiveView, Ecto, OTP, or Oban examples. Use when asked for sample code, a walkthrough, a proper implementation, or expected workflow output. Pair with domain skills. NOT for debugging, direct changes, best-practice advice, or audits.

oliver-kriska/claude-elixir-phoenix · 57 tokens

intro

Walk through the Elixir/Phoenix plugin commands, workflow, and features in 6 interactive sections. Use when a new user wants to learn what the plugin offers or needs a refresher on available commands.

oliver-kriska/claude-elixir-phoenix · 44 tokens

csift

Reads, searches and counts Claude Code session transcripts (the .jsonl files under /.claude/projects, subagents too) with the csift command-line tool, and ships hooks that re-inject compacted turns or record pending questions. Use when asked what a past or running session said, did, edited, spent or is doing now; when…

wdhwg001/csift · 227 tokens

recursive-decomposition

Decompose dense codebase-wide, multi-document, PDF, and aggregation work even when the input fits the context window, following Recursive Language Models (Zhang, Kraska, Khattab, 2025). Use when the user asks to analyse all files, a whole repo, all docs, large PDFs, or to aggregate or multi-hop across scattered…

massimodeluisa/recursive-decomposition-skill · 144 tokens