codebase-orientation
Skill98 starsChanged 2 months agoMITView on GitHub
Fast recon before changing unfamiliar code — instructions, manifest, tree, one flow traced end-to-end, git history, newest precedent. Use when starting in a repo or module you haven't touched this session, when asked "where does X live" or "how is Y wired", or before designing against an existing architecture. Not for a one-line edit to a file already open in the conversation.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- DeevsDeevs/agent-systemtheir own version, first seen Nov 8, 2026
- HyperVon/agent-guidance-kittheir own version, first seen Nov 1, 2026
- proflead/codex-skills-librarytheir own version, first seen Jun 18, 2026
- Bridev04/clauderailtheir own version, first seen May 17, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- proflead/codex-skills-library★ 153same name
- DeevsDeevs/agent-system★ 41same name
- HyperVon/agent-guidance-kit★ 1same name
- Bridev04/clauderail★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- ambiguity-commitSkill
- api-surface-careSkill
- calibrated-recommendationSkill
- concurrency-reasoningSkill
- config-and-flagsSkill
- context-checkpointSkill
- cross-platform-careSkill
- data-loss-guardSkill
- data-migration-safetySkill
- dependency-changesSkill
- docs-as-contractSkill
- edge-case-sweepSkill
- environment-firstSkill
- error-message-qualitySkill
- escalate-vs-decideSkill
- estimation-and-scopingSkill
- explain-at-the-right-levelSkill
- generalize-the-correctionSkill
- git-hygieneSkill
- incident-diagnosisSkill
- leave-no-messSkill
- llm-app-codeSkill
- numerical-careSkill
- performance-investigationSkill
- perf-sanitySkill
- question-vs-taskSkill
- resource-lifecycleSkill
- reviewing-a-changeSkill
- root-cause-debuggingSkill
- security-reflexesSkill
- stop-thrashingSkill
- subagent-fanoutSkill
- surgical-refactoringSkill
- task-decompositionSkill
- test-designSkill
- untrusted-content-guardSkill
- verify-ui-visuallySkill
- workmanshipSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
When two patterns compete for the same job, prefer: (1) the one in newer code, (2) the one the instructions endorse, (3) the one nearest …
“Common” is measured: kept by at least 6 in 10 of the 4 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.
Files
Codebase Orientation
Weak orientation reads the one file named in the request and starts editing; the result fights the repo's architecture and gets rewritten in review. Strong orientation spends 5–10 minutes on breadth-first reads, then edits where the existing analog lives, in the repo's idiom.
The recon sequence
- Instructions first. CLAUDE.md / AGENTS.md / CONTRIBUTING / README, in that order. They override your defaults and usually name the gotchas you would otherwise rediscover.
- The manifest.
package.jsonscripts, Makefile, justfile, pyproject, Cargo.toml: how to build, test, lint, run, and what the intended stack is. Use the project's declared commands, never your generic equivalents. Run the declared test (or build) command once now, before any edit: a red baseline is a finding to report, not a bug you introduced. - Shape of the tree. One
ls-depth pass over the source root. Learn the layering (types, business logic, UI, IO) and spot generated or vendored directories you must not hand-edit. New code goes where the existing analog lives. - The relevant flow, end to end. Trace one representative request or action from entry point to effect (route → handler → service → store; CLI arg → command → output). Read the actual files on that path: this is the single highest-value read. Note error-handling style, naming, import conventions, and where the nearest test for that path lives.
- Recent history.
git log --oneline -20, plusgit log --oneline -5 -- <file>for each file you will edit. Look for in-flight migrations: a commit titled "migrate X to Y" means new code uses Y, even if most of the repo still uses X. - Find the precedent. For "add a Z" tasks, find the most recently added Z and read all of its wiring (
git log --diff-filter=A --oneline -- <dir>finds it). Imitate it exactly; deviate only deliberately and say why.
Write the map before the first edit
Before editing, put 3–6 lines in your notes or first status message: test/build command; the files on the traced path; the precedent you are imitating; any in-flight migration or instruction that constrains the change; the baseline test result. If you cannot fill a line, you have not oriented on it yet.
Judging which pattern to copy
When two patterns compete for the same job, prefer: (1) the one in newer code, (2) the one the instructions endorse, (3) the one nearest your change. If it is genuinely ambiguous and load-bearing, ask one question citing both patterns.
Cheap map, not deep study
Breadth-first and time-boxed. Read signatures and shapes, not every body; depth comes later on the specific path you change. If the repo is huge, delegate the sweep to search subagents and keep only the conclusions.
Signs you skipped this step (go back)
- You are about to add a dependency the repo already has an equivalent for.
- Your new file's imports look different from every neighbor's.
- You invented a directory.
- You wrote a helper that grep would have found already exists.
- You edited a file that a build step regenerates.
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
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.

