agentleFS
varunk130varunk130/ai-workflow-playbooks/skills/codebase-navigation/SKILL.md

codebase-navigation

Skill2 starsChanged 6 months agoMITView on GitHub

Efficiently explore, map, and understand unfamiliar codebases before making changes.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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. Distinctive:

    Before touching code, build a mental map:

    line 14
  2. Very specific:

    Read README.md, CONTRIBUTING.md, and any project-level config files

    line 15
  3. Distinctive:

    Follow imports from the entry point to understand the call graph

    line 30
  4. Distinctive:

    Use the right tool for each search type:

    line 37
  5. Distinctive:

    Read before writing: - Never create a file without first searching for an existing one that does the same thing

    line 57
  6. Distinctive:

    Minimize exploration scope: - Start narrow (the specific module), widen only when needed

    line 59
  7. Distinctive:

    Document what you find: - If the architecture isn't documented, note your findings for context

    line 60
  8. Distinctive:

    Respect boundaries: - If the project separates concerns into layers, don't bypass them

    line 61

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

Codebase Navigation

What This Skill Enables

An agent that can quickly orient itself in any codebase - finding the right files, understanding the architecture, and identifying conventions - before writing a single line of code. Agents without this skill guess at file locations, miss existing utilities, and create duplicates.

Core Competencies

1. Project Reconnaissance

Before touching code, build a mental map:

  • Read README.md, CONTRIBUTING.md, and any project-level config files
  • Identify the package manager and build system (package.json, pyproject.toml, Cargo.toml, go.mod)
  • Map the directory structure - where does source live? Tests? Config? Docs?
  • Identify the entry point(s) of the application

2. Convention Detection

Infer the project's conventions from existing code:

  • Naming: camelCase vs snake_case vs kebab-case - match what exists
  • File organization: feature-based vs layer-based vs hybrid
  • Import style: relative vs absolute, barrel files, path aliases
  • Testing conventions: co-located tests vs separate __tests__ directory, naming patterns
  • Error handling: custom error classes, result types, try/catch patterns

3. Dependency Mapping

Trace how components connect:

  • Follow imports from the entry point to understand the call graph
  • Identify shared utilities and where they live
  • Locate configuration and environment variable usage
  • Map database models/schemas to their consumers
  • Identify external API integrations and their client modules

4. Search Strategies

Use the right tool for each search type:

GoalStrategy
Find a file by nameGlob patterns: **/UserService.*, **/*.config.*
Find where a function is definedGrep for function name( or def name or class Name
Find where a function is calledGrep for the function name, exclude the definition file
Understand data flowStart at the API endpoint, follow the handler chain inward
Find related testsLook for files matching *.test.*, *.spec.*, or test_* near the source

5. Architecture Recognition

Identify common architectural patterns:

  • MVC/MVVM: Models, views/templates, controllers/viewmodels in separate directories
  • Clean Architecture: Domain/entities at the core, use cases, adapters, infrastructure at edges
  • Microservices: Multiple services/ or separate packages with their own entry points
  • Monorepo: packages/ or apps/ directory with shared libraries
  • Serverless: Function handlers in functions/ or lambdas/, infrastructure as code nearby

Behavioral Rules

  1. Read before writing - Never create a file without first searching for an existing one that does the same thing
  2. Match conventions - New code should be indistinguishable from existing code in style
  3. Minimize exploration scope - Start narrow (the specific module), widen only when needed
  4. Document what you find - If the architecture isn't documented, note your findings for context
  5. Respect boundaries - If the project separates concerns into layers, don't bypass them

Failure Modes

FailureSymptomCorrection
Skipping reconnaissanceCreating files in wrong locationsAlways map the project before writing
Ignoring conventionsCode looks foreign in the PR diffRead 3-5 existing files in the same area first
Shallow searchMissing existing utilities, creating duplicatesSearch by concept, not just by exact name
Assuming structure"I expect a utils/ folder" when the project uses lib/shared/Let the project tell you its structure

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.