Memory Search Toolkit
Boost productivity using this search, conversation, history, semantic. Includes structured workflows, validation checks, and reusable patterns for ai maestro.
Memory Search Toolkit
Overview
A skill that enables Claude Code to search, recall, and leverage past conversation context, project decisions, and coding patterns across sessions. Builds persistent memory of your project ā including architectural decisions, debugging solutions, user preferences, and code patterns ā so Claude doesn't lose context between conversations.
When to Use
- Starting a new session on an ongoing project
- Recalling past decisions ("Why did we choose PostgreSQL over MongoDB?")
- Finding previous debugging solutions
- Maintaining consistency across sessions
- Avoiding repeating work that was already done
- Understanding the history of a codebase feature
Quick Start
# Search for past context claude "What did we decide about the authentication approach?" # Recall debugging history claude "How did we fix the rate limiting issue last time?" # Find previous implementations claude "Have we implemented pagination before? Show me the pattern we used"
Core Principle
Receive instruction ā Search memory for context ā Then proceed
Always check memory before starting work. Past decisions, patterns, and solutions accelerate current work.
Memory Types
1. Project Decisions
Architectural and design choices with rationale:
## Decision: Use JWT with refresh tokens - Date: 2024-01-15 - Context: Needed stateless auth for microservices - Alternatives considered: Session-based, OAuth2 only - Rationale: Stateless reduces DB load, refresh tokens add security - Trade-offs: Slightly more complex client logic
2. Coding Patterns
Established patterns in the codebase:
## Pattern: Service Layer Error Handling - All service methods throw CustomError with status code - Controllers catch and format to JSON response - Never expose stack traces to clients - Log full error details server-side
3. Debugging Solutions
Previously solved issues:
## Bug: Connection pool exhaustion - Symptoms: Random 500 errors under load - Root cause: Missing connection.release() in error paths - Fix: Wrapped all queries in try/finally with release - Prevention: Added connection pool monitoring
4. User Preferences
Personal and team conventions:
## Preferences - Always use single quotes in TypeScript - Prefer functional components with hooks - Use Tailwind CSS, not CSS modules - Write tests with React Testing Library, not Enzyme - Commit messages follow Conventional Commits
Memory Storage
CLAUDE.md (Project-Level)
The primary memory file, loaded automatically every session:
# Project Memory ## Architecture - Next.js 14 + App Router - PostgreSQL with Prisma ORM - Redis for caching and sessions - Deployed on AWS ECS ## Conventions - API routes in src/app/api/ - Shared types in src/types/ - Utilities in src/lib/ - Components follow atomic design ## Key Decisions - Chose Prisma over Drizzle (better migration support) - Using Server Components by default (client only when needed) - Rate limiting via Redis sliding window
Memory Directory (Topic Files)
For detailed notes, create topic-specific files:
.claude/memory/
āāā MEMORY.md # Index file (auto-loaded)
āāā architecture.md # Architecture decisions
āāā debugging.md # Past debugging solutions
āāā patterns.md # Coding patterns
āāā api-design.md # API conventions
āāā performance.md # Performance findings
Auto-Memory
Claude Code can automatically save important patterns:
# What to save automatically: - Confirmed patterns across multiple interactions - Architecture decisions with rationale - User preferences for tools and style - Solutions to recurring problems - Important file paths and project structure # What NOT to save: - Session-specific temporary context - Incomplete or speculative information - Anything that contradicts existing docs
Search Strategies
By Topic
# Search for authentication-related memories claude "Search memory for authentication decisions" # Search for performance patterns claude "What performance optimizations have we applied?"
By Time
# Find recent decisions claude "What architectural decisions were made this week?" # Find historical context claude "What was the original database design?"
By Problem Type
# Find similar bugs claude "Have we seen connection timeout errors before?" # Find similar features claude "Have we built a file upload feature? What approach did we use?"
Memory Lifecycle
Creating Memories
Save important context when:
- A significant decision is made
- A tricky bug is solved
- A new pattern is established
- User expresses a preference
- An architectural boundary is defined
Updating Memories
Modify when:
- A decision is reversed or evolved
- A better solution is found
- A pattern is refined
- Technology is upgraded
Retiring Memories
Remove when:
- A feature is fully deprecated
- A technology is no longer used
- Information is factually wrong
- Notes are superseded by better documentation
Context Continuity
Session Handoff
When starting a new session, Claude should:
- Read CLAUDE.md ā Load project context and conventions
- Check recent memory ā What was the last session working on?
- Scan git log ā What changed since the last interaction?
- Review open issues ā What needs attention?
Cross-Session Consistency
## Consistency Rules - Always follow established patterns (check memory first) - Reference past decisions when making new ones - Update memory when patterns evolve - Flag when a new approach contradicts a past decision
Best Practices
- Write memories immediately ā Don't wait until the end of a session
- Be specific ā "Use bcrypt with 12 rounds" not "hash passwords"
- Include rationale ā Future-you needs to know why, not just what
- Keep memory concise ā Summaries, not full transcripts
- Organize by topic ā Separate files for architecture, debugging, patterns
- Update, don't duplicate ā Modify existing entries rather than creating new ones
- Link to code ā Reference file paths and line numbers
- Review periodically ā Remove stale or incorrect memories
- Distinguish facts from opinions ā Mark preferences vs requirements
- Use memory as documentation ā If it's worth remembering, it's worth documenting
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.