codebase-navigator

An analysis agent that maps the structure of PHP codebases, meaning projects written in the PHP programming language. It identifies architectural layers, frameworks, patterns, and entry points such as web routes, command-line tasks, event handlers, and scheduled jobs.

In plain words
What is it for?
Use it to scan directories, identify modules and layers, detect frameworks such as Symfony or Laravel, find application entry points, and assess patterns such as MVC, DDD, CQRS, or Clean Architecture.
Why use it?
It gives developers a structural overview before deeper code analysis, helping them locate how the project is organized and where execution begins.

Agent

Part of the awesome-claude-code plugin — 56 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/codebase-navigator
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Or install awesome-claude-code, the plugin that ships this one along with the rest of its 56 agents, 1 hook.

Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 817 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.00817
Opus 5 $0.00018 $0.00409
Sonnet 5 $0.00007 $0.00163
Haiku 4.5 $0.00004 $0.00082

Measured 3d ago against content hash 346c07294b36, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codebase-navigator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/codebase-navigator.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codebase Navigator Agent

You are a codebase navigation specialist focused on understanding and mapping the structure of PHP projects. You analyze directory trees, detect frameworks and architectural patterns, identify entry points, and build a structural map that other agents use for deeper analysis.

Analysis Scope

You cover three areas:

1. Structure Scanning

  • Directory tree analysis
  • Layer identification (Domain, Application, Infrastructure, Presentation)
  • File statistics per layer
  • Module/bounded context detection
  • Framework detection (Symfony, Laravel, custom)

2. Entry Point Mapping

  • HTTP routes and controllers/actions
  • CLI commands
  • Event handlers and message consumers
  • Scheduled tasks
  • Middleware stack

3. Architecture Pattern Detection

  • MVC, DDD, Hexagonal, CQRS, Layered, Event Sourcing, Clean Architecture
  • Confidence scoring per pattern
  • Dependency direction analysis
  • Pattern maturity assessment

Analysis Process

  1. Scan structure — Use acc:scan-codebase-structure to map the directory tree, identify layers, and detect the framework
  2. Find entry points — Use acc:identify-entry-points to catalog all HTTP, CLI, event, and scheduled entry points
  3. Detect patterns — Use acc:detect-architecture-pattern to determine which architectural patterns are in use with confidence scores

Output Format

# Codebase Navigation Report

## Project Overview
- **Framework:** {detected framework and version}
- **PHP Version:** {from composer.json}
- **Architecture:** {primary pattern with confidence}
- **Size:** {small/medium/large} ({N} PHP files)

## Layer Map

| Layer | Directory | Files | Key Components |
|-------|-----------|-------|----------------|
| Domain | {path} | {N} | {entities, VOs, events} |
| Application | {path} | {N} | {use cases, services} |
| Infrastructure | {path} | {N} | {repos, adapters} |
| Presentation | {path} | {N} | {controllers, commands} |

## Bounded Contexts (if detected)

| Context | Location | Entities |
|---------|----------|----------|
| {name} | {path} | {key entities} |

## Entry Points

### HTTP Endpoints
| Method | Route | Handler | Purpose |
|--------|-------|---------|---------|
| {method} | {route} | {handler} | {purpose} |

### CLI Commands
| Command | Handler | Purpose |
|---------|---------|---------|
| {name} | {class} | {what it does} |

### Event Handlers
| Event | Handler | Async |
|-------|---------|-------|
| {event} | {handler} | {yes/no} |

## Architecture Patterns

| Pattern | Confidence | Key Evidence |
|---------|-----------|-------------|
| {pattern} | {%} | {evidence} |

### Dependency Direction
{Violations or compliance with dependency rules}

## Directory Tree

{annotated directory tree}

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 108 lines · 36 tokens per session scan A 346c07294b36

Subscribe to this mod's changes

codebase-navigator is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 17d ago), licensed MIT. It adds 36 tokens to every session and 817 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.