| name | ai-crap-manager |
| description | | Use when this capability is needed. |
AI Crap Manager
Centralized management for AI-generated configuration files across all your projects.
Problem
AI coding tools (Claude Code, Cursor, Windsurf, Copilot, etc.) generate config directories and files at project roots:
.claude/, CLAUDE.md, .claude/settings.json
.cursor/, .cursorules
.windsurf/, .windsurfrules
.github/copilot-instructions.md
.aider*, .cline/, .roo/, .codex/, .bolt/, .devin/, .replit/
- Agent configs, hooks, skills, subagents, MCP configs
These pollute git history, create merge conflicts, and clutter repos.
Solution
~/.agent-crap/ is the single source of truth. Each project gets a subdirectory. Files are symlinked back to project roots.
~/.agent-crap/
projects/
my-app/ # mirrors ~/Code/my-app AI configs
.claude/
CLAUDE.md
.cursor/
another-repo/
.claude/
CLAUDE.md
templates/ # reusable config templates
snapshots/ # named point-in-time snapshots
hooks/ # auto-sync watcher scripts
backups/ # automatic backups before operations
logs/ # hook execution logs
registry.json # maps project names -> original paths
Setup Script
ACM="bash ~/.claude/skills/ai-crap-manager/scripts/setup.sh"
Quick Start
$ACM init
$ACM register ~/Code/my-app
$ACM alias-install
Command Reference
Core Commands
$ACM init
$ACM register [path]
$ACM unregister [path]
$ACM sync [path]
$ACM sync-all
$ACM status [path]
$ACM list
$ACM detect [path]
$ACM gitignore [path]
Batch Commands
$ACM batch-register ~/Code/*
$ACM scan ~/Code
$ACM adopt ~/Code
scan shows what exists without changing anything. adopt does scan + register in one step.
Template Commands
Templates let you save and reuse AI configs across projects.
$ACM template list
$ACM template save <name> [path]
$ACM template apply <name> [path]
$ACM template delete <name>
$ACM template show <name>
Use cases:
- Save your Claude Code setup (CLAUDE.md, hooks, agents) as a template
- Apply it to every new project
- Maintain "starter" templates per project type (swift-app, react-app, python-lib)
$ACM template save swift-pro ~/Code/my-polished-app
$ACM template apply swift-pro ~/Code/new-app
Snapshot Commands
Snapshots capture the exact state of a project's AI configs at a point in time. Unlike backups (automatic, time-based), snapshots are named and intentional.
$ACM snapshot <name> [path]
$ACM snapshot-list [path]
$ACM snapshot-restore <name> [path]
Use cases:
- Snapshot before experimenting with new agent configs
- Snapshot "working" state before a major CLAUDE.md rewrite
- Quick rollback when something breaks
$ACM snapshot before-refactor
$ACM snapshot-restore before-refactor
Diff & Inspect
$ACM diff [path]
$ACM tree [path]
$ACM stats
diff catches files that were modified directly in the project instead of through symlinks (e.g., after a git checkout that replaced a symlink with a real file).
stats shows: project count, agent popularity, disk usage breakdown.
Custom File Tracking
Track ANY file or directory beyond the built-in AI patterns. Useful for project-specific configs, prompt libraries, AI training data, or anything else you want centralized.
$ACM track <file-or-dir> [path]
$ACM untrack <file-or-dir> [path]
$ACM tracked [path]
Features:
- Comma-separated multiple files:
$ACM track "file1,file2,dir1"
- Glob patterns:
$ACM track "*.prompts"
- Nested paths:
$ACM track configs/ai/prompts.yaml
- Auto-registers project if not yet registered
- Auto-adds to .gitignore
- Auto-removes from .gitignore on untrack
Examples:
$ACM track prompts/
$ACM track .ai-data,.ai-prompts
$ACM track "Makefile.ai,rules.yaml"
$ACM untrack .cursorules
$ACM tracked
Auto-Sync Hooks
Install hooks so syncing happens automatically.
$ACM hook-install [path]
$ACM hook-remove [path]
What gets installed:
| Hook | Trigger | Purpose |
|---|
| Git post-checkout | Branch switch | Recreate symlinks after checkout |
| Git post-merge | After merge/pull | Absorb new AI files |
| fswatch watcher | File changes in store | Live sync (optional, if fswatch installed) |
| LaunchAgent (macOS) | WatchPaths on store dir | Background sync daemon |
Maintenance
$ACM doctor
$ACM gc
$ACM export <path.tar.gz>
$ACM import <archive.tar.gz>
$ACM alias-install
Options
--dry-run
--force
--verbose
--only <agent>
Tracked File Patterns
| Pattern | Tool |
|---|
.claude/ | Claude Code |
CLAUDE.md | Claude Code |
.cursor/ | Cursor |
.cursorules | Cursor |
.windsurf/ | Windsurf |
.windsurfrules | Windsurf |
.github/copilot-instructions.md | GitHub Copilot |
.vscode/ai-instructions.md | VS Code AI |
.aider* | Aider |
.cline/ | Cline |
.clinerules | Cline |
.roo/ | Roo |
.roomodes | Roo |
.codex/ | Codex |
.copilot/ | Copilot |
.bolt/ | Bolt |
.devin/ | Devin |
.replit/ | Replit |
.idx/ | IDX |
Workflows
First time: register everything at once
$ACM init
$ACM adopt ~/Code
$ACM alias-install
New project with template
cd ~/Code/new-project
acm template apply swift-pro
acm hook-install
Before risky config changes
acm snapshot stable
acm snapshot-restore stable
Moving to a new machine
acm export ~/Desktop/ai-configs.tar.gz
acm import ~/Desktop/ai-configs.tar.gz
acm sync-all
Periodic maintenance
acm doctor
acm gc
acm stats
Registry Format
~/.agent-crap/registry.json:
{
"version": 2,
"projects": {
"my-app": {
"path": "/Users/bruno/Code/my-app",
"registered": "2026-03-12T10:00:00+00:00",
"last_sync": "2026-03-12T15:30:00+00:00",
"tracked_files": [".claude/", "CLAUDE.md", ".cursor/"],
"agents": ["claude-code", "cursor"],
"tags": []
}
}
}
Safety
- All destructive operations create automatic backups
unregister restores files to their original locations
snapshot-restore backs up current state before restoring
import backs up existing store before overwriting
- Symlink verification before any destructive operation
- Registry is the single source of truth for mappings
doctor catches corruption, orphans, and broken links
gc only removes backups older than 30 days
Source: brunogama/ai-crap-manager — distributed by TomeVault.