agentleFS
YassimbaYassimba/loom/skills/explain-code-flow/SKILL.md

explain-code-flow

Skill9 starsChanged 2 months agoApache-2.0View on GitHub

Explain a feature's runtime flow, data transformations, and input/output contracts as a visual narrative with Mermaid. Use when explaining code flow, creating a code walkthrough, or tracing an object's full lineage.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    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:

    Start at the runtime entry point or public API, not an arbitrary file.

    line 15
  2. Distinctive:

    Follow the happy path from input to final output before adding branches.

    line 17
  3. Distinctive:

    Write a section outline before writing prose or code.

    line 27
  4. Very specific:

    Treat each section as one conceptual chunk.

    line 34
  5. Distinctive:

    Do not reproduce complete files: source code remains the source of truth.

    line 39
  6. Distinctive:

    Read references/content-brief-by-type.md to choose each diagram and references/authoring-invariants.md to keep it focused.

    line 41
  7. Very specific:

    When comparing revisions, read references/diagram-diff.md.

    line 47

≈ “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 Code Flow

Explain a feature's data flow: inputs, transformations, outputs, side effects, decisions, and failures. Ground every claim in actual code, with source references and explicit unknowns. Before tracing, read references/repository-evidence.md.

Trace the story

  1. Start at the runtime entry point or public API, not an arbitrary file.
  2. Find the data spine: the important object or value that crosses stages.
  3. Follow the happy path from input to final output before adding branches.
  4. Trace failures, retries, and background or parallel processes as separate flows.
  5. Choose the clearest psychological order: top-down, data-centric, request narrative, or problem-solution. Explain in the order a reader needs, not filesystem order.

For object lineage, trace creation, mutations, mappings, copies, storage, and consumers. Show every identity or shape change and meaningful branch.

Build narrative chunks

Write a section outline before writing prose or code. Each section should:

  1. Motivate the problem it solves
  2. Show a diagram
  3. Present the relevant code through focused excerpts and verified file:line references
  4. Explain non-obvious decisions

Treat each section as one conceptual chunk. Use one fenced mermaid block per concept; do not cram everything into one diagram. Label edges with the data type or action being performed, keep diagrams to about 10–15 nodes, and split larger concepts. Place each diagram before the code it describes so the reader has a mental model first.

Do not reproduce complete files: source code remains the source of truth.

Read references/content-brief-by-type.md to choose each diagram and references/authoring-invariants.md to keep it focused. Prefer operations in nodes and data on arrows. Add sequence, class, ER, state, or field-lineage views only when they answer a different question.

When comparing revisions, read references/diagram-diff.md. Show additions with :::green, removals with :::red, and changes with :::orange where supported.

Deliver the walkthrough in chat with fenced mermaid blocks. Do not generate SVG, HTML, or image artifacts. The reader should be able to follow inputs to results without reconstructing the call graph.

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.

Reviews can't be read right now.

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.