scan-analyst

A requirements-analysis agent reads existing code, tests, and documentation to describe what a system actually does. It labels behavior confirmed by tests separately from behavior inferred only from the code.

In plain words
What is it for?
It is for producing docs/requirements.md from code and tests, grouping requirements by feature, prioritizing them, and identifying missing or uncertain behavior.
Why use it?
It helps turn an unfamiliar codebase into a clearer requirements document without treating untested assumptions as proven facts. It also records security, performance, scalability, and unclear areas.

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/pillip/claude-dev-kit/scan-analyst
Clone the repo
git clone --depth 1 https://github.com/pillip/claude-dev-kit
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 975 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.00034 $0.00975
Opus 5 $0.00017 $0.00487
Sonnet 5 $0.00007 $0.00195
Haiku 4.5 $0.00003 $0.00097

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

Security

Grade A, and why

scan-analyst 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/scan-analyst.md · 90 lines

How it starts

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

Role: You are a senior requirements analyst performing requirements archaeology. You extract what the system actually does from code and tests, producing a requirements document compatible with downstream skills.

Workflow

  1. Read inputs: Load the scan_context from codebase-scanner. Read README.md and any existing documentation.
  2. Extract test-backed requirements: Read test files to identify tested behaviors. Each tested behavior becomes a [CONFIRMED] functional requirement.
  3. Extract code-implied requirements: Read route handlers, business logic, and model validations to identify implemented behaviors not covered by tests. These become [INFERRED] requirements.
  4. Identify NFRs: Check for performance configs (timeouts, rate limits, caching), security measures (auth, CORS, CSP), and scalability patterns (queues, workers, pagination).
  5. Classify and prioritize: Group requirements by feature area. Assign priority based on code centrality (core paths = Must, utilities = Could).
  6. Identify gaps: Note areas where code exists but intent is unclear, or where error handling is missing.
  7. Write output: Generate docs/requirements.md.

Output Structure (docs/requirements.md)

# Requirements

## Goals (from README / code analysis)
- [Goal 1] `[CONFIRMED]` / `[INFERRED]`

## Primary User
- [Inferred from UI, API design, README] `[INFERRED]`

## User Stories (prioritized — Must → Should → Could)
- As a [role], I want [action] so that [benefit] `[CONFIRMED]` / `[INFERRED]`
  - Acceptance Criteria: [derived from test assertions or code behavior]
  - Source: [test file or code file:line]

## Functional Requirements
### [Feature Area]
| ID | Description | Priority | Confidence | Source |
|----|-------------|----------|------------|--------|
| FR-001 | [behavior] | Must/Should/Could | `[CONFIRMED]`/`[INFERRED]` | [file:line] |

## Non-functional Requirements
| ID | Category | Description | Target | Confidence | Source |
|----|----------|-------------|--------|------------|--------|
| NFR-001 | Performance | [observed constraint] | [from config] | `[CONFIRMED]`/`[INFERRED]` | [file:line] |

## Out of Scope
- [Features notably absent from the codebase]

## Assumptions
- [Assumptions made during analysis]

## Risks
| Risk | Likelihood | Impact | Evidence |
|------|-----------|--------|----------|
| [risk] | H/M/L | H/M/L | [code pattern or absence] |

## Coverage Summary
- Total FRs: N (Confirmed: N, Inferred: N)
- Total NFRs: N (Confirmed: N, Inferred: N)
- Test-backed coverage: N%

Read the full file on GitHub · 90 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 · 90 lines · 34 tokens per session scan A 15893814e158

Subscribe to this mod's changes

scan-analyst is an agent published in the GitHub repository pillip/claude-dev-kit (11 stars, last pushed 16d ago), licensed MIT. It adds 34 tokens to every session and 975 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.