auto-sop
v0.1.9
Published
Make Claude Code self-improving — auto-detect recurring mistakes and write enforced CLAUDE.md directives
Maintainers
Readme
What It Does
auto-sop captures every Claude Code interaction, detects recurring mistakes (3+ evidence threshold), and writes enforced directives to your project's CLAUDE.md — automatically. Zero manual upkeep. Claude Code reads these directives on every session, so the same mistake never happens again.
Install
npx auto-sop installOne command. Hooks, scheduler, and managed CLAUDE.md section are configured automatically.
Or via Homebrew:
brew install auto-sop/tap/auto-sopQuick Start
npx auto-sop install # set up hooks + hourly learner
# ... use Claude Code normally — captures happen silently ...
auto-sop learn-now # trigger learning now (or wait for the hourly scheduler)
cat CLAUDE.md # directives appear in the managed sectionHow It Works
Claude Code hooks (PreToolUse / PostToolUse / Stop)
|
v
+---------------+
| Hook Shim | <50ms overhead, double-fork
| (capture) |
+-------+-------+
| stdin JSON -> scrub secrets -> write atomically
v
+---------------+
| Capture Store | per-project, timestamped, lockfile-protected
+-------+-------+
|
v
+---------------+
| Learner | hourly (launchd/systemd) or on-demand
| | rule-based detectors (N>=3 evidence)
| | + LLM analysis (claude -p, $0 via Max)
+-------+-------+
| validated directives
v
+---------------+
| CLAUDE.md | managed section: hash-checked, git-aware,
| Editor | revertible, TTL pruning, drift detection
+---------------+
|
v
Claude Code reads CLAUDE.md on every session
-> same mistake never happens againPricing
Free (forever)
- 1 project, unlimited directives
- Anonymous usage stats (no capture content — see Privacy)
- All CLI commands:
install,uninstall,status,learn-now,stats,doctor, and more - Uses your Claude Max subscription ($0 cost)
Pro ($12/mo or $99/yr)
- Unlimited projects
- Full cloud sync
- Web dashboard
- Cross-machine directives
- Priority support
- No credit card on trial
Compatibility
| Requirement | Version | | ----------- | ------- | | Claude Code | >= 2.1.107 | | Node.js | >= 20 | | OS | macOS, Linux, Windows |
Privacy
Captures never leave your machine — all analysis runs locally via your own Claude Max subscription. Anonymous aggregate stats (error rates, CLI command counts) are synced; no capture content is included. Pro cloud sync is opt-in and encrypted client-side (AES-256) before upload.
For full details, see our Privacy Documentation.
Documentation
Full documentation is available at auto-sop.com/docs.
