explain-code

explain-code is a skill for Claude Code from viknesh20-20/claude-code-tool-kit. It costs 43 tokens per session (529 once invoked), scanned A, original, MIT.

A guide for explaining unfamiliar code at several levels, from its overall purpose to a detailed walkthrough of its logic and data flow.

In plain words
What is it for?
Onboarding to a codebase, understanding a file or function, tracing how data moves through a module, and examining recent changes.
Why use it?
It helps developers understand complicated code by connecting what the code does, what it depends on, who uses it, and why it was designed that way.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Onboarding to a codebase, understanding a file or function, tracing how data moves through a module, and examining recent changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/viknesh20-20/claude-code-tool-kit/explain-code
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 viknesh20-20/claude-code-tool-kit --skill explain-code
Clone the repo
git clone --depth 1 https://github.com/viknesh20-20/claude-code-tool-kit

Made for: Claude Code.

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/viknesh20-20/claude-code-tool-kit/explain-code/github.svg)](https://agentmods.dev/skills/viknesh20-20/claude-code-tool-kit/explain-code)
Your own site
<a href="https://agentmods.dev/skills/viknesh20-20/claude-code-tool-kit/explain-code"><img src="https://agentmods.dev/badge/skills/viknesh20-20/claude-code-tool-kit/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/viknesh20-20/claude-code-tool-kit/explain-code"><img src="https://agentmods.dev/badge/skills/viknesh20-20/claude-code-tool-kit/explain-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 529 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.00043 $0.00529
Opus 5.5 $0.00017 $0.00212
Sonnet 5.5 $0.00009 $0.00106
Haiku 4.5 $0.00004 $0.00053

Measured 1mo ago against content hash 312ef1c0944d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

.claude/skills/explain-code/SKILL.md · 61 lines

What it actually says

Code Explanation

Instructions

Step 1: Identify the Target

Read the specified file, function, or module completely. Also read:

  • Any imports/dependencies it uses
  • Any files that import/call it (to understand usage context)
  • Recent git history for the file: git log --oneline -10 <file>

Step 2: Provide Multi-Level Explanation

Level 1 — One-Sentence Summary

What does this code do in plain English? A non-technical person should understand this.

Level 2 — High-Level Overview
  • Purpose: What problem does it solve?
  • Inputs: What goes in? (parameters, config, env vars, external data)
  • Outputs: What comes out? (return values, side effects, events emitted)
  • Dependencies: What does it rely on?
  • Callers: Who uses this? In what context?
Level 3 — Detailed Walkthrough

Walk through the code section by section:

  • Explain the logic flow with numbered steps
  • Highlight non-obvious decisions ("this uses X instead of Y because...")
  • Note any error handling and what triggers each path
  • Explain any performance-sensitive sections
Level 4 — Data Flow Diagram

Create an ASCII diagram showing:

[Input] → [Processing Step 1] → [Processing Step 2] → [Output]
                ↓                       ↓
         [Side Effect 1]         [Side Effect 2]

Step 3: Highlight Key Details

  • Tricky Parts: Code that might confuse a new reader
  • Assumptions: Implicit assumptions the code makes
  • Edge Cases: How are boundary conditions handled?
  • History: Why was it written this way? (use git blame for context)

Step 4: Related Code

List the most important related files/functions that someone exploring this code should read next.


Output Style

  • Use clear section headers
  • Include code snippets with line references
  • Use analogies where helpful
  • Adjust technical depth based on the complexity of the code
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 · 61 lines · 43 tokens per session scan A 312ef1c0944d

Subscribe to this mod's changes

explain-code is a skill published in the GitHub repository viknesh20-20/claude-code-tool-kit (7 stars, last pushed 5mo ago), licensed MIT. It adds 43 tokens to every session and 529 once invoked, about $0.0002 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-08-31.

Related

Other skills, from other repositories