Infrastructurewshobson-agents
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.
3.9k est. installs39.1k stars
Estimated installs are a discovery signal based on public repository popularity and source completeness, not recorded Dokki installation events.
Repository
wshobson/agents
Pinned commit
d82998e7df39
License
MIT
Execution
Instructions only
Complete source instructions
SKILL.md
Codebase Scanner
You are a technical analyst. Your job is to scan the project codebase and produce accurate, project-specific documentation used by all downstream agents.
Step 1: Check Optional Plugin Dependencies
Check whether the two optional enhancement plugins are available:
These plugins are optional. They improve scan quality but are not required:
- understand-anything (Lum1104/Understand-Anything) — provides deeper semantic code analysis
- context-mode (mksglu/context-mode) — routes large outputs through a sandbox to protect the context window
If both are present, use them in Steps 3–4 as described below. If either or both are missing, proceed with the native fallback approach: use find, grep, cat, and git commands directly, routing large outputs through ctx_execute / ctx_execute_file if context-mode is available, otherwise summarise inline.
Note: To install the optional plugins manually:
Step 2: Determine Scan Mode
Check if .claude/pipeline/project-doc.md exists.
- Does not exist → FULL SCAN (first run)
- Exists → DELTA SCAN
Step 3A: Full Scan
Use understand-anything to analyse the entire codebase. If context-mode is available (verified in Step 1), route ALL output through its tools (ctx_batch_execute / ctx_execute_file) — never dump raw file contents into the main context window. If context-mode is not available, summarise each file's findings inline and avoid printing raw file contents.
Produce .claude/pipeline/project-doc.md using the following structure (based on the architecture-blueprint-generator pattern):
After writing project-doc.md, proceed to Step 4 to generate AGENTS.md.
Step 3B: Delta Scan
- Run
git diff HEAD~1 --name-onlyto get changed files - If no changed files, report "No changes detected — project-doc.md is current" and exit
- Use
understand-anythingto re-analyse only the changed files; route output throughctx_execute_fileif context-mode is available, otherwise summarise inline - Patch only the affected sections of
.claude/pipeline/project-doc.md - Update the
Last ScannedandChanged Filesfields - Proceed to Step 4B (architectural change detection)
Step 4A: Generate AGENTS.md (First Run Only)
Write AGENTS.md to the repo root. This is NOT a copy of project-doc.md — it is rewritten as agent instructions, tailored to this specific project. Every agent reads this file first.
Structure:
If the project is MERN stack (MongoDB + Express + React + Node.js — detected from package.json / requirements), append a ### MERN Stack Notes section to AGENTS.md covering: use Mongoose middleware over raw queries, handle async errors in Express with a central error handler, avoid storing JWT tokens in localStorage (use httpOnly cookies), and never expose Mongoose error objects directly in API responses.
Step 4B: Architectural Change Detection (Delta Runs Only)
After patching project-doc.md, compare the new version against the previous. Check for:
- New framework or major library added
- New architectural directory pattern created (e.g. new
/lib/hooks/,/services/) - Major dependency swap (e.g. axios → fetch, moment → dayjs)
- New auth or session handling pattern
If any detected, show:
Only on [y] confirmation: patch the relevant sections of AGENTS.md. Never rewrite the full file.
Step 5: Report
Print a summary:
Update state.json field checkpoints.scan = "completed".
Same repository
Related Skills
api-design-principles
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
View detailsarchitecture-patterns
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.
View detailsavoid-ai-writing
Audit and rewrite prose so it stops reading as machine-generated. Use this skill when asked to remove AI-isms, clean up AI writing, edit a draft for AI tells, audit a README, changelog, release note, PR description, or blog post for machine-sounding prose, or make text sound less like AI. Supports a detect-only mode, a rewrite mode, and an edit-in-place mode, with optional voice and context profiles.
View detailsbefore-you-build
Pre-build product and feature risk review for founders, product managers, and AI-assisted builders. Use this skill when the user is about to build a landing page, MVP, SaaS product, internal tool, agent workflow, or major feature and needs to check demand, positioning, monetization, retention, trust, distribution, and adoption risk before implementation starts.
View detailsblock-no-verify-hook
Configure a PreToolUse hook to prevent AI agents from skipping git pre-commit hooks with --no-verify and other bypass flags. Use when setting up Claude Code projects that enforce commit quality gates.
View detailsbrand-landingpage
> Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established visual direction. Skip when they have a design mockup, need a dashboard or app UI, are working at component level, building a multi-page app, or restyling with known design tokens — use frontend-design instead.
View details