agentsclimarketplace

Codebase onboarding

Skill gurinderu/craft/skills/codebase-onboarding

Quickly understand an unfamiliar codebase before changing it — map the structure, find entry points and seams, trace one real flow end to end, and confirm by building/testing. Use when dropped into a new or large repo, or before changing code you don't know. Language-agnostic. Triggers: where do I start, how does this work, trace the flow, get oriented, onboard.From its SKILL.md

Install
npx -y skills add gurinderu/craft --skill codebase-onboarding

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.0 KB, as published. Nobody here has run it

Codebase Onboarding

Don't start editing code you don't understand — you'll fight conventions you can't see. Spend the first hour building a map, not patches. The goal: know where things are, how one real request flows, and how to run it, before you touch anything.

When to Use

  • Dropped into a new or large repository
  • About to change a part of the system you don't know
  • Reviewing a big PR in unfamiliar code

The orientation pass (outside-in)

1. ORIENT   — README, docs/, CONTRIBUTING, the build/run commands. How is it meant to be used?
2. SHAPE    — top-level layout: where's the entry point, the modules, the tests, the config?
3. ENTRY    — find main()/lib root and the public surface; that's the spine.
4. TRACE    — pick ONE real flow (a request, a command, a job) and follow it end to end.
5. SEAMS    — note the boundaries: where it talks to DB/network/other services.
6. CONFIRM  — build it, run the tests, run it. Understanding you can't execute is a guess.

Read breadth-first, not line-by-line: skim to build the map, then go deep only on the path you need to change.

Let the tools draw the map

  • Structure: git ls-files | head, the dependency manifest (Cargo.toml workspace members), directory tree. The folder names are the architecture's first claim.
  • Entry points: main.rs/lib.rs, [[bin]]/[lib] targets; for a service, the router/route table is the index of features.
  • Activity & hotspots: git log --oneline -20 (what's changing now), git log --format= --name-only | sort | uniq -c | sort -rn | head (the files that change most — usually the core).
  • Navigation: rust-analyzer / your LSP — go-to-definition and find-references to follow a symbol instead of grepping blindly (the operations and the no-LSP fallbacks → rust-navigation). cargo doc --open renders the public API as a browsable map.
  • Find a flow: grep an endpoint string / CLI subcommand / log message, then follow the calls.

Trace one real flow

Pick a single concrete behavior and follow it through every layer — request → handler → service → repository → DB, or CLI arg → command → work → output. One full trace teaches more than reading ten files in isolation: it reveals the layering, the error handling, and the conventions all at once. (In a craft-style codebase that's the inbound adapter → domain → outbound adapter path of rust-architecture.)

Confirm by running

You don't understand it until you can build and exercise it:

cargo build           # does it compile as-is?
cargo test            # do the tests pass? (they're also runnable documentation)
cargo run -- ...      # run a real path
cargo tree            # what does it actually depend on?

(non-Rust: substitute the project's build/test/run/dependency commands — npm/go/make, etc.)

The tests are the best spec of intended behavior (→ specs, rust-testing) — read a few to see how the authors expect the code to be used.

Anti-patterns

  • Editing before mapping — changing code whose conventions you haven't seen.
  • Reading top-to-bottom — drowning in detail before you have the shape.
  • Trusting names/comments over behavior — verify against a run; comments rot.
  • Skipping the build — assuming it works the way you read it.

Boundaries

  • Once you need to change it: structural moves → rust-architecture/refactoring; a bug to chase → debugging.
  • For a persistent, queryable knowledge map of a very large codebase, dedicated indexing/knowledge-graph tooling goes deeper than this first-hour pass.

Keep looking

Skills are one crate of 626,474. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.