explain-code

explain-code is a skill for Claude Code, Codex from davila7/claude-with-skills. It costs 52 tokens per session (426 once invoked), scanned A, original, MIT.

A guide for explaining source code in ordinary language to someone unfamiliar with its programming language. It describes the code’s purpose, how data moves through it, and any surprising behavior.

In plain words
What is it for?
Use it to explain a function, class, script, or other code that someone has pasted or previously discussed.
Why use it?
It makes unfamiliar code easier to understand without requiring the reader to already know the language or the code’s internal names.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to explain a function, class, script, or other code that someone has pasted or previously discussed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davila7/claude-with-skills/01-explain-code
About the project

Claude With Skills is a progressive course that teaches developers to create reusable, portable Agent Skills for Claude Code, from basic SKILL.md files to advanced automation and plugin packaging. It is intended for developers who want repeatable instructions and workflows instead of repeatedly pasting the same guidance. The catalogue contains the course's skills, agents, and instruction.

davila7/claude-with-skills · 11 stars · on GitHub · claude-with-skills.vercel.app

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 davila7/claude-with-skills --skill 01-explain-code
Clone the repo
git clone --depth 1 https://github.com/davila7/claude-with-skills

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/davila7/claude-with-skills/01-explain-code/github.svg)](https://agentmods.dev/skills/davila7/claude-with-skills/01-explain-code)
Your own site
<a href="https://agentmods.dev/skills/davila7/claude-with-skills/01-explain-code"><img src="https://agentmods.dev/badge/skills/davila7/claude-with-skills/01-explain-code/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-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/davila7/claude-with-skills/01-explain-code"><img src="https://agentmods.dev/badge/skills/davila7/claude-with-skills/01-explain-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 426 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.
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.00052 $0.00426
Opus 5 $0.00026 $0.00213
Sonnet 5 $0.00010 $0.00085
Haiku 4.5 $0.00005 $0.00043

Measured 8d ago against content hash 0d1dc07733eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

explain-code 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 8d 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.

src/content/docs/01-basic/exercises/solutions/01-explain-code/SKILL.md · 29 lines

What it actually says

Instructions

  1. Identify the code to explain. In order of priority:

    • Code the user just pasted or attached in this conversation
    • The last file that was opened or discussed
    • If it is unclear, ask the user to paste or point to the specific code before proceeding
  2. Identify the programming language. Do not assume from the file extension alone — check the syntax if the extension is missing or ambiguous.

  3. Explain the code in plain language covering these three areas:

    Overall purpose — What does this code do? What problem does it solve or what action does it perform? State this in one or two sentences without using the function or variable names as a substitute for explanation.

    Main data flow — How does data move through the code? What comes in, what happens to it, and what comes out? For a function: inputs, transformations, output. For a class: how instances are created and how their state changes. For a script: what it reads, what it produces.

    Non-obvious logic — Is there any behavior that would surprise a competent programmer reading this for the first time? Flag things like: side effects, error suppression, hardcoded assumptions, subtle timing dependencies, or clever bitwise operations.

  4. Use an analogy if it genuinely makes the concept clearer. Do not force one if the code is self-explanatory once described directly.

  5. Limit the explanation to what was asked. If the user pointed to one function, explain that function. Do not expand to the surrounding architecture unless asked.

  6. Do not restate the obvious. If a function is named calculateTax and it calculates tax, skip the sentence saying "this function calculates tax" and go directly to how it does it.

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. 8d ago First seen · 29 lines · 52 tokens per session scan A 0d1dc07733eb

Subscribe to this mod's changes

explain-code is a skill published in the GitHub repository davila7/claude-with-skills (11 stars, last pushed 3mo ago), licensed MIT. It adds 52 tokens to every session and 426 once invoked, about $0.0003 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

hr-onboarding

A new-hire onboarding plan as a single page — first week schedule, buddy + manager intro, learning track, equipment checklist, and "you're set when…" outcomes. Use when the brief mentions "onboarding", "new hire", "first week plan", or "入职".

nexu-io/open-design · 62 tokens

book-mirror

Take any book (EPUB/PDF), produce a personalized chapter-by-chapter analysis. Each chapter is preserved in detail (The Chapter) and mirrored back to the reader's actual life (The Mirror) using brain context. The mirror observes and resonates — a friend pointing out parallels, NOT a consultant rearranging the reader's…

garrytan/gbrain · 138 tokens

miniapp

Build a tiny interactive HTML playground only when someone asks to see, play with, or step through a mechanism.

yc-software/qm · 25 tokens

eli5

Explain research, papers, or technical ideas in plain English with minimal jargon, concrete analogies, and clear takeaways. Use when the user says "ELI5 this", asks for a simple explanation of a paper or research result, wants jargon removed, or asks what something technically dense actually means.

companion-inc/feynman · 63 tokens

deck-course-module

A course or workshop slide template with persistent learning goals, teaching pages, multiple-choice self-tests, and a wrap-up.

nexu-io/html-anything · 25 tokens

master-yinguang

A reference-based assistant for questions about Yinguang and Pure Land Buddhism, a Buddhist tradition focused on faith, ethical living, and practice connected with rebirth in the Pure Land. It can answer in Yinguang’s historical teaching style.

xr843/Master-skill · 274 tokens