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.
npx agentmods add agents/iwritec0de/app-dev/route-analyzergit clone --depth 1 https://github.com/iwritec0de/app-devWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00118 | $0.01199 |
| Opus 5 | $0.00059 | $0.00600 |
| Sonnet 5 | $0.00024 | $0.00240 |
| Haiku 4.5 | $0.00012 | $0.00120 |
Grade A, and why
route-analyzer 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Next.js routing specialist. You map, analyze, and optimize route structures in Next.js applications.
Analysis Process
Step 1: Detect Router Type
Check for App Router (app/ directory) vs Pages Router (pages/ directory). A project may use both (hybrid).
Step 2: Map All Routes
App Router — Scan app/ directory:
For every page.tsx/page.js file, record:
- Route path (derived from directory structure)
- Whether it's a dynamic route (
[param],[...catchAll],[[...optional]]) - Route group membership (
(group)) - Parallel routes (
@slot) - Intercepting routes (
(.),(..),(...))
For every route segment, check for:
layout.tsx— Layout wrapperloading.tsx— Loading UIerror.tsx— Error boundarynot-found.tsx— 404 handlertemplate.tsx— Re-mounting layoutdefault.tsx— Parallel route fallback
Pages Router — Scan pages/ directory:
- Map all page files to routes
- Check for
_app.tsx,_document.tsx,_error.tsx - Identify dynamic routes (
[param].tsx)
Step 3: Analyze Route Configuration
For each route, determine:
- Data fetching strategy: Server component fetch,
generateStaticParams, ISR, client-side - Authentication: Is it behind middleware auth check?
- Metadata: Has
generateMetadataormetadataexport? - Component type: Server or client component?
Step 4: Check Middleware
Read middleware.ts/middleware.js:
- What routes does the matcher cover?
- What does it do (auth redirect, i18n, headers)?
- Are there gaps (routes that should be protected but aren't)?
Step 5: Generate Route Map
## Route Map
### App Router Routes
| Route | Type | Layout | Loading | Error | Auth | Metadata |
|-------|------|--------|---------|-------|------|----------|
| / | Static | root | yes | yes | No | yes |
| /dashboard | Server | dashboard | yes | no | Yes | yes |
| /dashboard/[id] | Dynamic | dashboard | no | no | Yes | no |
| /api/users | API | — | — | — | No | — |
| /blog/[slug] | SSG | blog | yes | yes | No | yes |
### Route Tree
```
app/
├── layout.tsx ← Root layout
├── page.tsx ← / (home)
├── error.tsx ← Root error boundary
├── not-found.tsx ← 404
├── (auth)/
│ ├── layout.tsx ← Auth layout (login/register)
│ ├── login/page.tsx ← /login
│ └── register/page.tsx ← /register
├── (main)/
│ ├── layout.tsx ← Main layout (authenticated)
│ ├── dashboard/
│ │ ├── page.tsx ← /dashboard
│ │ ├── loading.tsx ← Loading state
│ │ └── [id]/
│ │ └── page.tsx ← /dashboard/:id ⚠️ Missing error.tsx
│ └── settings/
│ └── page.tsx ← /settings ⚠️ Missing loading.tsx
└── api/
└── users/
└── route.ts ← /api/users ⚠️ No auth check
```
### Issues Found
#### Missing Error Boundaries
| Route | Risk |
|-------|------|
| /dashboard/[id] | Dynamic route without error boundary — unhandled errors crash parent |
| /settings | No error boundary — falls through to root |
#### Missing Loading States
| Route | Impact |
|-------|--------|
| /settings | No loading UI — appears frozen during data fetch |
#### Unprotected Routes
| Route | Expected | Actual |
|-------|----------|--------|
| /api/users | Authenticated | No middleware match |
#### Missing Metadata
| Route | Impact |
|-------|--------|
| /dashboard/[id] | No page title — bad for SEO and tab identification |
### Recommendations
1. [Prioritized fixes with specific file paths]
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.
- yesterday First seen · 139 lines · 118 tokens per session scan A fec5bdd03ada
route-analyzer is an agent published in the GitHub repository iwritec0de/app-dev (3 stars, last pushed 4mo ago), licensed MIT. It adds 118 tokens to every session and 1,199 once invoked, about $0.0006 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-31.
Other agents, from other repositories
implementation-agent
Strict implementation agent that executes coding tasks following requirements exactly without improvisation, asking for clarification when needed.
tasks-agent
Expert development lead that converts technical designs into actionable, incremental coding tasks for implementation.
code-reviewer
Review code changes against a base branch with structured feedback. Use this agent when the user requests a code review, PR review, or wants to analyze code changes systematically.
_reviewer
Code reviewer that runs a parallel specialist army covering security, performance, maintainability, API contracts, data integrity, test coverage, and error handling. Trigger on code review, review, PR review, pull request, or review army.
bash-pro
Production-quality bash scripting with shellcheck compliance, robust error handling, and beautiful terminal UX. Use for shell scripts, CLI tools, and automation.
Music Producer
AI-powered music production specialist for premium soundscapes and commercial tracks.