coding-explain

A senior-engineer explanation of a data-structures-and-algorithms pattern or coding problem. It teaches how to recognize the approach, apply its standard structure, understand its speed and memory costs, and handle variations.

In plain words
What is it for?
It helps study patterns such as two pointers, sliding windows, dynamic programming, backtracking, binary search, graph traversal, hashing, heaps, and specific imported coding problems.
Why use it?
Solving these problems is easier when you understand the reusable method instead of memorizing one answer. This turns a named pattern or problem into a guided walkthrough.

Command

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/kirilxd/swe-interview-coach/coding-explain
Clone the repo
git clone --depth 1 https://github.com/kirilxd/swe-interview-coach
Per session 40 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,278 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00040 $0.01278
Opus 5 $0.00020 $0.00639
Sonnet 5 $0.00008 $0.00256
Haiku 4.5 $0.00004 $0.00128

Measured 2d ago against content hash d3d3138a2a2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

coding-explain scanned grade B with 1 finding 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 2d 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

Explain entirely in chat — this is teach-first, not a graded run. Do **not** run any code in this command. You MAY offer to seed a scratch stub the user can try (e.g. point them at `/practice-coding <id>`), but explain r
commands/coding-explain.md · 62 lines

How it starts

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

You are running /coding-explain.

Step 1 — Resolve $ARGUMENTS

Take $ARGUMENTS as arg and resolve it to exactly one of four modes (check in this order):

  1. Patternarg matches a pattern id in the coding-frameworks taxonomy (a ### <pattern> sub-section under ## Pattern taxonomy, e.g. two-pointers, sliding-window, dynamic-programming, backtracking, binary-search). Match on the slug OR the heading's key term — some ids map to compound headings (e.g. topological-sort → the "Graph: topological sort" subsection; bfs/dfs/hashing/heap similarly cover their compound headings). Set mode = pattern.
  2. Problem${CLAUDE_PLUGIN_ROOT}/library/coding/<arg>.md exists (a library entry) OR $CLAUDE_PROJECT_DIR/coding/imported/<arg>.md exists (an imported entry; also strip a leading imported/ from arg and retry, so both <id> and imported/<id> resolve). Read it and hold its full content as topic_source. Set mode = problem.
  3. Free promptarg is non-empty but matches neither a pattern nor an entry. Hold it verbatim as topic_prompt. Set mode = free.
  4. Emptyarg is empty. Set mode = list.

If mode = list: load the coding-frameworks skill and list every ### <pattern> from its ## Pattern taxonomy; then Read the frontmatter id and difficulty of each ${CLAUDE_PLUGIN_ROOT}/library/coding/*.md and present the problems as a numbered list grouped by difficulty. Ask the user to pick a pattern or a problem, then re-resolve their answer through this step.

Step 2 — Load the skill

Before teaching anything, load the coding-frameworks skill (the UMPIRE method, the pattern taxonomy, the Big-O cheatsheet, Python idioms). It grounds every walkthrough below and is never read aloud verbatim.

Step 3 — Teach in chat

Explain entirely in chat — this is teach-first, not a graded run. Do not run any code in this command. You MAY offer to seed a scratch stub the user can try (e.g. point them at /practice-coding <id>), but explain runs nothing itself.

Read the full file on GitHub · 62 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. 2d ago First seen · 62 lines · 40 tokens per session scan B d3d3138a2a2a

Subscribe to this mod's changes

coding-explain is a command published in the GitHub repository kirilxd/swe-interview-coach (79 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 1,278 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.