codex/skills/cass-memory/SKILL.md
CASS Memory System (cm) for procedural memory. Use when starting non-trivial tasks, learning from past sessions, building playbooks, or preventing repeated mistakes via trauma guard.
npx skillsauth add tkersey/dotfiles cass-memoryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Core Capability: Transforms scattered agent sessions into persistent, cross-agent procedural memory. A pattern discovered in Cursor automatically helps Claude Code on the next session.
# Initialize with a starter playbook
cm init --starter typescript
# THE ONE COMMAND: run before any non-trivial task
cm context "implement user authentication" --json
# Check system health
cm doctor --json
Before starting this task, run:
cm context "<task description>" --json
Read the output carefully:
- relevantBullets: Rules from playbook scored by relevance
- antiPatterns: Things that have caused problems before
- historySnippets: Past sessions (yours and other agents')
- suggestedCassQueries: Deeper investigation if needed
Reference rule IDs when following them (e.g., "Following b-8f3a2c...")
# When a rule helped
cm mark b-8f3a2c --helpful
# When a rule caused problems
cm mark b-xyz789 --harmful --reason "Caused regression"
# Or leave inline comments (parsed during reflection)
// [cass: helpful b-8f3a2c] - this saved me from a rabbit hole
// [cass: harmful b-x7k9p1] - wrong for our use case
# Install safety hooks to prevent dangerous commands
cm guard --install # Claude Code hook
cm guard --git # Git pre-commit hook
cm guard --status # Check installation
# Add custom trauma patterns
cm trauma add "DROP TABLE" --description "Mass deletion" --severity critical
# Scan past sessions for trauma patterns
cm trauma scan --days 30
┌─────────────────────────────────────────────────────────────────────┐
│ EPISODIC MEMORY (cass) │
│ Raw session logs from all agents — the "ground truth" │
└───────────────────────────┬─────────────────────────────────────────┘
│ cass search
▼
┌─────────────────────────────────────────────────────────────────────┐
│ WORKING MEMORY (Diary) │
│ Structured session summaries: accomplishments, decisions, etc. │
└───────────────────────────┬─────────────────────────────────────────┘
│ reflect + curate (automated)
▼
┌─────────────────────────────────────────────────────────────────────┐
│ PROCEDURAL MEMORY (Playbook) │
│ Distilled rules with confidence tracking and decay │
└─────────────────────────────────────────────────────────────────────┘
| Command | Purpose |
|---------|---------|
| cm context "<task>" --json | Get rules + history for task |
| cm mark <id> --helpful/--harmful | Record feedback |
| cm playbook list | View all rules |
| cm top 10 | Top effective rules |
| cm doctor --json | System health |
| cm guard --install | Install safety hooks |
1. START: cm context "<task>" --json
2. WORK: Reference rule IDs when following them
3. FEEDBACK: Leave inline comments when rules help/hurt
4. END: Just finish. Learning happens automatically.
You do NOT need to:
cm reflect (automation handles this)cm mark manually (use inline comments)Rules aren't immortal. Confidence decays without revalidation:
| Mechanism | Effect |
|-----------|--------|
| 90-day half-life | Confidence halves every 90 days without feedback |
| 4x harmful multiplier | One mistake counts 4x as much as one success |
| Maturity progression | candidate → established → proven |
Bad rules don't just get deleted. They become warnings:
"Cache auth tokens for performance"
↓ (3 harmful marks)
"PITFALL: Don't cache auth tokens without expiry validation"
cm starters # List available
cm init --starter typescript # Initialize with starter
cm playbook bootstrap react # Apply to existing playbook
| Starter | Focus | |---------|-------| | general | Universal best practices | | typescript | TypeScript/Node.js | | react | React/Next.js | | python | Python/FastAPI/Django | | rust | Rust service patterns |
| Flag | Effect |
|------|--------|
| --limit N | Cap number of rules |
| --min-score N | Only rules above threshold |
| --no-history | Skip historical snippets |
| --json | Structured output |
| Condition | Behavior | |-----------|----------| | No cass | Playbook-only scoring, no history | | No playbook | Empty playbook, commands still work | | No LLM | Deterministic reflection | | Offline | Cached playbook + local diary |
# One-liner
curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/cass_memory_system/main/install.sh \
| bash -s -- --easy-mode --verify
# From source
git clone https://github.com/Dicklesworthstone/cass_memory_system.git
cd cass_memory_system
bun install && bun run build
sudo mv ./dist/cass-memory /usr/local/bin/cm
| Error | Solution |
|-------|----------|
| cass not found | Install cass first |
| API key missing | Set ANTHROPIC_API_KEY |
| Playbook corrupt | Run cm doctor --fix |
| Topic | Reference | |-------|-----------| | Full command reference | COMMANDS.md | | Cognitive architecture | ARCHITECTURE.md | | Trauma guard system | TRAUMA-GUARD.md | | MCP server integration | MCP-SERVER.md | | Onboarding workflow | ONBOARDING.md |
tools
Convert markdown plans into beads with dependencies using br CLI. Use when creating task graphs, polishing beads before implementation, or bridging planning to agent swarm execution.
development
Orchestrate Codex skill optimization during active sessions through $cas goal control, $shadow single-session evidence, $tune diagnosis/refinement briefs, and the skill-optimizer custom subagent. Trigger for $opt, skill optimization loops, session-driven skill tuning, meta-skill audits, or explicit validated skill edits. Do not use for general code optimization, product optimization, or performance tuning.
development
Run a targeted fresh-eyes blunder pass over code, specs, plans, adjudications, closure gates, skill edits, or negative-evidence ledgers. Trigger when asked to reread with fresh eyes, find obvious bugs, catch mistakes/oversights/omissions, check for embarrassing misses, or perform a second independent blunder pass before closure. Do not use as a substitute for implementation, adjudication, or verification; use it as the final falsification/check pass for those workflows.
development
Explicitly shadow, tail, watch, follow, monitor, supervise, or companion exactly one Codex session id/path through `$seq`, then apply a named target skill as an interpretation/reporting/proposal/action lens until the watched session stops.