cass-memory
Cross-agent learning with cm (cass-memory). Use before starting non-trivial tasks, when looking for patterns from past work, when the user mentions "cm", "memory", "learned rules", or "what do we know about".
When & Why to Use This Skill
The cass-memory (cm) skill is a sophisticated cross-agent learning system designed to enhance Claude's long-term memory and task execution. By automatically extracting patterns, rules, and anti-patterns from historical sessions, it provides agents with critical context and learned knowledge before starting non-trivial tasks, ensuring consistency and continuous improvement across different workstreams.
Use Cases
- Pre-task Contextual Intelligence: Use 'cm context' before starting complex engineering tasks, such as implementing OAuth or database migrations, to retrieve relevant historical rules and project-specific patterns.
- Anti-pattern Avoidance: Identify and avoid recurring mistakes by querying the system for 'anti-patterns' learned from previous sessions, significantly reducing debugging time and technical debt.
- Cross-Agent Knowledge Transfer: Enable different AI agents to share a unified memory pool, allowing a new agent to quickly understand 'what we know about' a specific topic or project based on past interactions.
- Automated Playbook Evolution: Automatically build and refine a library of 'learned rules' without manual documentation, creating a self-improving knowledge base that evolves with every task completed.
- System Health and Diagnostic Checks: Utilize 'cm doctor' to verify the integrity of the learning pipeline and ensure that the agent's memory indexing is functioning optimally for context retrieval.
| name | cass-memory |
|---|---|
| description | Cross-agent learning with cm (cass-memory). Use before starting non-trivial tasks, when looking for patterns from past work, when the user mentions "cm", "memory", "learned rules", or "what do we know about". |
cass-memory (cm)
Cross-agent learning system. Extracts patterns, rules, and anti-patterns from past sessions.
When This Applies
| Signal | Action |
|---|---|
| Starting non-trivial task | cm context |
| "What do we know about X?" | cm context |
| Looking for patterns | cm context |
| Anti-patterns to avoid | cm context |
| Health check | cm doctor |
Primary Command
Before starting any non-trivial task:
cm context "your task description" --json
This returns:
- Relevant rules from the playbook
- Historical context from past sessions
- Anti-patterns to avoid
- Suggested searches for deeper investigation
Example Usage
# Before implementing authentication
cm context "implement OAuth login" --json
# Before database work
cm context "add new database migration" --json
# Before refactoring
cm context "refactor the payment module" --json
What You Get Back
{
"rules": ["Always use parameterized queries", "..."],
"context": ["Previous auth implementation used JWT...", "..."],
"anti_patterns": ["Don't store tokens in localStorage", "..."],
"suggested_searches": ["cass search 'OAuth implementation' --robot"]
}
Health Check
cm doctor
How It Works
The system learns automatically from your sessions:
- Sessions are indexed by CASS
cmextracts patterns, rules, and anti-patternscm contextretrieves relevant learned knowledge
You don't need to:
- Manually run reflection/learning steps
- Manually add rules to the playbook
- Worry about the learning pipeline
When to Use cm vs CASS
| Need | Use |
|---|---|
| Learned patterns and rules | cm context |
| Raw session content | cass search |
| Specific session details | cass view / cass expand |
Quick Reference
cm context "task description" --json # Get context before task
cm doctor # Health check
Best Practices
| Practice | Why |
|---|---|
| Query before non-trivial work | Get patterns + anti-patterns |
| Be specific in task description | Better relevance |
| Check suggested searches | May reveal useful history |
See Also
cass-search/— Raw session search with CASSproject-memory/— Session context retrieval skill