Agent skill

Explain

by softspark in softspark/ai-toolkit

Explains code/architecture with Mermaid diagrams and sequence flows.

Apache-2.0Auto-check passedDevelopment

Install Explain

skills CLI
$ npx skills add softspark/ai-toolkit --skill explain -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install softspark/ai-toolkit explain --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/explain .claude/skills/explain && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
explain
GitHub stars
179
Token cost
~877 tokens
SKILL.md length
395 words
Files
2 (incl. scripts)
Skills in repo
112
Repo updated
First seen
Licence
Apache-2.0

At a glance

Explains code/architecture with Mermaid diagrams and sequence flows.

  • Works in 3 steps: High-Level Role → Dependency Graph (Mermaid) → Key Flows (Sequence)
  • Tasks that involve Diagrams
  • SKILL.md covers Output Format, Protocol, Automated Dependency Graph and Rules, plus 2 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Explain is an agent skill from softspark/ai-toolkit. Explains code/architecture with Mermaid diagrams and sequence flows. Triggers: what does X do, how does Y work, explain code, sequence diagram.

Its SKILL.md is about 880 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/dependency-graph.py`).

It sits in Development, covering Diagrams and Technical documentation. It works with Mermaid. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Diagrams
  • Tasks that involve Technical documentation

Example prompts

  • “Use the explain skill to explain code/architecture with Mermaid diagrams and sequence flows”
  • “/explain”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Grep, Glob

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. High-Level Role
  2. Dependency Graph (Mermaid)
  3. Key Flows (Sequence)

What it can do on your machine

Read from SKILL.md and the folder at commit d64db2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Explain loads about 877 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 395 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~877

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from softspark/ai-toolkit at commit d64db2b, republished under its Apache-2.0 licence (© softspark). 395 words, ~877 tokens.

Download SKILL.mdSave it as .claude/skills/explain/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
explain
description
Explains code/architecture with Mermaid diagrams and sequence flows. Triggers: what does X do, how does Y work, explain code, sequence diagram.
allowed-tools
Read, Grep, Glob
user-invocable
true
effort
medium
argument-hint
[file or module path]
agent
code-archaeologist
context
fork

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.

mermaid
graph TD
    A[AuthService] -->|uses| B[UserRepo]
    A -->|validates| C[Schema]
    D[Controller] -->|calls| A
3. Key Flows (Sequence)

If logical flows are detected:

mermaid
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:

bash
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
Show full SKILL.md (197 more words)Show less

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.

When NOT to Use

  • To critique or improve the code — use /review or /refactor
  • To find a specific function across the codebase — use /explore or Grep
  • To write the documentation that the explanation turns into — use /docs
  • For a full architecture audit or redesign — use /architecture-audit
  • When the user asks "why is this broken" — use /debug, not /explain

© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in app/skills/explain of softspark/ai-toolkit.

  • SKILL.md
  • scripts/dependency-graph.py

Open the folder on GitHubat commit d64db2b

Compare with similar skills

Explain next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Explain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Explain this skillsoftspark/ai-toolkit179—~877Automated safety check: PassApache-2.0
Diagram Designcathrynlavery/diagram-design45k1 repos~7.5kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Pretty Mermaid Rendererimxv/Pretty-mermaid-skills1.5k—~2kAutomated safety check: PassMIT
Mermaid Diagramsjjmartres/opencode1336 repos~1.9kAutomated safety check: PassMIT
Eli5coldteadotai/pr-lens1.9k—~2.3kAutomated safety check: PassMIT

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    45k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Pretty Mermaid Renderer

    imxv/Pretty-mermaid-skills

    Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.

    1.5k GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Mermaid Diagrams

    jjmartres/opencode

    Helps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams.

    133 GitHub starsUsed in 6 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Eli5

    coldteadotai/pr-lens

    WHAT: Explains a codebase, a folder, a feature, a command or a pull request to someone who knows nothing about it, as a PR Lens canvas whose walkthrough builds the picture one part at a time.

    1.9k GitHub stars~2.3k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • C4 Architecture Diagrams

    lexler/skill-factory

    Creates C4 model diagrams at every zoom level, from system landscape to code, in ASCII, Mermaid or Structurizr, for designing or documenting software architecture.

    239 GitHub stars~2.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from softspark/ai-toolkit

All 112 skills in this repo
  • Prepare Test Env

    softspark/ai-toolkit

    Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.

    179 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • A11y Validate

    softspark/ai-toolkit

    Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check: notes
  • Analyze

    softspark/ai-toolkit

    Analyzes code quality, complexity, patterns across codebase.

    179 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Autonomous Dev

    softspark/ai-toolkit

    Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.

    179 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Brand Voice

    softspark/ai-toolkit

    Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • CI

    softspark/ai-toolkit

    Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).

    179 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes

Works with

Categories

Questions about Explain

What does Explain do?

Explains code/architecture with Mermaid diagrams and sequence flows. Explain is an agent skill from softspark/ai-toolkit. Explains code/architecture with Mermaid diagrams and sequence flows.

When should I use Explain?

Explain fits situations like: tasks that involve Diagrams; tasks that involve Technical documentation.

How do I install Explain in Claude Code?

Run `npx skills add softspark/ai-toolkit --skill explain -a claude-code`. Or copy the skill folder (app/skills/explain in softspark/ai-toolkit) into .claude/skills/explain in your project. Claude Code loads it when a task matches its description.

How do I install Explain in Codex?

Run `npx skills add softspark/ai-toolkit --skill explain -a codex`. Or copy the skill folder (app/skills/explain in softspark/ai-toolkit) into .agents/skills/explain in your project. Codex loads it when a task matches its description.

Can I use Explain in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill explain -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/explain, .gemini/skills/explain, .github/skills/explain and .opencode/skills/explain in your project.

What does Explain need to run?

Going by SKILL.md and its folder, Explain needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Grep, Glob.

Does Explain access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Explain safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Explain use?

Explain is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Explain use?

About 877 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Explain?

Skills that share tags, products or a category with Explain: Diagram Design (cathrynlavery/diagram-design, 45k stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars), Pretty Mermaid Renderer (imxv/Pretty-mermaid-skills, 1.5k stars) and Mermaid Diagrams (jjmartres/opencode, 133 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Explain?

softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 7, 2026.

Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.