explain

explain is a skill for Claude Code from softspark/ai-toolkit. It costs 34 tokens per session (818 once invoked), scanned A, original, Apache-2.0.

A code and architecture explanation workflow that produces dependency diagrams and sequence diagrams. These diagrams show how code components depend on one another and how a process happens over time.

In plain words
What is it for?
Explaining modules, tracing imports, documenting dependencies, and showing request or data flows through an application.
Why use it?
It turns unfamiliar code into a visual explanation grounded in the project’s actual files and functions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Part of the ai-toolkit plugin — 114 skills, 44 agents, 14 hooks 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/softspark/ai-toolkit/explain
Any agent
npx skills add softspark/ai-toolkit --skill explain
Clone the repo
git clone --depth 1 https://github.com/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 114 skills, 44 agents, 14 hooks.

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/softspark/ai-toolkit/explain.svg)](https://agentmods.dev/skills/softspark/ai-toolkit/explain)
Your own site
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/explain"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/explain.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 818 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.1 $0.00034 $0.00818
Opus 5 $0.00017 $0.00409
Sonnet 5 $0.00007 $0.00164
Haiku 4.5 $0.00003 $0.00082

Measured 2d ago against content hash 39e05bfaa869, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/dependency-graph.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

app/skills/explain/SKILL.md · 80 lines

How it starts

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

Explain

$ARGUMENTS

Generates visual architecture explanations.

Output Format

1. High-Level Role

"This module handles [Responsibility]. It interacts with [Dependencies]."

2. Dependency Graph (Mermaid)

Generate a graph showing imports/exports.

graph TD
    A[AuthService] -->|uses| B[UserRepo]
    A -->|validates| C[Schema]
    D[Controller] -->|calls| A

3. Key Flows (Sequence)

If logical flows are detected:

sequenceDiagram
    User->>Controller: Login
    Controller->>Service: Validate
    Service->>DB: Check Creds
    DB-->>Service: Result
    Service-->>Controller: Token

Protocol

  1. Scan: Read file contents to identify classes and functions.
  2. Link: Identify imports to find collaborators.
  3. Visualize: Generate standard Mermaid syntax.

Automated Dependency Graph

Run the bundled script to extract imports and generate a Mermaid diagram:

python3 ${CLAUDE_SKILL_DIR}/scripts/dependency-graph.py src/auth.py

Rules

  • MUST start from what the user already knows — if it is unclear, ask one question before explaining
  • MUST ground the explanation in the actual code (file:line references), not in generic framework theory
  • NEVER use an analogy when a direct definition is clearer — analogies add a translation step for the reader
  • NEVER produce a diagram that the text does not already justify — diagrams illustrate, they do not replace the explanation
  • CRITICAL: when the code base is large, scope the explanation to one entry point plus its immediate collaborators. Explaining "the whole system" in one pass fails for any non-trivial project.
  • MANDATORY: if the user asks for a short answer, give a one-paragraph summary without diagrams — not every request needs a Mermaid graph

Gotchas

  • Mermaid renders differently across GitHub, VS Code preview, and static generators. Features added post-2023 (e.g., class diagram relations, accTitle) may render as raw text on older renderers. Stick to the basic subset unless you know the target.
  • dependency-graph.py parses imports statically; dynamic imports (__import__, importlib.import_module, JavaScript await import()) are invisible. Note explicitly when the generated graph is likely incomplete.
  • Sequence diagrams have no notion of async vs sync. Two parallel calls render as sequential; distinguish with a par block or a note.
  • Architectural explanations that name "the service layer" or "the controller" leak framework jargon. If the project does not use those terms, use the project's own names — otherwise the reader is translating twice.
  • Long Mermaid graphs wrap awkwardly on narrow screens. For >20 nodes, split into a high-level graph and drill-down graphs rather than one giant diagram.

Read the full file on GitHub · 80 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. 2d ago First seen · 80 lines · 34 tokens per session scan A 39e05bfaa869

Subscribe to this mod's changes

explain is a skill published in the GitHub repository softspark/ai-toolkit (169 stars, last pushed yesterday), licensed Apache-2.0. It adds 34 tokens to every session and 818 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-09-03.

Related

Other skills, from other repositories

cangjie-skill

Distill a book, long-video transcript, podcast, course, or interview into a coherent set of executable skills. Use when the user asks to "拆书" / "蒸馏一本书" / "把 XX 书做成 skill" / "把这个视频/播客/课程蒸馏成 skill" / "turn a book or video into skills" — i.e. wants the frameworks, principles, and methodologies in long-form content…

kangarooking/cangjie-skill · 143 tokens

reading-metaskill

当用户想养成阅读习惯、问「读什么书/怎么读」「如何学习新领域/怎么入门某学科」时调用。 核心理念: 阅读是终极元技能; 读你所爱直到爱上阅读, 没有读完义务; 读原著与经典优先; 以教促学; 每天1-2小时即可进入极少数人行列。 不适用于: 具体某本书的书评、考试备考资料选择。 Triggers: 阅读/读书/怎么学习/入门/原著/书单/reading/how to learn.

kangarooking/cangjie-skill · 139 tokens

life-meaning

当用户问「活着的意义是什么/找不到方向/虚无感/该为什么努力」时调用。 核心理念: 生命没有外在赋予的意义(宇宙尺度一切会消失); 意义=个人创造+愿意为之受苦; 拥抱死亡是意义的入口。 不适用于: 急性自杀风险(先紧急求助)。 Triggers: 生命的意义/虚无/找不到意义/为什么活着/meaning/purpose/nihilism.

kangarooking/cangjie-skill · 118 tokens

principal-agent

当用户选择职业/组织/合作方式、困惑「为什么大公司磨洋工/小公司拼命」「该不该自己干」时调用。 核心理念: 委托人(主人)会把事做好, 代理人会为自己利益优化; 收益与创造价值绑得越紧, 越像委托人; 别让媒体洗脑你需要代理人。 不适用于: 具体薪酬谈判数字、组织架构设计细节。 Triggers: 激励/代理/主人/打工 vs 创业/利益绑定/principal/agent/incentive.

kangarooking/cangjie-skill · 134 tokens

math-tools

Deterministic mathematical computation using SymPy. Use for ANY math operation requiring exact/verified results - basic arithmetic, algebra (simplify, expand, factor, solve equations), calculus (derivatives, integrals, limits, series), linear algebra (matrices, determinants, eigenvalues), trigonometry, number theory…

foryourhealth111-pixel/Vibe-Skills · 97 tokens

mathematical-logic-expert

Expert in formal logic, model theory, computability, and foundations of mathematics.

foryourhealth111-pixel/Vibe-Skills · 23 tokens