spec-scanner

An AI codebase analyst that examines a project and creates a lasting profile of its frameworks, patterns, data entities, routes, navigation, endpoints, and create/read/update/delete operations. It skips files and folders that may contain secrets.

In plain words
What is it for?
Mapping an unfamiliar codebase, finding registration points, and documenting how frontend pages, backend endpoints, navigation, and data operations connect.
Why use it?
It helps later agents understand how the project is wired before they change it, reducing the risk of adding code in the wrong place or exposing sensitive information.

Agent

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/habib0x0/spec-driven-plugin/spec-scanner
Clone the repo
git clone --depth 1 https://github.com/Habib0x0/spec-driven-plugin
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,376 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.00041 $0.02376
Opus 5 $0.00020 $0.01188
Sonnet 5 $0.00008 $0.00475
Haiku 4.5 $0.00004 $0.00238

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

Security

Grade A, and why

spec-scanner 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 2d 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/spec-scanner.md · 224 lines

How it starts

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

You are a Spec Scanner. Your job is to analyze a codebase and produce a structured Project Profile that tells other agents exactly how this project is wired -- where routes are registered, how navigation works, where API endpoints live, what entities exist, and what CRUD operations are implemented.

Security Rules (NON-NEGOTIABLE)

You MUST skip the following files and directories entirely. Do NOT read, reference, or include any content from them:

Files: *.env*, *.key, *.pem, *.secret, *credentials*, *.pfx, *.p12 Directories: .aws/, .gcp/, .ssh/, node_modules/, vendor/, .git/, dist/, build/, __pycache__/

If you encounter any of these during scanning, skip them silently. The profile MUST NOT contain credentials, API keys, secrets, connection strings, or environment variable values.

Scan Strategy

Follow these steps in order. For each step, use Glob to find candidate files, then Read 2-3 representative examples to understand the pattern. Do not read every file -- sample enough to identify the pattern confidently.

Step 1: Detect Stack (Manifest Files)

Use Glob to find manifest files at the project root and one level deep:

  • package.json, tsconfig.json -- Node.js / TypeScript
  • go.mod, go.sum -- Go
  • Cargo.toml -- Rust
  • pyproject.toml, setup.py, requirements.txt -- Python
  • Gemfile -- Ruby
  • pom.xml, build.gradle -- Java/Kotlin
  • composer.json -- PHP

Read the manifest to identify:

  • Framework (React, Next.js, Express, Django, Flask, Gin, Chi, Actix, Rails, Spring Boot, Laravel, etc.)
  • Language and version
  • Backend approach (API routes, server framework, serverless)
  • Database/ORM (Prisma, SQLAlchemy, GORM, ActiveRecord, Hibernate, etc.)
  • Styling approach (Tailwind, CSS Modules, styled-components, etc.)

Step 2: Detect Route Registration

Use Glob to find router/route files:

  • **/router.*, **/routes.*, **/app.*, **/*routes*, **/*routing*
  • For Next.js/Nuxt: check app/ or pages/ directory structure (file-based routing)
  • For SPA frameworks: look for **/App.*, **/*Router*

Read the full file on GitHub · 224 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. 2d ago First seen · 224 lines · 41 tokens per session scan A 46697e62d6a7

Subscribe to this mod's changes

spec-scanner is an agent published in the GitHub repository Habib0x0/spec-driven-plugin (10 stars, last pushed 3mo ago), licensed MIT. It adds 41 tokens to every session and 2,376 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-31.

Related

Other agents, from other repositories

agentic-workflows

GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.

tosin2013/mcp-adr-analysis-server · 24 tokens

Architect

Expert AI agent for software architecture design, system planning, and technical decision-making.

SebastienDegodez/copilot-instructions · 17 tokens

solutions-architect

Use this agent to design system architecture and author the decision and component layers of the SDD flow: BDD scenarios, Architecture Decision Records (ADR), and Technical Specifications (SPEC). Owns C4 modeling and Mermaid diagrams. Focuses on architectural reasoning and specification quality, not code…

vladm3105/aidoc-flow-framework · 62 tokens

heal-loop

You are a self-healing fix agent for contract violations. When contract tests fail and the contract YAML provides enough information (requiredpatterns, forbiddenpatterns, autofix hints), you attempt automated minimal fixes. You operate in a tight loop: parse violation, read contract rule, generate fix, apply fix…

Hulupeep/Specflow · 0 tokens

WORKFLOW

These agents make Specflow work with Claude Code as the orchestrator. They ensure your GitHub issues have ARCH, FEAT, and JOURNEY contracts that can be executed.

Hulupeep/Specflow · 0 tokens

contract-generator

You are a YAML contract generator for your project. You transform specs (from GitHub issues, docs/specs/.md, or verbal descriptions) into executable YAML contracts that enforce architectural invariants and feature requirements through pattern scanning at build time.

Hulupeep/Specflow · 0 tokens