agentleFS
LuisUrrutiaLuisUrrutia/skills/explain-code/SKILL.md

explain-code

Skill2 starsChanged 56 days agoMITView on GitHub

Use when explaining how existing code works or which component owns a behavior.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use write-tests, refactor and 2 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.
  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 4 projects that use this

  • GitHubSkill

    refactor

    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

  • NVIDIASkill

    deep-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

  • AWSSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill directly; no coordinator or upstream skill is required.

    line 10
  2. Distinctive:

    Use the question, conversation, and repository to identify the behavior and the reader's purpose: getting oriented, understanding a …

    line 14
  3. Distinctive:

    Use their question to choose the technical depth.

    line 16
  4. Very specific:

    Keep neighboring tasks distinct.

    line 20
  5. Distinctive:

    Do not turn that explanation into a review or a general activity report.

    line 24
  6. Distinctive:

    If the request combines tasks, preserve them and their existing owners.

    line 26
  7. Distinctive:

    Keep guarantees at the boundary the evidence covers: an internal status or a provider's acknowledgement does not establish later delivery …

    line 48
  8. Distinctive:

    Keep source, tests, configuration, and remote state unchanged.

    line 52
  9. Distinctive:

    Use a diagram, small example, or excerpt when it clarifies that relationship.

    line 66
  10. Very specific:

    Keep it consistent with the real path and distinguish illustrative inputs from observed execution.

    line 67
  11. Distinctive:

    Put source locations beside the claims they support, with a short navigation map only when it helps the reader continue.

    line 72
  12. Distinctive:

    When asked to check or update this skill from its sources, read references/upstream-updates.md.

    line 86

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Explain code

Explain an existing system from its source: what happens, which component owns each responsibility, and where the behavior lives. Use this skill directly; no coordinator or upstream skill is required.

Establish the question

Use the question, conversation, and repository to identify the behavior and the reader's purpose: getting oriented, understanding a mechanism, or finding an owner. Use their question to choose the technical depth. State a useful scope when the request is broad; ask only when an unresolved ambiguity would materially change the answer.

Keep neighboring tasks distinct. Investigating an observed failure belongs to debug; reconstructing a historical decision belongs to explain-decisions. For a mechanism changed by a branch or commit, resolve the requested revision and explain the relevant before and after behavior from the diff and source. Do not turn that explanation into a review or a general activity report. Explain the requested mechanism without silently starting repairs, a diff audit, or a course. If the request combines tasks, preserve them and their existing owners.

Trace the mechanism

Find the entry point and read the actual implementation. Follow the relevant calls, data transformations, state changes, and boundaries until the requested behavior is accounted for. Check the callers, configuration, and tests that decide which path is active; names and an isolated function are insufficient evidence.

For a cross-component question, split the exploration into useful angles such as request handling, state ownership, and background work. Investigate directly. Parallel exploration is optional only when the host and task authorize it; it must preserve the same scope and read-only authority. Reconcile findings against the source before presenting them. Do not require particular models or tools.

Separate what the code establishes, what a test or execution actually demonstrates, and what remains an inference. Read-only inspection does not establish production configuration, external service guarantees, or runtime success. Identify missing connections and conflicting documentation instead of filling them in. Use current primary documentation when an external API's semantics are needed to explain the path, matching the project's version.

Keep guarantees at the boundary the evidence covers: an internal status or a provider's acknowledgement does not establish later delivery or user-visible success. State the condition when a subsequent worker or external system must act.

Keep source, tests, configuration, and remote state unchanged. Observe execution only when necessary and within the task's authority and safe local setup; reading a test does not mean it passed. A requested explanatory artifact may be written at its agreed destination. Do not create lesson files, learning records, or other persistent infrastructure merely to answer a question.

Make the explanation usable

Answer the question first, respecting the requested depth and length in this response. Define necessary terms in place and follow a representative input or user action through the actual components. Include a branch, failure path, or state transition when it changes the answer. A list of functions is a navigation aid, not the explanation of their relationship.

Use a diagram, small example, or excerpt when it clarifies that relationship. Keep it consistent with the real path and distinguish illustrative inputs from observed execution. Scale the format to the question; a narrow answer needs no fixed sections. Guided teaching and exercises belong to teach; study plans belong to learning-plan. Use them when requested, not for every explanation.

Put source locations beside the claims they support, with a short navigation map only when it helps the reader continue. Distinguish a component's present function from its authors' historical reasons. Include a documented reason when relevant, but preserve its attribution and uncertainty. Code shape alone does not prove why the design was chosen. A recommendation about where new behavior should live must be labeled as advice grounded in observed ownership and conventions.

Finish when the requested path, ownership, and material limits are explained, or when an inaccessible prerequisite limits the answer. State what remains unknown and which evidence would resolve it. Deliver the explanation itself rather than an activity report.

Source maintenance

When asked to check or update this skill from its sources, read references/upstream-updates.md. Ordinary explanation does not fetch upstream or require another skill.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.