ase-code-explain

A concise code-explanation format that describes what code does and why, using plain language and, when requested, analogies or diagrams.

In plain words
What is it for?
Use it to explain how code works, summarize its purpose, clarify difficult behavior with an everyday comparison, and identify important concerns or edge cases.
Why use it?
It gives readers a structured way to understand unfamiliar code without requiring them to study every implementation detail.

Skill for Claude CodeCodex

View the source file rse/ase
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/rse/ase/ase-code-explain
Any agent
npx skills add rse/ase --skill ase-code-explain
Clone the repo
git clone --depth 1 https://github.com/rse/ase

Made for: Claude Code, Codex.

Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,210 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 $0.00049 $0.01210
Opus 5 $0.00024 $0.00605
Sonnet 5 $0.00010 $0.00242
Haiku 4.5 $0.00005 $0.00121

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

Security

Grade A, and why

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

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.

plugin/skills/ase-code-explain/SKILL.md · 153 lines

How it starts

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

@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md

  1. First, explain WHAT the code does (functionality). Second, explain WHY the code does it (rationale).

    Keep your explanations brief and concise.

    The project source artifacts are classified as a black box, so the user wants only the minimal surface explanation. Output only the WHAT block (omit the WHY block) with the following :

    Output the result with the following :

    WHY (You should know why):

    • [...]
    • [...]
    • [...]
  2. The project source artifacts are classified as a black box, so deeper elaboration is not wanted. Skip this STEP 3 and the following STEP 4 entirely: do not output any ANALOGY, DIAGRAM, CRUXES, or GOTCHAS, and do not dispatch any diagram rendering.

    Give insights with ANALOGY and DIAGRAM.

    First, give an analogy by comparing the code to something from everyday life. How can I understand this by something I already know? Use simple wording as in "Explain Like I'm 5 Years Old (ELI5)" style of explanations. For very complex concepts, use multiple analogies.

    Second, draw a diagram to show the control or data flow, code or data structure, or code or data relationships. What gives the best overall overview of the code? Build a Mermaid specification , choosing the Mermaid diagram type per intent: classDiagram for class/method structure, sequenceDiagram for actor/message flow, or flowchart TB for boxes-and-lines component layouts. Then dispatch the rendering to the ase-meta-diagram sub-agent by calling the tool Agent(description: "Diagram Rendering", subagent_type: "ase:ase-meta-diagram", prompt: <mermaid-spec/>, run_in_background: false) and reproduce its returned fenced code block verbatim in the response text. Do not hand-draw.

    Keep your explanation brief and concise. Output the result with the following :

    DIAGRAM (You should grasp): [...]

  3. First, tell what the cruxes of the code are. Is there something one should really notice?

    Second, tell what the gotchas of the code are. Is there something one could really stumble over?

    Keep your explanation brief and concise. Output the result with the following :

Read the full file on GitHub · 153 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 · 153 lines · 49 tokens per session scan A f28f5aea8c28

Subscribe to this mod's changes

ase-code-explain is a skill published in the GitHub repository rse/ase (47 stars, last pushed 4d ago), licensed Apache-2.0. It adds 49 tokens to every session and 1,210 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-08-30.

Related

Other skills, from other repositories