agentleFS
gg-mogg-mo/repo-hygiene/skills/orienting-to-repo/SKILL.md

orienting-to-repo

Skill3 starsChanged 7 months agoMITView on GitHub

Use when starting substantive work in an unfamiliar repo, before diving into task-specific grep or edits — especially when the task touches business logic, public API, build, or infra, or you don't yet know the repo's purpose, stack, conventions, or layout

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    After a /clear or /compact in a repo

    line 17
  2. Distinctive:

    Run these in parallel where possible.

    line 29
  3. Distinctive:

    After the pass, write a short scratch summary (3-5 bullets) in your reply to the user.

    line 41

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

Orienting to a Repo

Overview

Before substantive work in a repo you don't already understand, build a brief mental model. Jumping to task-specific grep is a trap: you find symbol X without learning that symbol X is one of three competing implementations and the project is mid-migration. Five minutes of orientation prevents an hour of wrong-direction work.

Core principle: Understand what the repo IS before you change it.

When to Use

  • First substantive change in a repo you haven't worked in this session
  • After a /clear or /compact in a repo
  • Task touches business logic, public API, build config, or CI

When NOT to Use

  • One-line typo fix
  • Renaming a single local variable
  • Already oriented in this session (rely on conversation context)
  • User explicitly says "skip orientation"

The Orientation Pass

Run these in parallel where possible. Time-box to ~5 minutes, not 30.

  1. Purpose — Read README.md (intro + setup section). What does this repo DO?
  2. Stack — Read package.json / pyproject.toml / go.mod / Gemfile / Cargo.toml. Language, framework, key deps.
  3. Layout — ls the root and 1-2 levels into the main source dir. Note convention: src/, lib/, app/, pkg/, etc.
  4. Conventions — Look for CLAUDE.md, AGENTS.md, CONTRIBUTING.md, .editorconfig, linter configs. These are the rules.
  5. Tests — Where do they live? What runner? Read one test file to see the style.
  6. CI / build — Skim .github/workflows/ or equivalent. What's enforced before merge?
  7. Entry point — Find and read the main entry file (top of main.py, index.ts, cmd/<name>/main.go).

Capture the Model — Briefly

After the pass, write a short scratch summary (3-5 bullets) in your reply to the user. Cover:

  • Purpose (one sentence)
  • Stack
  • Where the relevant code for the current task lives
  • Conventions to follow (linter, test framework, doc style)
  • Any "watch out for X" you noticed (active migration, deprecated dir, etc.)

Do NOT create a REPO_MAP.md file or any persistent artifact. The map goes stale instantly and lies to future sessions. Keep the model in conversation context only.

Quick Reference

Look forTo learn
README.mdPurpose, install, basic usage
CONTRIBUTING.md / CLAUDE.md / AGENTS.mdProject-specific rules
package metadata fileLanguage + dependencies
.github/workflows or .gitlab-ci.ymlWhat CI enforces
Existing test fileTest framework + style
git log -20 --onelineWhat's active right now

Common Mistakes

MistakeFix
Jumping straight to grep "<task-symbol>"Run the orientation pass first
Reading every file under src/Read the entry point, then trace from there
Skipping CI configSkipped CI = surprised by failed build on PR
Producing a REPO_MAP.md artifactDon't. Keep the model in chat context.
Spending 30+ minutes orientingYou're over-investing. Time-box ~5 min.

Red Flags — STOP and Orient

  • About to grep for a task-specific symbol in a repo you haven't read the README of
  • About to edit a file in a stack you haven't confirmed (TS vs JS, Python 2 vs 3, etc.)
  • "I'll figure out the conventions as I go" — no, find them now
  • "The user wants this fast" — fast and wrong is slower than oriented and right

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.