agentleFS
matheusplealmatheuspleal/skills/explain/SKILL.md

explain

Skill1 starsChanged 4 months agoMITView on GitHub

Explains something from the current conversation at a chosen depth — `tldr` answers in a few lines with no preamble, `default` gives the answer plus the why and the key mechanics, `deep` gives a structured walkthrough with diagrams and offers a version with the diagrams rendered in Mermaid. Grounds every claim in what the conversation and the code actually show, and never edits anything. Invoke with `/explain [tldr|default|deep] <subject>`; with no subject it explains the most recent substantive thing in the conversation.

143 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use debug-fix, socratic 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.
  • zebbernSkill

    debug-fix

    Find and fix a bug or issue — from any source (GitHub issue, error message, user report, or observed behavior)

    Also in 3 projects that use this

  • neurofooSkill

    socratic

    Socratic questioning to examine beliefs, uncover assumptions, and develop deeper understanding. Use to challenge thinking, evaluate proposals, or teach without lecturing.

    Also in 4 projects that use this

  • ralphkraussSkill

    resolve-conflicts

    Resolve git merge conflicts or re-apply changes from a stale branch onto current main. Use when user says "resolve conflicts", "merge conflicts", "rebase branch", "branch is behind", "re-apply changes", "port branch", or a branch is too far behind main to merge cleanly.

    Also in 4 projects that use this

  • VercelSkill

    next

    Next.js renderer for json-render that turns JSON specs into full Next.js applications with routes, layouts, SSR, and metadata. Use when working with @json-render/next, building Next.js apps from JSON specs, or creating AI-generated multi-page applications.

    Also in 5 projects that use this

  • quantumaikrSkill

    score

    quant.cpp의 5차원 스코어링 하네스를 실행하고 결과를 분석한다. 'score', '점수', '현재 상태', '스코어', '평가' 요청 시 사용. 구조/정확성/품질/성능/통합 5개 차원을 자동 측정하고, 병목 차원과 다음 최적 행동을 추천한다.

    Also in 3 projects that use this

  • AntaresYuanSkill

    iterate

    Meta-skill for skill self-improvement. After another skill finishes a run, /iterate analyzes the run's logs (friction events, retries, sub-agent rejections, pacing mismatches, bugs), produces a structured retrospective report, accumulates per-class friction counts, and — when a class crosses the configured threshold — opens a PR to that skill's open-source repo with a proposed SKILL.md diff. NEVER auto-merges; the human always reviews. Target skills opt in by declaring an `iteration:` block in their frontmatter. Invoke when the user says "iterate this skill", "iterate /devloop", "run a retro on the last skill run", "/iterate <skill-name>", or when a target skill auto-hands-off at end of its run.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 126 edited versions we read keep these.

  • 6

    Distinctive

    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:

    If explaining exposes something said earlier in the conversation as wrong — including something you said — state it plainly at the top.

    line 40
  2. Distinctive:

    Write in the user's language.

    line 58
  3. Distinctive:

    No padding in any mode: don't restate the question, don't open with "Sure" or praise, don't close with "let me know if…".

    line 60
  4. Very specific:

    If the honest answer doesn't fit, give the core and name in one clause what was left out — /explain deep covers it.

    line 68
  5. Distinctive:

    No diagram by default. A tiny ASCII sketch (3–5 lines) is fine when a flow written as prose would be harder to follow than drawn.

    line 78
  6. Distinctive:

    The rendered version: When the explanation has at least one diagram, end with exactly one line in the user's language offering it as a page …

    line 117
  7. Distinctive:

    If the host can publish a page — Claude Code's Artifact tool, for instance — publish the full explanation there with the diagrams rendered, …

    line 120

“Common” is measured: kept by at least 6 in 10 of the 126 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

Explain something the user is looking at right now — a change just made, an error, a decision, a piece of code, a concept the conversation touched — at the depth they asked for. The conversation is the primary source: what was read, what was changed, what was decided, and what the user has already shown they understand. A generic explanation of the topic is what they'd get from a search engine; the value here is explaining this instance, in this context.

Invocation

/explain [tldr|default|deep] <subject>

Match the first word of the arguments, case-insensitively:

First wordMode
tldr, brief, short, resumidotldr
default, or no recognized tokendefault
deep, detailed, detalhadodeep

Anything else is the start of the subject. Never ask which mode to use: no token means default, and a question before the answer costs more than any answer at the wrong depth — the user can rerun with another token in one line.

Resolving the subject

  • Subject given → explain that, anchored in the conversation. "Why the cache?" means the cache from this conversation, not caching in general.
  • No subject → explain the most recent substantive thing: the last change made, the last error, the last decision or recommendation, the last thing the user pasted. Open with one line naming it (Explaining: the retry backoff in queue.ts) so the user can redirect with a single message.
  • Ambiguous subject (two things in the conversation share the name) → take the most recent and name it in the first line, the same way.
  • Empty conversation and no subject → ask in one line what to explain. That is the only question this skill asks.

Grounding

The worst explanation is a confident description of code that actually does something else, so:

  • A claim about code in the project cites path:line from a read made in this session. If a claim depends on code not yet read, read it before asserting it, within the mode's budget below.
  • Anything not verified — library internals recalled from memory, behaviour not observed — is marked as inferred, in a few words ("from memory, not checked against the installed version").
  • If explaining exposes something said earlier in the conversation as wrong — including something you said — state it plainly at the top. An explanation that quietly routes around an earlier mistake leaves the user believing both.

How far to investigate depends on the mode:

ModeBudget
tldrwhat's already in context; open at most one file to confirm the claim the answer rests on
defaultread whatever is needed so nothing checkable is asserted from memory
deepfollow the flow across files as far as the explanation needs

Read-only

Explaining never changes anything. Read files, search, and run commands that only inspect (git log, git diff, ls); don't edit files or run anything with side effects — installs, migrations, git writes, requests that mutate state. If the explanation surfaces a bug or a better approach, name it in one line at the end and stop. Fixing it is a separate request the user can make once they've understood the problem.

Calibrating to the user

The conversation shows what the user already knows: the terms they use correctly, the code they wrote, what they asked before. Don't define those. Do define what the explanation depends on and they have never mentioned.

Write in the user's language. Identifiers, code, and error messages stay exactly as they are.

No padding in any mode: don't restate the question, don't open with "Sure" or praise, don't close with "let me know if…".

Modes

tldr

The answer in at most ~4 lines. The first sentence is the one the user would keep if they read nothing else. No headings, no diagrams, no code blocks; bullets only if the answer is literally a short list; at most one inline path:line.

If the honest answer doesn't fit, give the core and name in one clause what was left out — /explain deep covers it. Compress by cutting detail, never by dropping the caveat that changes the answer.

Example — /explain tldr why did the test fail?

parseDate converts to UTC twice — once in the fixture and again at src/date.ts:42 — so the expected date lands a day early in any timezone west of UTC. Building the fixture with Date.UTC removes the double conversion.

default

Roughly 10–25 lines: the answer, why it's that way, and the mechanics needed to see it working. Short paragraphs or bullets, path:line references, and at most one code snippet, used only when reading the code is clearer than describing it. No headings unless the subject genuinely has separate parts.

No diagram by default. A tiny ASCII sketch (3–5 lines) is fine when a flow written as prose would be harder to follow than drawn.

Example — /explain right after adding a cache:

Explaining: the stale-while-revalidate cache in fetchProfile

fetchProfile now returns the cached profile immediately and refreshes it in the background (src/profile.ts:18), so after the first load the page never waits on the network.

  • The cache is keyed by user id and lives in memory, so it resets on every deploy.
  • A refresh that fails keeps the stale entry instead of evicting it (src/profile.ts:31) — the user sees slightly old data rather than an error.
  • Two components asking for the same profile at once share one in-flight request (src/profile.ts:24).

The trade-off is freshness: a renamed user sees the old name until the background refresh lands, which is usually under a second but unbounded if the API is down.

deep

For when the user wants to understand the mechanism, not just the answer. Length follows the subject. Use this order and skip any section that would be empty:

  1. In one line — the answer, so a reader who stops here still got it.
  2. Context — why this exists, what problem it solves, what the alternative was.
  3. How it works — step by step, in the order things actually happen, each step anchored to path:line when it's code.
  4. Diagrams — see below.
  5. Edges and trade-offs — failure modes, limits, what it costs, when it would be the wrong choice.
  6. Where to look — the files and entry points to read next, in reading order.
  7. Unverified — what the explanation inferred rather than checked.

Diagrams. Draw one when it shows something the prose can't: the shape of a flow, who calls whom over time, which states exist and what moves between them. Choose the form from the mechanism — control or data flow as boxes and arrows, interactions over time as a sequence with lanes, a lifecycle as states and transitions, structure as a dependency tree. A diagram that only restates a bullet list as boxes is decoration; leave it out.

Draw them inline as ASCII with box-drawing characters, at most ~70 columns wide, so they read in a terminal and in a narrow pane. Label every arrow with what travels on it.

client          api             db
  │──POST /pay──▶│               │
  │              │──BEGIN───────▶│
  │              │──INSERT──────▶│
  │              │◀──ok──────────│
  │◀──202────────│               │

The rendered version. When the explanation has at least one diagram, end with exactly one line in the user's language offering it as a page with the diagrams rendered in Mermaid. If the user accepts:

  • Translate each ASCII diagram into Mermaid (flowchart, sequenceDiagram, stateDiagram-v2, …) rather than redrawing it, so the page and the chat say the same thing.
  • If the host can publish a page — Claude Code's Artifact tool, for instance — publish the full explanation there with the diagrams rendered, following that tool's own rules.
  • Otherwise write a Markdown file with fenced mermaid blocks to the system temp directory and give its absolute path; VS Code's and GitHub's previews render it. Don't write it into the project unless the user names a location there — an explanation is not a project artifact.

Changing depth on the same subject

When the user runs /explain again on the subject just explained, with a different mode, build on what was already said. Going deeper: skip what they already have and spend the length on what the shorter version left out. Going shallower: distill rather than truncate — the tldr of a deep explanation is its conclusion, not its first four lines.

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.