agentleFS
reddygopalkrishnareddygopalkrishna/developer-agent-skills/skills/codebase-onboarding/SKILL.md

codebase-onboarding

Skill8 starsChanged 8 days agoMITView on GitHub

Maps an unfamiliar repository before changing it - stack, build/test/run commands, entry points, data flow, conventions and how changes ship - and writes a short map. Use when starting work in a repo you have not seen, when asked to explain how a codebase works, onboard to a project, find where something lives, or before a first change in a large or legacy codebase. Not for reviewing a specific diff.

  • Reads credentials
  • Installs packages

56 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pytorch-patterns, continuous-agent-loop 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.
  • Yog-SothoSkill

    pytorch-patterns

    PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading. Always activate when the user is writing PyTorch models or training scripts, reviewing deep learning code, debugging training loops or data pipelines, optimizing GPU memory or training speed, setting up reproducible experiments, implementing transfer learning or fine-tuning, or asks anything about nn.Module, DataLoader, autograd, AMP, or torch.compile.

    Also in 6 projects that use this

  • junimnjwSkill

    continuous-agent-loop

    Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls.

    Also in 7 projects that use this

  • loulanyueSkill

    nuxt4-patterns

    Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.

    Also in 4 projects that use this

  • Arnav-0Skill

    api-test-suite-builder

    Use when the user asks to generate API tests, create integration test suites, test REST endpoints, or build contract tests.

    Also in 3 projects that use this

  • royaluniondesign-sysSkill

    content-hash-cache-pattern

    Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.

    Also in 5 projects that use this

  • junimnjwSkill

    carrier-relationship-management

    Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic carrier relationships. Informed by transportation managers with 15+ years experience. Includes scorecarding frameworks, RFP processes, market intelligence, and compliance vetting. Use when managing carriers, negotiating rates, evaluating carrier performance, or building freight strategies.

    Also in 4 projects that use this

  • +3 more from junimnjw

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 52 edited versions we read keep these.

  • 5

    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:

    Not for: reviewing a pull request (see the code-review-changes skill) or debugging a known failure (see the root-cause-debugging skill), …

    line 17
  2. Distinctive:

    Identify the stack from manifests, not guesses: Use the table below. Lockfiles tell you the package manager.

    line 22
  3. Distinctive:

    Search for the user-visible string (error message, UI label, route path) to find where a feature lives.

    line 51
  4. Very specific:

    Search for route registrations: @GetMapping, app.get(, router., [HttpGet], @app.route, urlpatterns, http.HandleFunc.

    line 52
  5. Very specific:

    Wrong package manager: Use the one whose lockfile exists, with its frozen/locked install mode (npm ci, pnpm install --frozen-lockfile, yarn …

    line 62
  6. Very specific:

    Missing services: Look for compose.yaml/docker-compose.yml, .devcontainer/devcontainer.json, or testcontainers usage.

    line 63
  7. Distinctive:

    Private registries or access: If installs fail on authentication, stop and ask the user.

    line 65
  8. Very specific:

    Search for existing helpers before writing new ones: search by verb (parse, format, validate, retry) and by domain noun.

    line 71
  9. Very specific:

    Check CODEOWNERS (or equivalent) to know whose conventions and review apply.

    line 73
  10. Distinctive:

    Ask only what the repo cannot answer, and batch them:

    line 77

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

Codebase Onboarding

Never change code you have not located in its context. Spend the first minutes building a map: what the system is, how it is built and tested, where requests enter, and what conventions the existing code follows. Then prove the map by building and running the tests before you edit anything.

When to use

  • First task in a repository you have not worked in.
  • The user asks "how does this work?", "where is X handled?", or "explain this codebase".
  • A change touches an area you have not read yet in a large or legacy repo.

Not for: reviewing a pull request (see the code-review-changes skill) or debugging a known failure (see the root-cause-debugging skill), though both start faster with a map.

Workflow

  1. Read the human-written guidance first. In this order, if present: README*, CONTRIBUTING*, project instruction files for agents (AGENTS.md, CLAUDE.md, .cursor/rules, .github/copilot-instructions.md), docs/, architecture decision records (docs/adr, adr/). Note stated rules ("never edit generated files", "run make check before commit").
  2. Identify the stack from manifests, not guesses. Use the table below. Lockfiles tell you the package manager; version files (.nvmrc, .python-version, .tool-versions, go.mod go directive, global.json, rust-toolchain.toml) tell you the runtime version.
  3. Find the real commands. Treat CI configuration as the source of truth: it is what actually runs. Check, in order: CI files (.github/workflows/, .gitlab-ci.yml, azure-pipelines.yml, Jenkinsfile), task runners (Makefile, justfile, Taskfile.yml), package scripts (package.json scripts, pyproject.toml tool sections, build.gradle), then README. Record build, test, lint, format, type-check and run commands.
  4. Locate entry points. Where execution starts: main functions, cmd/ (Go), src/main/java/**/Application.java, Program.cs, manage.py/wsgi.py/asgi.py, app/ or pages/ (Next.js), bin/, index.ts/server.ts, Dockerfile CMD/ENTRYPOINT, serverless handler configs.
  5. Trace one request or job end to end. Pick one representative feature (the one the user cares about, if known). Follow it: route/handler or consumer, validation, business logic, data access, external calls, response. Note file paths at each hop. One real trace teaches more than reading folders.
  6. Learn the conventions from existing code. Find two or three files similar to what you will write. Note naming, error handling, logging, dependency injection, test style, and folder placement. New code must look like its neighbours.
  7. Map tests. Where unit, integration and end-to-end tests live; how fixtures and test data work; which tests need services (database, queue) and how CI provides them (service containers, docker compose, testcontainers).
  8. Map config and environments. Config files, env var loading (.env.example, settings modules), feature flags, secrets source. Never print or copy real secret values into notes.
  9. Learn how changes ship. Branching model, PR template, required checks, release/deploy process (CI deploy jobs, release scripts, changelog tooling), generated code and how to regenerate it.
  10. Write the map using references/map-template.md. Keep it to one page. Put it where the user wants it (reply, or a notes file if asked); don't commit it unless asked.
  11. Verify the map. Install dependencies, build, and run the test suite (or the fastest meaningful subset) with the commands you found. If they fail before you changed anything, record that as the baseline and tell the user; don't "fix" unrelated failures silently.

Stack identification

FileTells you
package.json + pnpm-lock.yaml / yarn.lock / package-lock.json / bun.lock*Node/TS; package manager is the one whose lockfile exists
pnpm-workspace.yaml, nx.json, turbo.json, lerna.jsonJS monorepo (see the monorepo-management skill)
pyproject.toml, uv.lock, poetry.lock, requirements*.txt, setup.cfgPython; uv.lock/poetry.lock name the tool
go.mod, go.workGo module / workspace
pom.xml, build.gradle(.kts), settings.gradle(.kts)Java/Kotlin with Maven or Gradle
*.sln, *.csproj, Directory.Build.props.NET
Cargo.toml, Cargo.lockRust (a [workspace] table means multiple crates)
Gemfile, composer.json, mix.exsRuby, PHP, Elixir
Dockerfile, docker-compose.yml, compose.yamlHow it runs locally / in production
*.tf, Chart.yaml, kustomization.yaml, *.bicepInfrastructure as code and deployment
openapi.*, *.proto, schema.graphqlAPI contracts, often used for code generation

Fast ways to find things

  • Search for the user-visible string (error message, UI label, route path) to find where a feature lives.
  • Search for route registrations: @GetMapping, app.get(, router., [HttpGet], @app.route, urlpatterns, http.HandleFunc.
  • List the largest and most-changed files: git log --format= --name-only | sort | uniq -c | sort -rn | head -20 shows hot spots; they are usually the core.
  • git log --oneline -20 and recent merged PRs show what the team is working on and how they write commits.
  • git shortlog -sn --since="1 year ago" -- <path> shows who to ask about an area.

When the baseline build fails

Work through these before concluding the repo is broken:

  1. Runtime version mismatch (the most common cause). Compare your runtime with the version files from step 2 and switch to the pinned version with the repo's version manager (nvm, pyenv, asdf/mise, SDKMAN, rustup).
  2. Wrong package manager. Use the one whose lockfile exists, with its frozen/locked install mode (npm ci, pnpm install --frozen-lockfile, yarn install --immutable on Yarn Berry, uv sync --locked, poetry install). Don't regenerate or delete the lockfile to make an install pass.
  3. Missing services. Look for compose.yaml/docker-compose.yml, .devcontainer/devcontainer.json, or testcontainers usage; CI service definitions show exactly what tests need.
  4. Missing configuration. Copy .env.example (or similar) with placeholder values. Ask the user for real values; never invent credentials or reuse secrets found elsewhere.
  5. Private registries or access. If installs fail on authentication, stop and ask the user. Don't try to work around access controls.
  6. Record every fix you needed in the map's "Commands" section so the next person (or agent) doesn't repeat the investigation.

Placing a change

  • Find the existing feature most similar to what you are building and mirror its structure, file placement and tests.
  • Search for existing helpers before writing new ones: search by verb (parse, format, validate, retry) and by domain noun.
  • Find the tests that cover the area and run them before and after the change.
  • Check CODEOWNERS (or equivalent) to know whose conventions and review apply.

Questions to ask the user

Ask only what the repo cannot answer, and batch them:

  • Which part of the system matters for this task?
  • Are there environments or services I must not touch (production databases, shared staging)?
  • Are the failing tests (if any) known failures?
  • Any conventions not written down (preferred libraries, banned patterns)?

Anti-patterns

  • Editing before mapping - writing code in the first minutes and then discovering an existing helper, a generator, or a convention you violated.
  • Trusting the README over CI - READMEs go stale; CI is what runs. When they disagree, follow CI and mention the drift.
  • Reading every file - breadth-first folder reading burns time. Trace one real path instead.
  • Inventing commands - running npm test when the repo uses pnpm turbo test, or pytest when tests run through tox or nox.
  • Editing generated code - files with "DO NOT EDIT" headers, generated/ folders, or outputs of OpenAPI/protobuf generators. Change the source and regenerate.
  • Fixing unrelated failures silently - a red baseline is information for the user, not a license to change unrelated code.

Done when

  • You can state the stack, runtime versions and package manager with the file that proves each.
  • Build and test commands are recorded and you have run them (or explained why you could not).
  • One representative request/job is traced end to end with file paths.
  • Conventions for the area you will change are written down.
  • The one-page map exists and the user has it.

References

  • references/map-template.md - read when writing the codebase map in step 10.

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.