agentleFS
rikilamadridrikilamadrid/pathfinder/skills/learn-codebase/SKILL.md

learn-codebase

Skill1 starsChanged 43 days agoMITView on GitHub

Generate a modular, interactive learning portal that explains an entire codebase at a milestone.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use oh-my-issues, what-the and 7 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.
  • tuliosalustiano27Skill

    oh-my-issues

    Cluster a GitHub issue backlog by root cause into a small set of plan-master issues, redirect children with a standardized comment, and bundle architectural-fix PRs that close clusters atomically. Use when an issue tracker has accumulated dozens of reports that share underlying defects, when asked to triage / consolidate / cluster / dedupe issues, when asked to build a plan series or roadmap from open issues, or when routing a new incoming bug into an existing plan.

    Also in 3 projects that use this

  • tuliosalustiano27Skill

    what-the

    What the? Use when the user wants a plain-English breakdown of something technical — the who, what, where, why, and when.

    Also in 3 projects that use this

  • thedotmackSkill

    pathfinder

    Map a codebase into feature-grouped flowcharts, identify duplicated concerns across features, and propose a unified architecture. Use when asked to "find the ideal path," unify duplicated systems, or audit architecture before a refactor. Emits a proposed unified flowchart plus per-system /make-plan prompts.

    Also in 5 projects that use this

  • tunnckoCoreSkill

    how-it-works

    Use for 'how does X work', code walkthroughs before changing something, and placement / ownership / layering questions ('where should this live', 'which package owns this', 'is this the right layer'). Explains subsystem architecture, runtime flow, onboarding mental models. Can critique architecture. Use why for motivation.

    Also in 4 projects that use this

  • barrelcSkill

    mem-search

    Search kimi-mneme's persistent cross-session memory database. Use when user asks "did we already solve this?", "how did we do X last time?", "what did we do yesterday?", or needs work from previous sessions.

    Also in 3 projects that use this

  • TrecekSkill

    make-plan

    Create implementation plans through deep codebase understanding. Use when user asks to create, devise, or write a plan. Leverages subagents to explore approaches, understand systems, and design aligned solutions.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use for onboarding, milestone review, handoff, or interview preparation — not after every feature.

    line 8
  2. Very specific:

    Do not author the HTML. Do not author CSS, presentation JavaScript, or MDX.

    line 52
  3. Very specific:

    Look it up and pin it; do not use whatever HEAD happens to be, which is only the same thing by accident and stops being the same thing the …

    line 60
  4. Very specific:

    Use requires when a module genuinely builds on another.

    line 93
  5. Distinctive:

    Keep each module a unit someone can finish.

    line 98
  6. Distinctive:

    Every claim about the source carries a citation, in the one shape the renderer uses everywhere:

    line 117
  7. Very specific:

    Every concept section must cite at least one.

    line 124
  8. Very specific:

    If the engine is unavailable, or delivery fails, you may still explain the codebase in conversation or in Markdown where that is useful.

    line 196

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

Learn Codebase

Use for onboarding, milestone review, handoff, or interview preparation — not after every feature.

You write what is true about the repository. render-artifact turns it into the page. Those are different jobs, and this skill only does the first one.

Read

  • the repository's own map: entry points, packages, workspaces, build and CI configuration
  • architecture, major subsystems, and the boundaries between them
  • domain concepts and the vocabulary the code already uses
  • the flows that cross subsystems — a request, an install, a release, a build
  • tests, and what they are actually protecting
  • history and durable decisions, where they explain why the code is shaped this way

Exclude generated, vendored, and build output deliberately, and say so if the exclusion is load-bearing.

Gather all of it before writing any specification. The specification is a record of what you found, so finding has to finish first — a portal assembled while still reading is a portal whose claims were chosen to fit the modules already written.

Output

Two files, one repository:

learning/codebase/lesson.json    the semantic specification — yours
learning/codebase/lesson.html    the rendered artifact — the renderer's

The JSON is the reviewable source. A human can read it, disagree with a claim, and see exactly what was asserted and what backs it. It is also what makes the artifact reproducible: the same specification through the same renderer version produces the same bytes.

One artifact, not a directory. There is no index.html, no modules/ folder, and no assets/ — how a multi-module lesson is split, linked, and navigated is a presentation decision, and presentation is the renderer's. You supply module order and content; the renderer builds the navigation.

Do not author the HTML. Do not author CSS, presentation JavaScript, or MDX. Do not stand up a docs system, a site generator, or a framework for this. There is one visual-artifact path in Pathfinder and it runs through render-artifact.

Process

  1. Gather the evidence — the reading above.
  2. Pick the commit. source.commit is the milestone the portal is about. Look it up and pin it; do not use whatever HEAD happens to be, which is only the same thing by accident and stops being the same thing the moment anything else merges. Evidence resolves against this commit and never against the working tree, so a later refactor cannot silently change what the portal claims.
  3. Write the specification to lesson.json. Read skills/render-artifact/engine/references/specification.md for the fields and engine/examples/lesson.json for the shape. Many modules: this skill teaches a whole repository.
  4. Validate.

    node skills/render-artifact/engine/bin/render.mjs validate \
      learning/codebase/lesson.json
  5. Deliver.

    node skills/render-artifact/engine/bin/render.mjs deliver \
      learning/codebase/lesson.json \
      learning/codebase/lesson.html --json
  6. Report the receipt, and report it honestly. See "What to say afterwards".

Modules

One module per subsystem or concern, ordered so a reader can start at the top and keep going. Modules may include: orientation, architecture, domain and data flow, interfaces, services and integrations, testing, deployment and operations, security boundaries, extension exercises, and a cumulative quiz.

Use requires when a module genuinely builds on another. That is the learning graph, and it is semantic: it says what a reader needs first, not where a box sits on a page. Leave it out when the modules are independent — a flat list is a legitimate shape, not a missing field.

Keep each module a unit someone can finish. A module that has become a second portal is two modules.

Flows, not diagrams

Express a sequence, a relationship, or an architecture walkthrough as a flow section. Its steps carry the order and the dependencies, which is the part that teaches, and the renderer decides how that looks.

There is no diagram section, and this skill no longer promises navigable diagrams. Do not hand-author SVG, do not describe coordinates or layout, and do not reach for a drawing tool to fill the gap. A picture whose meaning is carried by a flow loses nothing that teaches; a picture this skill draws itself is presentation it does not own. Semantic diagram artifacts do exist — map-system produces them, as a separate artifact of its own — and that is still not this skill's output: a lesson gains no diagram section and references no diagram.

Evidence

Every claim about the source carries a citation, in the one shape the renderer uses everywhere:

{ "path": "packages/create-pathfinder/src/kit.mjs", "lines": [97, 105] }

Every concept section must cite at least one. That is not a style preference: a concept is an assertion about the code, and an uncited assertion is this skill putting words in the renderer's mouth. Validation rejects it.

A repository-wide portal makes this easier to get wrong than a feature lesson does, because the claims are broader. "The installer never ships tests" is a claim about a specific list in a specific file — cite that list, not the package it lives in. Breadth is not permission to cite loosely.

lines is optional and, when present, must lie inside that file at that commit. Cite the range a reader should actually look at.

source.generated_at is yours to supply if you want a date on the page. The renderer never reads a clock, so if no date appears in the specification, none appears in the artifact.

Quiz

Questions are multiple choice: a prompt, two to eight distinct options, and the index of the correct one. An explanation and evidence are worth adding.

That one shape covers more than it looks:

To askWrite
true/falsea question with two options
predict the output or the statea code section, then a question about it
a debugging scenariothe symptom as the prompt, candidate causes as options
recall or discriminationan ordinary multiple-choice question

For something a reader should do rather than answer, use an exercise section, with hints when a nudge helps more than a solution. A cumulative quiz at the end works well; so does one per module.

What you cannot ask for

The specification carries no presentation. There is no field for a colour, a class, a width, a layout, an icon, a theme, or a template, and the schema rejects the attempt rather than ignoring it. Interface language — navigation labels, theme controls, accessibility text, the evidence and citation UI — is the renderer's, in its words.

Text is text. No field is Markdown and no field is HTML: every string you write is escaped on the way out, so <b>bold</b> in a title renders as those nine characters. Content that smuggles markup is this skill reaching for presentation by another route.

There is also no field for whether the specification was validated or whether its evidence checked out. Those are claims about work the engine performs, and the engine is the only thing entitled to make them.

What to say afterwards

The receipt names the renderer version and the SHA-256 and byte count of both the specification and the artifact. Report it. It supports one real claim: this specification, compiled by this renderer, produced these bytes, and its evidence resolved at the commit it names.

It says nothing about whether the portal reads well, teaches well, or looks right. Nobody has looked at it. So report the validation result and say separately that perceptual review has not happened. If a human then opens it, that is their finding, in their words — and it is not evidence for the validation result any more than the validation result is evidence for it.

When the renderer cannot run

Check with:

node skills/render-artifact/engine/bin/render.mjs doctor

If the engine is unavailable, or delivery fails, you may still explain the codebase in conversation or in Markdown where that is useful. That answer is not a Pathfinder visual artifact. Do not call it one, do not hand-author HTML or MDX to stand in for one, and do not reach for a second way to produce a page. A non-zero exit is never reported as success, and a failed delivery leaves any previously delivered artifact exactly as it was.

This skill reads widely by design. For one completed feature, use learn-feature instead.

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.