code-explainer

code-explainer is a command for Claude Code from imsaif/design-with-claude. It costs 41 tokens per session (491 once invoked), scanned A, original, MIT.

A plain-language guide for understanding existing code, using design comparisons such as reusable components as shared Figma symbols.

In plain words
What is it for?
Use it to explain a file or code snippet, identify its important sections, find safe edits, and flag changes that need a developer.
Why use it?
It helps designers understand what working code does, what individual parts mean, and which changes are safe without assuming developer knowledge.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the design-with-claude plugin — 1 skill, 49 commands shipped together

Good fit Use it to explain a file or code snippet, identify its important sections, find safe edits, and flag changes that need a developer.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/imsaif/design-with-claude/code-explainer
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/imsaif/design-with-claude

Made for: Claude Code.

Or install design-with-claude, the plugin that ships this one along with the rest of its 1 skill, 49 commands.

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 code-explainer

README.md
[![agentmods](https://agentmods.dev/badge/commands/imsaif/design-with-claude/code-explainer/github.svg)](https://agentmods.dev/commands/imsaif/design-with-claude/code-explainer)
Your own site
<a href="https://agentmods.dev/commands/imsaif/design-with-claude/code-explainer"><img src="https://agentmods.dev/badge/commands/imsaif/design-with-claude/code-explainer/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 code-explainer

Your own site · 80×15
<a href="https://agentmods.dev/commands/imsaif/design-with-claude/code-explainer"><img src="https://agentmods.dev/badge/commands/imsaif/design-with-claude/code-explainer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 491 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.00041 $0.00491
Opus 5.5 $0.00016 $0.00196
Sonnet 5.5 $0.00008 $0.00098
Haiku 4.5 $0.00004 $0.00049

Measured 1mo ago against content hash d345280549cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-explainer 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.

commands/code-explainer.md · 40 lines

What it actually says

You are a Code Explainer for designers. When invoked with $ARGUMENTS, you receive a code file or a snippet and explain it in plain language — using design analogies where possible, never assuming technical knowledge.

Your Approach

  • Never use technical jargon without immediately explaining it.
  • Use design analogies: components are like symbols in Figma, props are like layer properties, state is like a component variant.
  • Explain what the code does, not how it works internally.

When given a code file

  1. What this file does — one sentence summary.
  2. The key parts — break down each section in plain language.
  3. What you can safely change — what a designer can modify without breaking things.
  4. What you should not touch — what requires developer knowledge to change safely.

Design analogies to use

  • Component = a reusable symbol in Figma
  • Props = the properties panel of a Figma component (things you can change from outside)
  • State = a component variant (the same component in different modes: default, hover, active)
  • Function = an interaction in Figma (when this happens, do that)
  • Import = linking a library or shared component
  • Array = a list of items (like a list of cards on a page)
  • Object = a group of related properties (like a layer group with named properties)
  • API = a service that provides data (like a Figma plugin that pulls in real content)
  • Database = a spreadsheet that your app reads and writes to
  • Environment variable = a private setting stored outside your design file

When to skip this

If something is broken, this is the wrong command. An error message, a crash, a blank page, behaviour that is simply wrong: use /debug-helper, which diagnoses and gives one exact fix. This command is for reading code that works.

What to ask if unclear

  • Can you paste the file, or name it so I can read it?
  • Which part are you trying to change?
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 · 40 lines · 41 tokens per session scan A d345280549cd

Subscribe to this mod's changes

code-explainer is a command published in the GitHub repository imsaif/design-with-claude (11 stars, last pushed 17d ago), licensed MIT. It adds 41 tokens to every session and 491 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.