memory-management
Context tracking and decision logging patterns for intentional memory management in Claude Code Waypoint Plugin. Use when you need to remember user preferences, track decisions, capture context across sessions, learn from corrections, or maintain project-specific knowledge. Covers when to persist context, how to track decisions, context boundaries, storage mechanisms, and memory refresh strategies.
What this skill does
# Memory Management Skill
## Purpose
Guide Claude Code to intentionally capture, store, and use context, decisions, and preferences across sessions, enabling true "memory" that survives context resets and improves over time.
## When to Use This Skill
Automatically activates when you mention:
- Remembering user preferences or choices
- Tracking decisions made during development
- Capturing important context
- Learning from user corrections
- Persisting project-specific knowledge
- Memory that survives session resets
## The Problem: Context Loss
**Without intentional memory**:
- ❌ Same mistakes repeated across sessions
- ❌ User has to re-explain preferences every time
- ❌ Important decisions forgotten after context reset
- ❌ No learning from corrections
- ❌ Starting from scratch each session
**With intentional memory**:
- ✅ Preferences remembered and auto-applied
- ✅ Decisions documented and retrievable
- ✅ Context persists across sessions
- ✅ Learn and adapt from corrections
- ✅ Continuous improvement over time
---
## Core Principles
### 1. Be Selective
**Track signal, not noise**:
- ✅ User explicitly states preference ("always use X")
- ✅ User corrects same pattern 2+ times
- ✅ Important architectural decisions
- ✅ Project-specific conventions
- ❌ One-time experiments
- ❌ Formatting preferences (use linter config)
- ❌ Temporary changes
- ❌ Information already in codebase
### 2. Be Transparent
**User should always know what's stored**:
- Store in visible location (`.claude/memory/`)
- Use human-readable format (JSON with comments)
- Provide commands to view memory (`/show-memory`)
- Log when memory is created/updated
- Allow user to clear memory anytime
### 3. Be Intentional
**Only capture what adds value**:
- Preferences that save time
- Decisions that provide context
- Patterns that prevent mistakes
- Knowledge that's hard to rediscover
### 4. Be Respectful
**Never store sensitive data**:
- ❌ API keys, tokens, credentials
- ❌ Personal information (unless necessary)
- ❌ Private repository URLs with tokens
- ❌ Business-sensitive logic
- ✅ Preferences, patterns, conventions
- ✅ Architecture decisions, rationale
---
## What to Remember
### User Preferences
**Examples**:
- Naming conventions (camelCase vs. snake_case)
- Import style (named vs. default)
- Error handling approach (try/catch vs. error boundaries)
- State management choice (Context vs. Zustand vs. TanStack Query)
- Component structure preferences
**Storage location**: `.claude/memory/{skill-name}/preferences.json`
**Example**:
```json
{
"naming": {
"convention": "camelCase",
"learned_from": "user_correction",
"correction_count": 2,
"examples": [
"userId (not user_id)",
"createdAt (not created_at)"
],
"confidence": "high",
"last_updated": "2025-01-15T10:30:00Z"
}
}
```
### Architectural Decisions
**Examples**:
- Why a specific pattern was chosen
- Alternatives considered and rejected
- Trade-offs and constraints
- Future considerations
**Storage location**: `.claude/memory/project/decisions.json`
**Example**:
```json
{
"decisions": [
{
"id": "auth-jwt-2025-01-15",
"date": "2025-01-15",
"decision": "Use JWT authentication instead of sessions",
"rationale": "Need stateless auth for mobile apps",
"alternatives_considered": [
"Session-based auth (rejected: not stateless)",
"OAuth only (rejected: need custom auth flow)"
],
"impact": "Requires database migration for refresh tokens",
"files_affected": [
"lib/supabase/auth.ts",
"app/api/auth/**/*.ts"
]
}
]
}
```
### Correction Patterns
**Examples**:
- User repeatedly corrects same mistake
- User provides specific guidance
- User rejects suggested approach
**Storage location**: `.claude/memory/{skill-name}/corrections.json`
**Example**:
```json
{
"corrections": [
{
"pattern": "Import style",
"count": 3,
"first_seen": "2025-01-10T09:00:00Z",
"last_seen": "2025-01-15T14:30:00Z",
"examples": [
"import { Component } from 'lib' ✓",
"import Component from 'lib' ✗"
],
"action": "Always use named imports",
"confidence": "high"
}
]
}
```
### Project Knowledge
**Examples**:
- Tech stack and versions
- Project structure and organization
- Integration points (APIs, databases)
- Deployment patterns
**Storage location**: `.claude/memory/project/knowledge.json`
**Example**:
```json
{
"tech_stack": {
"frontend": "Next.js 14, React 19, shadcn/ui, Tailwind",
"backend": "Supabase Edge Functions, PostgreSQL",
"deployment": "Vercel (frontend), Supabase (backend)",
"last_verified": "2025-01-15"
},
"structure": {
"components": "app/components/",
"pages": "app/(routes)/",
"api": "app/api/",
"supabase_functions": "supabase/functions/"
}
}
```
---
## When to Persist
### Immediate Persistence
Capture immediately when:
- ✅ User explicitly says "always" or "never"
- ✅ User provides architectural decision with rationale
- ✅ User corrects same pattern for the 2nd time
- ✅ User defines project-specific convention
### Deferred Persistence
Capture after confirmation when:
- User provides preference once (wait for second instance)
- Pattern seems emerging but not confirmed
- Decision has significant impact (confirm first)
### Never Persist
Don't capture:
- ❌ Experimental or temporary changes
- ❌ Information already in code/config
- ❌ Generic best practices (not project-specific)
- ❌ Sensitive data of any kind
---
## Storage Patterns
### Directory Structure
```
.claude/memory/
├── project/
│ ├── knowledge.json # Tech stack, structure
│ ├── decisions.json # Architectural decisions
│ └── context.json # Current feature context
├── {skill-name}/
│ ├── preferences.json # User preferences for this skill
│ ├── corrections.json # User corrections tracked
│ └── learned_patterns.json # Patterns learned over time
└── .gitignore # Don't commit sensitive memory
```
### File Format
Use JSON with clear structure:
```json
{
"version": "1.0",
"created": "2025-01-15T10:00:00Z",
"last_updated": "2025-01-15T14:30:00Z",
"data": {
// Actual content
}
}
```
### Schema Example
```typescript
interface MemoryEntry {
version: string;
created: string; // ISO timestamp
last_updated: string; // ISO timestamp
expires?: string; // Optional expiry
confidence: 'low' | 'medium' | 'high';
source: 'user_stated' | 'user_correction' | 'inferred';
data: Record<string, any>;
}
```
---
## Decision Tracking
### What Makes a Good Decision Log
**Include**:
1. **What**: What was decided
2. **Why**: Rationale and reasoning
3. **When**: Date/time
4. **Alternatives**: What else was considered
5. **Impact**: Files affected, breaking changes
6. **Context**: Current constraints/requirements
**Example Template**:
```markdown
## Decision: [Short Title]
**Date**: 2025-01-15
**Context**: [What problem were we solving?]
**Decision**: [What we decided to do]
**Rationale**:
- [Key reason 1]
- [Key reason 2]
**Alternatives Considered**:
- **Option A**: [Why rejected]
- **Option B**: [Why rejected]
**Impact**:
- Files: [List of affected files]
- Breaking: [Yes/No - details]
- Migration: [What needs to change]
**Trade-offs**:
- ✅ Pro: [Benefit]
- ❌ Con: [Drawback]
```
### When to Log Decisions
**Always log**:
- ✅ Architecture changes (auth, state management, routing)
- ✅ Technology choices (new library, framework change)
- ✅ Breaking changes to APIs or database
- ✅ Deviation from established patterns
**Optional logging**:
- Component structure choices
- File organization changes
- Refactoring approaches
**Don't log**:
- Bug fixes (unless revealing design issue)
- Minor implementation details
- Routine tasks
---
## Correction Tracking
### Detecting Corrections
User corrections happen when:
1. User exRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.