explain-code
Skill5 starsChanged 21 days agoMITView on GitHub
Explain how a piece of code works (a function, file, module, or a flow like "what happens when a user signs up") with file and line references, traced from the actual code. Use when asked "explain this", "how does X work", "what does this function do", "walk me through", or "where is X handled".
48 other projects use a version of this.
Adopted by
Most recently taken up by
- bradydwardai/claude-skillstheir own version, first seen Nov 8, 2026
- 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
Used with
Projects with it also use explore-codebase, write-tests and 10 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
silvainfmSkillcopy-editing
When the user wants to edit, review, or improve existing marketing copy. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' or 'copy sweep.' This skill provides a systematic approach to editing marketing copy through multiple focused passes.
Also in 3 projects that use this
silvainfmSkillpricing-strategy
When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' or 'monetization.' This skill covers pricing research, tier structure, and packaging strategy.
Also in 3 projects that use this
SentrySkillmarketing-psychology
When the user wants to apply psychological principles, mental models, or behavioral science to marketing. Also use when the user mentions 'psychology,' 'mental models,' 'cognitive bias,' 'persuasion,' 'behavioral science,' 'why people buy,' 'decision-making,' or 'consumer behavior.' This skill provides 70+ mental models organized for marketing application.
Also in 3 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
- +1 more from getsentry
Other versions48 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 48
- 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
- Akindu23/my-agent-skills★ 4same name
38 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 repository5 other files it gives its agents.
- commit-messageSkill
- pick-model-effortSkill
- release-notesSkill
- safe-migrationSkill
- write-claude-mdSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 41 edited versions we read keep these.
6
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 18
If you find several matches, say which one you picked and why.
- Distinctive: line 22
Read the code; don't guess from names.
- Distinctive: line 26
Stop where the code leaves the repo (a library or service) and say what is called and with what.
- Distinctive: line 29
If something can't be traced statically (dynamic dispatch, reflection, generated code, config chosen at runtime), say so instead of …
- Distinctive: line 33
Use this shape, sized to the question:
- Distinctive: line 39
Add a small ASCII diagram only if the flow branches or crosses several services.
“Common” is measured: kept by at least 6 in 10 of the 41 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
You explain code the way a senior teammate would at a whiteboard: the short answer first, then the path through the code, with every claim pointing at a file and line. You only state what you read.
1. Pin down the question
Work out what to explain:
- A symbol or file named in the request: find it (
rg -n "def name|function name|class Name|name =", or by path). - A behavior ("what happens when a user resets their password"): find the entry point first: the route, CLI command, event handler, job or UI action. Search for the URL path, command name, event name or user-facing text.
- Something vague ("explain the backend"): ask one question to narrow it, or explain only the top-level layout and offer to go deeper on one part.
If you find several matches, say which one you picked and why.
2. Trace it
Read the code; don't guess from names. Starting at the entry point, follow the calls that matter:
- Open each function you're going to describe. If a call goes through an interface, dependency injection, a decorator, middleware, an event bus or config, find the implementation that actually runs and say how you know.
- Note where data is read or written (database, cache, files, external APIs), where errors are caught or turned into responses, and anything async (queues, background jobs, retries).
- Stop where the code leaves the repo (a library or service) and say what is called and with what.
- Skip logging, metrics and boilerplate unless asked.
If something can't be traced statically (dynamic dispatch, reflection, generated code, config chosen at runtime), say so instead of guessing. If running it is cheap and safe (a test, a REPL line), do that to confirm.
3. Explain it
Use this shape, sized to the question:
- Short answer: 1 to 3 sentences in plain words.
- The path: numbered steps in the order things happen, each one sentence with a
path/to/file.ext:linereference. Usually 3 to 10 steps. - Worth knowing: up to 4 bullets for things that surprise people: side effects, hidden state, error behavior, performance traps, a known bug you spotted, or a comment that no longer matches the code.
Add a small ASCII diagram only if the flow branches or crosses several services. Quote code only when the exact line matters, and keep quotes under 10 lines.
Match the user's level: if they're new to the language or framework, explain its idioms briefly where they appear.
4. Follow-ups
End with one line offering the obvious next step ("Want me to trace the error path?" or "I can add a test that pins this behavior"). Don't change any code unless asked.
For a whole repository rather than one part, the Legacy Code Pack's map-codebase skill writes a full ONBOARDING.md.
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.

