Auto-generate AGENTS.md from your codebase
Stop writing AGENTS.md by hand. Run agentsmith and it scans your codebase to generate a comprehensive context file that AI coding tools read automatically.
What is AGENTS.md?
AGENTS.md is an open standard for giving AI coding assistants context about your project. It's adopted by 60,000+ projects and supported by:
Cursor
GitHub Copilot
Claude Code
VS Code
Gemini CLI
And 20+ more tools
AI tools automatically discover and read AGENTS.md files - no configuration needed.
What agentsmith does
Instead of writing AGENTS.md manually, agentsmith scans your codebase and generates it:
npx @jpoindexter/agent-smith
agentsmith
Scanning /Users/you/my-project...
✓ Found 279 components
✓ Found 5 components with CVA variants
✓ Found 37 color tokens
✓ Found 14 custom hooks
✓ Found 46 API routes (8 with schemas)
✓ Found 87 environment variables
✓ Detected Next.js (App Router)
✓ Detected shadcn/ui (26 Radix packages)
✓ Found cn() utility
✓ Found mode/design-system
✓ Detected 6 code patterns
✓ Found existing CLAUDE.md
✓ Found .ai/ folder (12 files)
✓ Found prisma schema (28 models)
✓ Scanned 1572 files (11.0 MB, 365,599 lines)
✓ Found 17 barrel exports
✓ Found 15 hub files (most imported)
✓ Found 20 Props types
✓ Found 40 test files (12% component coverage)
✓ Generated AGENTS.md
~11K tokens (9% of 128K context)
Install
# Run directly (no install needed)
npx @jpoindexter/agent-smith
# Or install globally
npm install -g @jpoindexter/agent-smith
Usage
# Generate AGENTS.md in current directory
agentsmith
# Generate for a specific directory
agentsmith ./my-project
# Preview without writing (dry run)
agentsmith --dry-run
# Custom output file
agentsmith --output CONTEXT.md
# Force overwrite existing file
agentsmith --force
Output Modes
# Default - comprehensive output (~11K tokens)
agentsmith
# Compact - fewer details (~20% smaller)
agentsmith --compact
# Compress - signatures only (~40% smaller)
agentsmith --compress
# Minimal - ultra-compact (~3K tokens)
agentsmith --minimal
# XML format (industry standard, matches Repomix)
agentsmith --xml
# Include file tree visualization
agentsmith --tree