agentleFS
saitarrunsaitarrun/Devforge-ai/skills/codebase-navigator/SKILL.md

codebase-navigator

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Deep structural codebase comprehension, AST dependency graph traversal, symbol caller/callee tracing, and monorepo navigation strategies for massive codebases.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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:

    When exploring an unfamiliar or massive codebase, never blindly read random files.

    line 15
  2. Distinctive:

    Always query code semantics rather than relying on noisy keyword matching:

    line 39
  3. Distinctive:

    When tracking an end-to-end user action in a complex repo:

    line 52
  4. Distinctive:

    Inspect Egress Side-Effects: Check emitted events (Kafka/RabbitMQ), outbound webhooks, or cache invalidation calls.

    line 56
  5. Distinctive:

    Check dependency directions: Shared core libraries must never depend on consumer applications.

    line 60
  6. Distinctive:

    Before modifying shared types or utility functions:

    line 63
  7. Very specific:

    Run impact query: code_review_graph impact <file_path> or trace all references.

    line 64
  8. Distinctive:

    Verify whether the type is exported across public API contracts or RPC protocols.

    line 65
  9. Distinctive:

    Before proposing changes in a massive codebase, confirm:

    line 70

≈ “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

Large-Scale Codebase Navigation & Comprehension Skill

This skill defines standard methodology for navigating, mapping, and understanding massive enterprise repositories, microservices, and monorepos (e.g., Turborepo, Nx, Lerna, Go workspaces, multi-package repositories).


1. Multi-Tier Exploration Strategy

When exploring an unfamiliar or massive codebase, never blindly read random files. Follow this 4-tier navigation sequence:

[Tier 1: Architectural Topography]
  → Package manifests (package.json, go.mod, Cargo.toml, pyproject.toml)
  → Workspaces / Monorepo layout
  → Domain Context (CONTEXT.md, README.md, docs/adr/)
          ↓
[Tier 2: Structural Knowledge Graph (code-review-graph)]
  → Submodule / Service boundary dependency map
  → Module coupling & circular dependency detection
          ↓
[Tier 3: Symbol & Call-Graph Tracing]
  → Entrypoints (routes, CLI commands, queue consumers, gRPC handlers)
  → Caller / Callee hierarchy for critical abstractions
          ↓
[Tier 4: Precision Target Inspection]
  → Focused file/function reading with bounded context

2. Structural Querying Priority

Always query code semantics rather than relying on noisy keyword matching:

PriorityTool / MechanismBest Used For
1. Primarycode-review-graph / LSP ASTUnderstanding symbol definitions, call hierarchies, cross-module couplings, and change impact
2. SecondaryRipgrep / Structural GrepFast discovery of specific error strings, environment variables, config keys, or regex tokens
3. FallbackGlob / Directory TraversalMapping tree hierarchy when building high-level system mental models

3. High-Leverage Navigation Patterns

Pattern A: Tracing Ingress-to-Egress Dataflows

When tracking an end-to-end user action in a complex repo:

  1. Locate Ingress: Identify API route handler or message queue listener (/api/v1/..., @Post(), def handle_event).
  2. Trace Service Layer: Inspect domain service orchestration logic and business validation rules.
  3. Trace Persistence Layer: Examine database repository, ORM queries, and transaction boundaries.
  4. Inspect Egress Side-Effects: Check emitted events (Kafka/RabbitMQ), outbound webhooks, or cache invalidation calls.

Pattern B: Monorepo & Cross-Package Dependency Mapping

  1. Map internal package aliases (e.g., @enterprise/core, @enterprise/auth, packages/*, libs/*).
  2. Check dependency directions: Shared core libraries must never depend on consumer applications.

Pattern C: Change Impact Analysis

Before modifying shared types or utility functions:

  • Run impact query: code_review_graph impact <file_path> or trace all references.
  • Verify whether the type is exported across public API contracts or RPC protocols.

4. Mental Model Synthesis Checklist

Before proposing changes in a massive codebase, confirm:

  • What service / package owns this business domain?
  • What is the exact execution entrypoint for this workflow?
  • Where is state persisted and what transactions/locks are held?
  • What downstream consumers or background workers rely on this output?

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.