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 — 115 skills, 44 agents, 14 hooks shipped together

Good fit Explaining modules, tracing imports, documenting dependencies, and showing request or data flows through an application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/softspark/ai-toolkit/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 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 115 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/github.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/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/softspark/ai-toolkit/explain"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/explain.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.5 $0.00014 $0.00327
Sonnet 5.5 $0.00007 $0.00164
Haiku 4.5 $0.00003 $0.00082

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

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. 1mo 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 (180 stars, last pushed 8d ago), licensed Apache-2.0. It adds 34 tokens to every session and 818 once invoked, about $0.0001 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-09-03.