explain-code
Skill0 starsChanged 3 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.
48 other projects use a version of this.
Adopted by
Most recently taken up by
- renzrollon/interlocktheir own version, first seen Nov 5, 2026
- jorgenschaefer/skillstheir own version, first seen Nov 1, 2026
- sergerad/skillstheir own version, first seen Nov 1, 2026
- rpraharaj/ai-sdlctheir own version, first seen Nov 1, 2026
- datnt97/claude-skillstheir own version, first seen Nov 1, 2026
- rpraharaj/ai-engineertheir own version, first seen Nov 1, 2026
Used with
Projects with it also use explore-codebase, write-tests and 7 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.
srclightSkillexplore-codebase
This skill should be used when the user asks to "explore this codebase", "understand this project", "give me an overview", "how does this work", "onboard me", "walk me through the architecture", "map the codebase", or any request to understand a codebase's structure, architecture, or design.
Also in 3 projects that use this
SentrySkillwrite-tests
Write tests following project conventions. Use when adding new tests or modifying existing ones.
Also in 6 projects that use this
Google CloudSkillopen-pr
Commits local changes to a new Git branch and opens a GitHub pull request through the configured GitHub MCP server. Use when proposing code changes in a new pull request. Don't use for local-only commits without a remote GitHub repository.
Also in 3 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 4 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 9 projects that use this
OpenAISkillwriting-plans
Use when you have a spec or requirements for a multi-step task, before touching code
Also in 4 projects that use this
Other versions48 projects use a version of this.
Word for word · 1
- bradywardai/claude-skills★ 0100% same
Edited · 0
None found.
Wrote their own version · 47
- AgnosticUI/agnosticui★ 833same name
- renzrollon/interlock★ 61same name
- Integralist/agent-skills★ 23same name
- zbruhnke/claude-code-starter★ 16same name
- rommelporras/kiro-config★ 13same name
- sidkh/skills★ 8same name
- bsene/skills★ 7same name
- holt-os/holt★ 7same name
- viknesh20-20/claude-code-tool-kit★ 7same name
- electronx/wiredkits-free★ 5same name
37 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 40 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 40 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.

