explain-code
Skill0 starsChanged 4 months agoMITView on GitHub
When the user wants a piece of code explained clearly — with a real-world analogy, a visual diagram, a line-by-line walkthrough, key concepts, common gotchas, and how to modify it. Also use when the user says 'explain this code,' 'what does this do,' 'walk me through this,' 'I don't understand this function,' 'help me onboard to this codebase,' or 'explain this to a beginner.' Designed for learning unfamiliar code or explaining code to someone less technical.
25 other projects use a version of this.
Adopted by
Most recently taken up by
- LuisUrrutia/skillstheir own version, first seen Oct 4, 2026
- koach08/claude-code-skillstheir own version, first seen Sep 12, 2026
- Enrikkk/claude-skillstheir own version, first seen Sep 10, 2026
- renzrollon/interlocktheir own version, first seen Sep 10, 2026
- Fedgutcor/explain-code-skilltheir own version, first seen Sep 5, 2026
- dmzoneill/skillstheir own version, first seen Sep 3, 2026
Used with
Projects with it also use write-tests, teach and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillwrite-tests
Write tests following project conventions. Use when adding new tests or modifying existing ones.
Also in 4 projects that use this
AWSSkillteach
Teach the user a new skill or concept, within this workspace.
Also in 4 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 3 projects that use this
NVIDIASkilldeep-research
Queue deep, multi-step research and analysis tasks to the DeepAgents worker. Supports execution depth presets, request-specific rubrics, SubAgent delegation, and RubricMiddleware cross-validation.
Also in 3 projects that use this
AnthropicSkilldebug
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
Also in 3 projects that use this
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 4 projects that use this
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- AgnosticUI/agnosticui★ 826same name
- renzrollon/interlock★ 17same name
- zbruhnke/claude-code-starter★ 17same name
- helderberto/agent-skills★ 16same name
- sidkh/skills★ 8same name
- viknesh20-20/claude-code-tool-kit★ 7same name
- zeon-kun/claude-skills★ 6same name
- Akindu23/my-agent-skills★ 4same name
- Arcadi4/skills★ 4same name
- koach08/claude-code-skills★ 4same name
15 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- ai-seoSkill
- churn-preventionSkill
- copy-editingSkill
- free-tool-strategySkill
- marketing-psychologySkill
- popup-croSkill
- pricing-strategySkill
- programmatic-seoSkill
- project-scaffoldSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
When you need to understand unfamiliar code, onboard onto a project, or explain code to someone less technical.
- Distinctive: line 19
When asked to explain code, provide ALL of the following sections:
- Distinctive: line 22
Start with a relatable analogy that captures what this code does.
- Distinctive: line 27
Create an ASCII or Mermaid diagram showing the flow:
- Distinctive: line 71
If you wanted to change this code, here's how:
- Distinctive: line 78
Use "we" language: "Here we're checking if..."
- Distinctive: line 80
Never condescending: avoid "simply", "just", "obviously"
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Explain Code
Explain code with diagrams, analogies, and beginner-friendly language.
Description
Takes a piece of code and explains it thoroughly using real-world analogies, visual diagrams, line-by-line walkthroughs, and common gotchas. Designed for beginners or anyone learning a new codebase.
When to Use
When you need to understand unfamiliar code, onboard onto a project, or explain code to someone less technical.
Instructions
When asked to explain code, provide ALL of the following sections:
1. Real-World Analogy
Start with a relatable analogy that captures what this code does. Use everyday objects or processes. Keep it to 2-3 sentences.
Example: "This function is like a bouncer at a club. It checks everyone's ID (validates the token), and only lets in people on the guest list (authorized users). If your ID is fake (expired token), you get turned away (401 error)."
2. Visual Diagram
Create an ASCII or Mermaid diagram showing the flow:
- For functions: input → processing → output
- For components: parent → children → data flow
- For API routes: request → middleware → handler → response
- For database: tables → relationships → queries
Example:
[User Click] → [API Call] → [Validate Input]
↓
[Query Database]
↓
[Format Response]
↓
[Return to UI]3. Line-by-Line Walkthrough
Go through each significant line or block:
- What it does in plain English
- Why it exists (the purpose, not just the syntax)
- What would happen if you removed it
Use this format:
Line 5: const user = await db.users.findUnique({ where: { id } })
→ Looks up the user in the database by their ID
→ If no user found, this returns null (handled on line 8)4. Key Concepts
List any programming concepts used, with brief explanations:
- "async/await — lets you write asynchronous code that reads like synchronous code"
- "destructuring — pulls specific values out of an object:
const { name } = user" - "guard clause — early return to handle edge cases before the main logic"
5. Common Gotchas
What could trip someone up:
- Edge cases not obvious from the code
- Implicit behaviors or side effects
- Common mistakes when modifying this code
- Performance implications
6. How to Modify
If you wanted to change this code, here's how:
- "To add a new field: add it to the Zod schema on line 3, then to the query on line 7"
- "To change the error message: update line 12"
- "To add caching: wrap the database call on line 5 with a cache check"
Tone
- Patient and encouraging — no jargon without explanation
- Use "we" language: "Here we're checking if..."
- Celebrate complexity: "This is a clever pattern because..."
- Never condescending: avoid "simply", "just", "obviously"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

