agentleFS
asta-nguyenasta-nguyen/agent-devkit/skills/read-codebase-context/SKILL.md

read-codebase-context

Skill4 starsChanged 3 months agoMITView on GitHub

Use when preparing to change or plan code in an unfamiliar repository, or when asked to explain code, trace a flow, find callers, dependencies, or tests, identify affected files, or assess change impact.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 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.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the active spec or plan has an ## Impact map, first check whether it has Verified at: <full commit SHA>.

    line 10
  2. Very specific:

    Check docs/llm/AGENTS.md and docs/llm/INDEX.md independently.

    line 27
  3. Distinctive:

    Search in this order: Locate → Expand → Confirm → Read.

    line 34
  4. Distinctive:

    Search/index results are navigation.

    line 50
  5. Distinctive:

    After persisting a decision, optionally write only its title and file path to memory.

    line 63
  6. Distinctive:

    Read any existing entry point, implementation, direct callers, and downstream callees until the source establishes persistence and external …

    line 65
  7. Very specific:

    If the planned entry point or flow does not exist yet, do not invent current callers or trace nonexistent symbols.

    line 71
  8. Very specific:

    When refreshing a map read from an active spec or plan, write the refreshed map back to that same artifact and update Verified at to the …

    line 89
  9. Distinctive:

    Never fabricate a file impact list from index results or memory alone.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Read Codebase Context

Choose tools by purpose; current source and tests establish facts.

When the active spec or plan has an ## Impact map, first check whether it has Verified at: <full commit SHA>. Verify that commit exists and is an ancestor of HEAD with git cat-file -e <sha>^{commit} and git merge-base --is-ancestor <sha> HEAD. If the SHA is missing, unavailable, or not an ancestor (for example, after a rebase), discard the map for navigation and trace existing source below. When no commit existed at map creation, re-trace existing source; if the planned source does not exist yet, use the source-less map rule in step 5 instead of tracing a nonexistent flow.

For a valid SHA, run git status --short and git diff --name-only <verified-sha> to find committed, staged, and unstaged tracked changes since the map; add untracked paths from git status --short. Re-trace changed and newly touched paths, then always run Confirm for every entry-point and implementation symbol in the map across the current repository using FFF multi-pattern grep or rg. Read current source for every file to edit and every newly found caller. The map guides navigation, not evidence.

  1. Check docs/llm/AGENTS.md and docs/llm/INDEX.md independently. If both exist, read both and open the relevant linked page. If only INDEX.md exists, read it, open a relevant linked page, and report the missing AGENTS.md. If only AGENTS.md exists, read it, report the missing index and no verified wiki page coverage. If neither exists, report no verified wiki coverage and continue. If an existing index has no relevant linked page, report no verified coverage for this task and continue.
  2. Search in this order: Locate → Expand → Confirm → Read. Each tool is optional; use the fallback when it is unavailable, fails, or returns irrelevant results. Do not retry a failed tool repeatedly.

    StageNeedTool
    LocateConcept or behaviorOpenEZ code_query with path: <repo root>
    LocateApproximate filenameFFF fuzzy file find (find_files); fallback rg --files
    LocateIdentifier or literalFFF grep (grep); fallback scoped rg
    LocateRegexrg
    ExpandCallers and calleesOpenEZ code_context at 1–2 hops
    ConfirmDynamic or registration referencesFFF multi-pattern grep (multi_grep), fallback rg; search symbol, string, route, config key, camelCase/snake_case variants
    ReadLarge-file structureOpenEZ code_outline, then read needed current-source ranges; fallback rg and direct reads

    FFF grep is literal; regex uses rg. Pass maxResults to FFF and maxTokens (about 1,500–3,000) to OpenEZ only when supported by the schema. Search/index results are navigation; read current source for evidence.

  3. Query OpenEZ directly with the repo path; never require list_workspaces first. On unavailable, error, not indexed, or irrelevant results, fall back once to FFF/rg and direct reads. Mention setup-openez only when direct search cannot establish a needed relationship; never recommend it by repo size or install/configure tools silently.
  4. OpenEZ lines and callers are hints. For git status --short paths, get positions from FFF/rg plus a direct read, or call OpenEZ index_workspace (mode: "incremental") for the already-registered current workspace and re-query; setup-openez owns new registration. memory_recall with 1–3 task keywords may locate decisions or handoffs; use maxTokens if supported and read the file before relying on it. After persisting a decision, optionally write only its title and file path to memory; never make memory the sole record.
  5. Read any existing entry point, implementation, direct callers, and downstream callees until the source establishes persistence and external boundaries. Inspect state changes, storage/external adapters, jobs, events, email/notifications, authorization, error paths, and relevant tests. Record an impact map:

    If the planned entry point or flow does not exist yet, do not invent current callers or trace nonexistent symbols. Keep the same fields and write Entry: no existing source; planned entry: <approved file + symbol> and Flow: no existing flow; planned flow: <approved flow>. Use planned files, effects, and checks only when the approved design specifies them. Write not specified in approved design for unknown planned behavior; do not present a planned map as a source trace.

    Entry: <file + symbol>
    Flow: <caller → implementation → dependency>
    State changes: <persistence or "none found">
    External effects: <storage/job/event/email/notification or "none found">
    Change candidates: <files likely to modify>
    Verification: <tests/checks to run>
    Verified at: <output of `git rev-parse HEAD`, or "no commit exists">

    When refreshing a map read from an active spec or plan, write the refreshed map back to that same artifact and update Verified at to the current baseline. If new evidence changes approved behavior or scope, return to its approval gate instead of silently changing the artifact.

  6. Never fabricate a file impact list from index results or memory alone.

The local .openez/ directory is derived index data. Keep it out of source documentation and version control unless the target repository explicitly chooses otherwise.

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.