agentleFS
rpraharajrpraharaj/ai-engineer/skills/explore-codebase/SKILL.md

explore-codebase

Skill1 starsChanged 15 days agoMITView on GitHub

Map an unfamiliar repository — stack, install/run/test/lint commands, layout, entry points, and local conventions. Write or update AGENTS.md from evidence. Use when starting in a new repo, onboarding, or before changing code you have not read.

13 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use debug-issue, review-changes and 1 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.
  • NVIDIASkill

    debug-issue

    Use when the user asks to debug, investigate, or fix a GitHub issue or supplies a repository bug report.

    Also in 5 projects that use this

  • DockerSkill

    review-changes

    Review uncommitted or recently committed documentation changes for correctness, coherence, and style compliance. Use before creating a PR to catch issues. "review my changes", "review the diff", "check the fix before submitting", "does this look right".

    Also in 4 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If AGENTS.md exists at the workspace root, read it first.

    line 16
  2. Distinctive:

    Prefer the git root (git rev-parse --show-toplevel).

    line 20
  3. Distinctive:

    Read the manifest scripts and CI jobs.

    line 50
  4. Distinctive:

    If several match, prefer the one CI uses.

    line 57
  5. Very specific:

    If none match, write (unknown).

    line 58
  6. Distinctive:

    Run Test if known. If Test is unknown, try Lint or Build.

    line 64
  7. Distinctive:

    If a command fails because dependencies are missing, run Install once, then retry.

    line 65
  8. Distinctive:

    Do not start long-lived servers unless you need a one-shot health check.

    line 67
  9. Very specific:

    If neither is readable, create only ## This repo and ## Glossary managed sections and report the missing defaults template.

    line 87
  10. Very specific:

    Stop. Next skill is usually shape-work or debug, not a drive-by refactor.

    line 134

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

Explore codebase

Goal: a stranger (human or agent) can run, test, and change this repo without guessing. Do not implement product features. Do not invent commands you did not see in a file or run successfully.

Load

If AGENTS.md exists at the workspace root, read it first.

Step 1 — Find the root

  • Prefer the git root (git rev-parse --show-toplevel). If git is missing or this is not a repo, use the current workspace directory.
  • Record that path as Root.

Step 2 — Detect the stack from files (do not guess)

Scan the root (and obvious packages in a monorepo) for evidence. Record only what exists:

EvidenceMeans
package.jsonJS/TS (lockfile names the manager: pnpm-lock.yaml, yarn.lock, bun.lock / bun.lockb, package-lock.json)
pyproject.toml, requirements.txt, Pipfile, environment.ymlPython
go.modGo
Cargo.tomlRust
pom.xml, build.gradle, build.gradle.kts, settings.gradleJVM (Java/Kotlin)
build.sbtScala
GemfileRuby
mix.exsElixir
composer.jsonPHP
*.csproj, *.sln.NET
Package.swift, *.xcodeprojSwift
pubspec.yamlDart / Flutter
CMakeLists.txtC/C++
*.tf, .terraform.lock.hclTerraform
flake.nix, flake.lock, default.nixNix
deno.json, deno.lockDeno
nx.json, pnpm-workspace.yaml, turbo.jsonJS/TS monorepo
Makefile, justfile, Taskfile.ymltask runner
docker-compose.yml, compose.yml, Dockerfilecontainers
.github/workflows/*, .gitlab-ci.yml, Jenkinsfile, azure-pipelines.ymlCI

Read the manifest scripts and CI jobs. Those are the source of truth for commands.

Step 3 — Resolve commands

For each of Install, Run, Test, Format, Lint, Typecheck, Build:

  1. Take the command from a manifest script, Makefile target, or CI step that clearly matches that job.
  2. If several match, prefer the one CI uses.
  3. If none match, write (unknown). Never substitute a generic npm test / pytest unless that exact command appears or you ran it successfully.

Install only if needed to run tests or the app, and only with the lockfile's package manager.

Step 4 — Run what you can

  • Run Test if known. If Test is unknown, try Lint or Build.
  • If a command fails because dependencies are missing, run Install once, then retry.
  • Capture the command and its exit status. A failed test run is still useful evidence (the command exists).
  • Do not start long-lived servers unless you need a one-shot health check; prefer a unit test or build.

Step 5 — Map the tree

From README, manifests, and a shallow directory listing (not a full dump of node_modules / vendor / dist / .git):

  • Languages and major frameworks actually imported, not every tool in lockfile history.
  • Layout: where apps, libraries, tests, and infra live.
  • Entry points: main, server bootstrap, CLI, mobile apps, jobs.
  • Generated or vendored paths that agents must not edit.
  • How errors are returned and how tests are named — from 2–3 existing files, not from style guides you invent.
  • Domain terms the code and docs already use (type names, module names, comments). Do not invent a glossary.

Step 6 — Write AGENTS.md

If AGENTS.md does not exist: copy the first readable template:

  1. references/agents-template.md next to this skill (always ships with the skill folder)
  2. ../../templates/AGENTS.md when this pack's repo layout is intact

If neither is readable, create only ## This repo and ## Glossary managed sections and report the missing defaults template. Do not invent or maintain another defaults list.

If AGENTS.md exists: replace only the matching managed blocks below. If both markers are absent, append that managed section without replacing existing prose. If markers are unmatched or duplicated, report the ambiguity and leave that section unchanged. Do not rewrite the user's other prose.

Fill every field from evidence. Use (unknown) when you could not prove a command.

## This repo

<!-- managed-by: explore-codebase -->

- **Root:** <absolute or repo-relative root>
- **Languages:** <list>
- **Install:** `<command or (unknown)>`
- **Run:** `<command or (unknown)>`
- **Test:** `<command or (unknown)>`
- **Format:** `<command or (unknown)>`
- **Lint:** `<command or (unknown)>`
- **Typecheck:** `<command or (unknown)>`
- **Build:** `<command or (unknown)>`
- **Layout:** <one short paragraph>
- **Do not edit:** <generated/vendored paths, or (none found)>

<!-- end-managed-by: explore-codebase -->

## Glossary

<!-- managed-by: explore-codebase-glossary -->

- `<Term>` — <one-line meaning as this repo uses it>

<!-- end-managed-by: explore-codebase-glossary -->

Glossary: 5–20 terms taken from this repo. If you cannot find real terms, write - (none yet). Never invent product jargon.

Done

Report:

  1. Root and languages
  2. The commands (and which ones you actually ran, with pass/fail)
  3. Layout + do-not-edit
  4. Path of the AGENTS.md you created or updated
  5. Anything still (unknown) and where a human should look
  6. Glossary term count (or none yet)

Stop. Next skill is usually shape-work or debug, not a drive-by refactor. If the tree has no application yet, next is start-project. If they asked how a feature works, that is explain-code.

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.