Loading...
Loading...
Manages permanent memory storage for decisions, blockers, context, preferences, and procedures. Use when user says "remember", "save this decision", "what did we decide", "recall", "search memories", "any blockers", or when making important architectural decisions. Provides SDAM compensation through external memory.
npx skill4agent add jackspace/claudeskillz context-managerDECISION: "remember we're using PostgreSQL"
BLOCKER: "remember I can't access the API yet"
CONTEXT: "remember this is for BOOSTBOX project"
PREFERENCE: "remember I prefer functional components"
PROCEDURE: "remember how to deploy: npm run build then rsync"
NOTE: "remember to update docs after this feature"# Cross-platform: Use $HOME (Linux/macOS) or %USERPROFILE% (Windows)
cat ~/.claude-memories/index.json
# Windows PowerShell alternative:
# Get-Content "$env:USERPROFILE\.claude-memories\index.json"{
"version": "1.0.0",
"created": "2025-10-17T17:45:00Z",
"last_updated": "{current_timestamp}",
"total_memories": N + 1,
"memories_by_type": {
"DECISION": X + 1,
...
},
"memories": [
{
"id": "{uuid}",
"type": "DECISION",
"content": "Using PostgreSQL as primary database",
"timestamp": "{current_timestamp}",
"tags": ["database", "postgresql", "backend"],
"project": "boostbox",
"context": {
"file": "{current_file_if_relevant}",
"conversation_id": "{if_available}"
}
},
...existing memories
],
"tags_index": {
"database": ["{uuid1}", "{uuid2}"],
"postgresql": ["{uuid}"]
},
"project_index": {
"boostbox": ["{uuid1}", "{uuid2}"],
"toolhub": ["{uuid3}"]
}
}# Save to category-specific directory
# Linux/macOS: ~/.claude-memories/decisions/{uuid}.md
# Windows: %USERPROFILE%\.claude-memories\decisions\{uuid}.md
~/.claude-memories/decisions/{uuid}.md# DECISION: Using PostgreSQL
**Date**: 2025-10-17T17:45:00Z (2 hours ago)
**Project**: BOOSTBOX
**Tags**: database, postgresql, backend
## Decision
Using PostgreSQL as primary database instead of MongoDB.
## Rationale
{if provided by user or inferred from conversation}
## Context
{surrounding conversation context}
## Related Memories
{if any related memories found by tag/project match}
## Last Updated
2025-10-17T17:45:00Z✅ Remembered: Using PostgreSQL as primary database
📁 Saved to: decisions/{uuid}.md
🏷️ Tags: database, postgresql, backend
📊 Total memories: {N+1}// Priority order:
1. Exact tag match in requested project
2. Exact tag match in any project
3. Partial content match in requested project
4. Partial content match in any project
// Sort by:
1. Relevance (exact match > partial)
2. Recency (newer > older)
3. Type priority (BLOCKER > DECISION > others)# For each matching UUID
cat ~/.claude-memories/decisions/{uuid}.md
# Windows PowerShell:
# Get-Content "$env:USERPROFILE\.claude-memories\decisions\{uuid}.md"🔍 Found 3 memories about "database":
1. DECISION: Using PostgreSQL (2 days ago)
📁 Project: BOOSTBOX
💡 Using PostgreSQL as primary database instead of MongoDB
🔗 decisions/abc-123.md
2. DECISION: Database schema design (5 days ago)
📁 Project: BOOSTBOX
💡 User table with UUID primary keys
🔗 decisions/def-456.md
3. PREFERENCE: Prefer migrations over raw SQL (1 week ago)
📁 All projects
💡 Always use migration files, never direct SQL schema changes
🔗 preferences/ghi-789.md
Would you like details on any of these?🚧 Detected blocker: API credentials not available
Saving as BLOCKER for tracking.
When this is resolved, say "blocker resolved: [brief description]"User: "blocker resolved: got API credentials"
✅ Blocker resolved: API credentials not available
📝 Updated memory with resolution timestamp
⏱️ Blocked for: 2 days 4 hoursBasic: "search [topic]"
Type filter: "search decisions about [topic]"
Project filter: "search boostbox [topic]"
Time filter: "search [topic] this week|month|today"
Combined: "search boostbox decisions about database this week"# DECISION: {title}
## What we decided
{the decision}
## Why
{rationale - infer from conversation}
## Alternatives considered
{if discussed}
## Impact
{affected areas}# BLOCKER: {title}
## Issue
{what's blocking}
## Impact
{what can't be done}
## Workarounds tried
{if any}
## Status
Active | Resolved | Bypassed
## Resolution (when resolved)
{how it was fixed}
{timestamp of resolution}# PROCEDURE: {title}
## When to use
{triggering condition}
## Steps
1. {step 1}
2. {step 2}
3. {step 3}
## Expected outcome
{what success looks like}
## Troubleshooting
{common issues}function relativeTime(timestamp) {
const now = Date.now();
const then = new Date(timestamp).getTime();
const diff = now - then;
const minutes = Math.floor(diff / 60000);
const hours = Math.floor(diff / 3600000);
const days = Math.floor(diff / 86400000);
if (minutes < 60) return `${minutes} minutes ago`;
if (hours < 24) return `${hours} hours ago`;
if (days < 7) return `${days} days ago`;
if (days < 30) return `${Math.floor(days/7)} weeks ago`;
return `${Math.floor(days/30)} months ago`;
}~/.claude-memories/index.json%USERPROFILE%\.claude-memories\index.json{
"version": "1.0.0",
"created": "ISO8601",
"last_updated": "ISO8601",
"total_memories": 0,
"memories_by_type": {
"DECISION": 0,
"BLOCKER": 0,
"CONTEXT": 0,
"PREFERENCE": 0,
"PROCEDURE": 0,
"NOTE": 0
},
"memories": [
{
"id": "uuid",
"type": "DECISION|BLOCKER|CONTEXT|PREFERENCE|PROCEDURE|NOTE",
"content": "brief summary",
"timestamp": "ISO8601",
"tags": ["tag1", "tag2"],
"project": "project-name",
"status": "active|resolved|archived",
"context": {
"file": "optional-file-path",
"line": "optional-line-number"
}
}
],
"tags_index": {
"tag-name": ["uuid1", "uuid2"]
},
"project_index": {
"project-name": ["uuid1", "uuid2"]
},
"session_index": {
"session-id": ["uuid1", "uuid2"]
}
}~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)
├── index.json # Master index
├── decisions/ # Architecture decisions
│ ├── {uuid1}.md
│ └── {uuid2}.md
├── blockers/ # Active/resolved blockers
│ ├── {uuid3}.md
│ └── {uuid4}.md
├── context/ # Project context
│ ├── {uuid5}.md
│ └── {uuid6}.md
├── preferences/ # User preferences
│ ├── {uuid7}.md
│ └── {uuid8}.md
├── procedures/ # How-to procedures
│ ├── {uuid9}.md
│ └── {uuid10}.md
├── notes/ # General notes
│ ├── {uuid11}.md
│ └── {uuid12}.md
├── sessions/ # Session summaries
│ ├── 2025-10-17.md
│ └── 2025-10-16.md
└── backups/ # Daily backups
├── index-2025-10-17.json
└── index-2025-10-16.jsonUser: "Let's use React for the frontend"
→ Auto-save as DECISION: Using React for frontendUser: "Can't connect to the API"
→ Auto-save as BLOCKER: API connection failingUser: "I prefer TypeScript over JavaScript"
→ Auto-save as PREFERENCE: Prefer TypeScriptUser: "To deploy: run npm build then copy to server"
→ Auto-save as PROCEDURE: Deployment process💾 Saved as DECISION: Using React for frontend
(say "undo" within 30 seconds to cancel)# Every 24 hours, create backup
# Linux/macOS:
cp ~/.claude-memories/index.json \
~/.claude-memories/backups/index-$(date +%Y-%m-%d).json
# Windows PowerShell:
# Copy-Item "$env:USERPROFILE\.claude-memories\index.json" `
# "$env:USERPROFILE\.claude-memories\backups\index-$(Get-Date -Format 'yyyy-MM-dd').json"
# Keep last 30 days (Linux/macOS):
find ~/.claude-memories/backups/ -name "index-*.json" -mtime +30 -delete
# Windows PowerShell:
# Get-ChildItem "$env:USERPROFILE\.claude-memories\backups\index-*.json" |
# Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-30)} | Remove-Item# If index.json corrupted, restore from backup
# Linux/macOS:
cp ~/.claude-memories/backups/index-$(date -d yesterday +%Y-%m-%d).json \
~/.claude-memories/index.json
# Windows PowerShell:
# Copy-Item "$env:USERPROFILE\.claude-memories\backups\index-$(Get-Date (Get-Date).AddDays(-1) -Format 'yyyy-MM-dd').json" `
# "$env:USERPROFILE\.claude-memories\index.json"| User Says | Action |
|---|---|
| "remember we're using PostgreSQL" | Save as DECISION |
| "what did we decide about the database" | Search DECISIONs for "database" |
| "show all blockers" | List active BLOCKERs |
| "any blockers?" | Quick blocker check |
| "remember I prefer functional components" | Save as PREFERENCE |
| "search memories for authentication" | Full-text search |
| "blocker resolved: got API key" | Mark blocker as resolved |
~/.claude-memories/index.json%USERPROFILE%\.claude-memories\index.json~/.claude-memories/decisions/{uuid}.md%USERPROFILE%\.claude-memories\decisions\{uuid}.md~/.claude-memories/blockers/{uuid}.md%USERPROFILE%\.claude-memories\blockers\{uuid}.md~/.claude-memories/backups/%USERPROFILE%\.claude-memories\backups\