code-explanation
Skill4 starsChanged 9 months agoMITView on GitHub
Use this skill when writing code comments, explaining code decisions, documenting the "why" behind implementation choices, or narrating technical reasoning in PRs or architecture docs. Trigger on keywords: explain this code, why did you write it this way, add comments, document this, write inline comments, explain my decision.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- thalysjuvenal/advpl-specialisttheir own version, first seen Nov 25, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- DevelopersGlobal/ai-agent-skillstheir own version, first seen Oct 25, 2026
- Leanmcp/superview.shtheir own version, first seen Oct 13, 2026
- chatgptprojects/claude-codetheir own version, first seen Oct 8, 2026
- chatgptprojects/clear-codetheir own version, first seen Oct 8, 2026
Used with
Projects with it also use analyze-exports, fireworks-inference 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.
LeanmcpSkillanalyze-exports
Analyze tau2-bench task export files to identify exactly where and why tasks failed. Map failures to specific conversation rounds, show root causes, check whether relevant documentation was available, and cite sources. Use this skill whenever you need to debug a tau2-bench evaluation, understand why an agent made wrong decisions, identify missing knowledge, or review task performance—especially when context length, eligibility criteria, or policy compliance might be at fault.
Also in 4 projects that use this
LeanmcpSkillfireworks-inference
Run inference on Fireworks AI — direct, through the Leanmcp AI Gateway proxy (aigateway.leanmcp.com) for observability, or via LiteLLM / the OpenAI SDK / raw HTTP. Covers the endpoint-and-key matrix for each route, serverless vs dedicated deployments and their cold starts, browsing and filtering the model catalogue, reasoning models that return content:null with the answer in reasoning_content, function calling, concurrency and load testing, and runner scripts where many models share one protocol with a --use-proxy toggle. Use this skill whenever the user mentions Fireworks, FIREWORKS_API_KEY, api.fireworks.ai, fireworks_ai/ model ids, accounts/fireworks/models/..., a Fireworks deployment id, the Leanmcp gateway or LEANMCP_API_KEY, app.leanmcp.com observability, or gpt-oss / kimi / glm / qwen / deepseek served on Fireworks; wants to route LLM calls through a proxy for logging or cost tracking; is debugging empty responses, 404s, scope errors, cold starts, or "the gateway isn't working"; wants to pick a Fireworks model with tool calling; or wants to sweep several models over one benchmark. Reach for it even on vague asks like "why is this model returning nothing" or "set up inference for these models" when Fireworks is in play.
Also in 4 projects that use this
- +10 more from Leanmcp
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- Leanmcp/superview.sh★ 2.1ksame name
- chatgptprojects/claude-code★ 2.1ksame name
- chatgptprojects/clear-code★ 2.1ksame name
- Leanmcp/gateway-skills★ 2.1ksame name
- DevelopersGlobal/ai-agent-skills★ 220same name
- thalysjuvenal/advpl-specialist★ 202same name
- ishandutta2007/Awesome-Claude-Skills★ 16same name
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 repository37 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- ai-agent-designSkill
- ai-assisted-learningSkill
- ai-prompting-patternsSkill
- api-designSkill
- backend-devSkill
- career-growthSkill
- client-communicationSkill
- code-readingSkill
- code-reviewSkill
- cross-functional-collabSkill
- database-designSkill
- debugging-mindsetSkill
- devops-cicdSkill
- doc-creationSkill
- focus-productivitySkill
- frontend-designSkill
- git-workflowSkill
- incident-responseSkill
- internal-commsSkill
- interview-prepSkill
- mcp-builderSkill
- performance-reviewSkill
- problem-solvingSkill
- prompt-engineeringSkill
- research-synthesisSkill
- resume-portfolioSkill
- self-healing-mindsetSkill
- side-project-planningSkill
- sprint-planningSkill
- system-designSkill
- technical-communicationSkill
- technical-mentoringSkill
- tech-researchSkill
- testingSkill
- threat-modelingSkill
- web-artifacts-builderSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
2
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 12
If you need a comment to explain what the code does, the code should be cleaner.
- Distinctive: line 75
When your PR makes non-obvious decisions, explain them:
“Common” is measured: kept by at least 6 in 10 of the 5 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
Code Explanation
Core Principle
Comments explain WHY. Code explains WHAT.
If you need a comment to explain what the code does, the code should be cleaner. If you need a comment to explain why it's done this way — write that comment.
The Four Levels of Code Explanation
| Level | Where | Explains |
| Inline comment | Next to specific line | Non-obvious logic or gotcha |
| Function docstring | Top of function | What it does, parameters, returns, side effects |
| Module header | Top of file | What this module is responsible for |
| Architecture note | README / ADR | Why this approach was chosen over alternatives |
What to Comment (and What Not To)
Comment This
// Using exponential backoff here because the payment API
// has a 429 rate limit that triggers on burst traffic
await retryWithBackoff(() => paymentAPI.charge(amount))
// Intentionally not validating here — validation happens
// upstream in the middleware layer (see auth.middleware.ts)
const user = req.user
// This looks backwards but the API returns results
// in reverse chronological order — newest = index 0
const latest = results[0]Don't Comment This
// Increment counter by 1
count++
// Check if user is authenticated
if (user.isAuthenticated) {Docstring Template
/**
* Calculates the discount amount for a given order.
*
* @param order - The order to calculate discount for
* @param promoCode - Optional promo code to apply
* @returns The discount amount in cents, or 0 if no discount applies
* @throws InvalidPromoCodeError if the promo code format is invalid
*
* Note: Does NOT check if the promo code is active —
* call validatePromoCode() first.
*/PR Description: Explaining Your Decisions
When your PR makes non-obvious decisions, explain them:
## Technical Decisions
**Why I chose X over Y:**
[reasoning — constraints, trade-offs, what you considered]
**Known limitations:**
[what this doesn't handle and why that's acceptable for now]
**What I'd do differently with more time:**
[honest reflection — shows growth mindset]Architecture Decision Records (ADR)
For significant technical decisions, write a short ADR:
# ADR: [decision title]
**Date:** [date]
**Status:** Accepted
## Context
[What situation led to this decision?]
## Decision
[What did we decide to do?]
## Reasoning
[Why this over the alternatives?]
## Trade-offs
[What do we give up with this choice?]
## Consequences
[What becomes easier? What becomes harder?]Store in /docs/decisions/ or similar — these are gold for future developers.
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.

