agentleFS
legendtkllegendtkl/layered-code-review/skills/explain-slice/SKILL.md

explain-slice

Skill0 starsChanged 26 days agoMITView on GitHub

Write a short, current explainer for one slice of a codebase — a module, feature, data flow or subsystem — before someone changes or reviews it. Use when the user asks how a part of the code works, wants to get up to speed on an area they are about to change, wants onboarding notes for a module, or asks "what should I know before touching X". Read-only; cites file:line throughout; ends with how to change the slice safely (checks to run, risky paths, who needs to look).

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only. Do not edit files.

    line 12
  2. Very specific:

    Keep it to what the reader needs to make their change.

    line 31
  3. Distinctive:

    If the user prefers to learn visually, offer to turn the explainer into a diagram or a small interactive page.

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 a slice of the codebase

Code review used to be how people learned the code. When machines do most of the reading, learning moves here: an explainer for exactly the slice you're about to change teaches more than reading trivial diffs line by line, and it reflects the code as it is today.

Read-only. Do not edit files.

Step 1 — Scope

Pin down the slice: a path, a feature name, or a question ("how does a request get authenticated?"). If it is broad, propose a narrower slice that fits the user's next task. Ask how deep to go only if it is unclear.

Step 2 — Read

  • Entry points: who calls into the slice (routes, CLI commands, jobs, exported functions).
  • Main path: follow one real request or call end to end.
  • State: data structures, storage, caches, config and feature flags it reads.
  • Edges: error handling, retries, concurrency, what it assumes from its callers.
  • History: git log --oneline -20 -- <paths> and any reverts in there; who changes it most.
  • Instructions: CLAUDE.md, REVIEW.md and docs that cover it — and note where they are out of date.

Step 3 — Write

Keep it to what the reader needs to make their change. Every claim cites path:line.

# {Slice}: how it works (as of {short sha})

**In one paragraph:** what it does, for whom, and where it sits in the system.

## Map
{entry points → main components → storage/external calls; a small diagram if it helps}

## One request, end to end
1. `{path}:{line}` {what happens}
2. ...

## Invariants and gotchas
- {thing that must stay true, and where it's enforced}
- {surprising behavior, and why it exists — link the commit if history explains it}

## Changing it safely
- Checks: `{test command for this slice}`, `{other checks}`
- Risk: {paths here that always need a person; blast radius if it breaks}
- Ask {owner / CODEOWNERS entry} before {kind of change}

## Out of date
- {doc or CLAUDE.md line that no longer matches the code}

If the user prefers to learn visually, offer to turn the explainer into a diagram or a small interactive page.

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.