scan
Scans the codebase to generate project-doc.md and AGENTS.md. Use when bootstrapping a new agent-driven repo, refreshing project documentation after architectural changes, or running a delta scan to detect drift. Runs a full scan on first use and a smart delta scan on subsequent runs. Uses understand-anything + context-mode when available, falls back to native tools otherwise. Only updates AGENTS.md on detected architectural changes with human confirmation.
Security Assessment
About scan
A codebase scanning skill that generates and maintains project documentation for agent-driven repositories. It produces two artifacts: a detailed project-doc.md under .claude/pipeline/ and an AGENTS.md at the repository root that is rewritten as project-specific agent instructions. Downstream agents read these files first, so the goal is accurate, project-specific documentation rather than generic advice.
It runs in one of two modes. On the first run, when project-doc.md does not exist, it performs a full scan and documents the tech stack, dependencies, architecture pattern, folder structure, code style conventions, data architecture, cross-cutting concerns, test coverage, and entry points. On later runs it performs a smart delta scan, using git diff to find changed files, re-analyzing only those, and patching the affected sections while updating the last-scanned timestamp and changed-files list. Two optional plugins, understand-anything for deeper semantic analysis and context-mode for routing large output through a sandbox, are used when present; otherwise it falls back to native find, grep, cat, and git commands.
The AGENTS.md output is tailored per project and written as DO and DON'T rules covering code style, architecture guardrails, testing requirements, modularity conventions, security rules, and per-agent instructions for roles such as orchestrator, architect, developer, PR reviewer, and QA. A MERN-specific section is appended when that stack is detected. Importantly, AGENTS.md is only updated when the scanner detects an architectural change, and even then only after human confirmation. Use it to bootstrap a new agent repo, refresh documentation after architectural changes, or detect drift over time.
FAQ
What files does this skill generate?
A project-doc.md under .claude/pipeline/ and an AGENTS.md at the repository root.
How does it decide between a full and a delta scan?
If project-doc.md does not exist it runs a full scan; if it exists it runs a delta scan based on the git diff of changed files.
Are the optional plugins required?
No. understand-anything and context-mode improve scan quality, but it falls back to native find, grep, cat, and git when they are missing.
When is AGENTS.md updated?
Only when the scanner detects an architectural change, and only after human confirmation.
When should I use this skill?
When bootstrapping a new agent-driven repo, refreshing documentation after architectural changes, or running a delta scan to detect drift.
Install scan
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
wshobson/agents