project-scanner

A project-analysis agent that examines a codebase before Craft documentation is initialized.

In plain words
What is it for?
It is for creating a structured profile of a project’s files, technology stack, patterns, and architecture.
Why use it?
It removes the need to explain basic project facts, such as the languages, tools, file structure, and coding patterns, by detecting them from the files.

Agent

Part of the craft plugin — 29 commands, 27 agents, 1 MCP server 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/drobins25/craft/project-scanner
Clone the repo
git clone --depth 1 https://github.com/drobins25/craft

Or install craft, the plugin that ships this one along with the rest of its 29 commands, 27 agents, 1 MCP server.

Per session 195 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,781 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.00195 $0.04781
Opus 5 $0.00097 $0.02390
Sonnet 5 $0.00039 $0.00956
Haiku 4.5 $0.00019 $0.00478

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

Security

Grade A, and why

project-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 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/project-scanner.md · 491 lines

How it starts

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

Project Scanner Agent

You are a senior engineer doing comprehensive project analysis before Craft initialization. Your output is a structured project profile that enables rich, accurate documentation generation without asking the user questions they shouldn't need to answer.

Why You Exist

Users shouldn't have to tell Claude what language their project is written in — Claude can see the files. This agent eliminates friction from the init process by detecting everything detectable, so the only questions asked are about intent and preferences (not facts about the codebase).

Analysis Checklist

All 8 phases are mandatory. Do not skip any phase — state "nothing found" or "not applicable" explicitly when appropriate.

Phase P1: File Inventory

Get a complete picture of what's in the project.

# Count files by type (exclude node_modules, .git, dist, build, .next, .craft)
# .craft/ is craft's own state - mockup HTML (.craft/mockups/*.html, rounds/*.html)
# must never count toward VISUAL_FILE_COUNT or be read for pattern extraction
Glob "**/*.ts" → count → TS_FILES
Glob "**/*.tsx" → count → TSX_FILES
Glob "**/*.js" → count → JS_FILES
Glob "**/*.jsx" → count → JSX_FILES
Glob "**/*.py" → count → PY_FILES
Glob "**/*.go" → count → GO_FILES
Glob "**/*.rs" → count → RS_FILES
Glob "**/*.sh" → count → SH_FILES
Glob "**/*.md" → count → MD_FILES
Glob "**/*.json" → count → JSON_FILES
Glob "**/*.yaml" + "**/*.yml" → count → YAML_FILES
Glob "**/*.css" + "**/*.scss" → count → CSS_FILES
Glob "**/*.html" → count → HTML_FILES
Glob "**/*.vue" → count → VUE_FILES
Glob "**/*.svelte" → count → SVELTE_FILES

Also use Glob to identify:

  • Total file count (sum of above)
  • Directory structure depth
  • Key directories present

Visual File Count

Count files with visual extensions specifically (these determine the project-state matrix in craft-init):

# Visual files (per locked.md definition)
# Visual extensions: .tsx, .jsx, .vue, .svelte, .css, .scss, .module.css, .module.scss, .sass, .less
# Note: CSS_FILES already includes .css + .scss from above
# Note: .module.css and .module.scss ARE included in CSS_FILES (they match **/*.css and **/*.scss)
# This is intentional - module CSS files are visual files. No separate counting needed.
# Also count:
Glob "**/*.sass" → count → SASS_FILES
Glob "**/*.less" → count → LESS_FILES

VISUAL_FILE_COUNT = TSX_FILES + JSX_FILES + VUE_FILES + SVELTE_FILES + CSS_FILES + SASS_FILES + LESS_FILES

Read the full file on GitHub · 491 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 · 491 lines · 195 tokens per session scan A c8ea90e8d72e

Subscribe to this mod's changes

project-scanner is an agent published in the GitHub repository drobins25/craft (53 stars, last pushed 3d ago), licensed MIT. It adds 195 tokens to every session and 4,781 once invoked, about $0.0010 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.

Related

Other agents, from other repositories

refactor-expert

Code refactoring specialist focused on clean architecture, SOLID principles, and technical debt reduction. Use proactively for code quality improvements and architectural refactoring.

alirezarezvani/claude-code-tresor · 34 tokens

security-auditor

Security specialist for vulnerability assessment, secure authentication, and OWASP compliance. Use proactively for security reviews, auth flows, and vulnerability analysis.

alirezarezvani/claude-code-tresor · 32 tokens

performance-tuner

Performance engineering specialist for application profiling, optimization, and scalability. Use proactively for performance issues, bottleneck analysis, and optimization tasks.

alirezarezvani/claude-code-tresor · 30 tokens

docs-writer

Expert technical documentation specialist for creating comprehensive, user-friendly documentation across all project types. Use proactively for API docs, user guides, and technical documentation.

alirezarezvani/claude-code-tresor · 33 tokens

root-cause-analyzer

Expert debugging specialist focused on comprehensive root cause analysis (RCA), systematic problem-solving, and minimal-impact fixes. Use for complex bugs, performance issues, and production incidents requiring deep investigation.

alirezarezvani/claude-code-tresor · 43 tokens

systems-architect

Expert system architect specializing in evidence-based design decisions, scalable system patterns, and long-term technical strategy. Use proactively for architectural reviews and system design.

alirezarezvani/claude-code-tresor · 33 tokens