Agent skill
mem-search
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/mem-search
SKILL.md
Memory Search - Cross-Session Context
Overview
Search through stored observations from past Claude Code sessions. Use this skill when the user asks about:
- "What did we do last session?"
- "How did we implement X before?"
- "What bugs did we fix recently?"
- "What decisions were made about Y?"
- "Show me recent work on this project"
How to Use
Run the search command to query the context memory database:
python3 "$CLAUDE_PROJECT_DIR/.claude/memory/context_memory.py" search "<query>"
Common Queries
Recent activity:
python3 "$CLAUDE_PROJECT_DIR/.claude/memory/context_memory.py" recent
Search for specific topic:
python3 "$CLAUDE_PROJECT_DIR/.claude/memory/context_memory.py" search "authentication"
Get statistics:
python3 "$CLAUDE_PROJECT_DIR/.claude/memory/context_memory.py" stats
Get full context for current branch:
python3 "$CLAUDE_PROJECT_DIR/.claude/memory/context_memory.py" context "branch-name"
Observation Types
The memory stores these types of observations:
| Type | Symbol | Description |
|---|---|---|
| decision | D | Choices made about architecture, tools, approaches |
| bugfix | B | Bug fixes and error resolutions |
| feature | F | New features implemented |
| refactor | R | Code refactoring and cleanup |
| discovery | i | Information discovered during exploration |
| change | C | General code changes |
Database Location
The context memory is stored at: ~/.claude/context_memory.duckdb
Response Format
When presenting search results:
- Group by type (decisions, bugfixes, features, etc.)
- Show most recent first
- Include timestamp and branch if relevant
- Summarize rather than dump raw data
Example Response
"Based on context memory, here's what happened:
Recent Decisions:
- [2 days ago] Chose DuckDB over SQLite + Chroma for context storage
- [3 days ago] Adopted tiered context injection strategy
Recent Bugfixes:
- [Yesterday] Fixed authentication timeout in API routes
Recent Features:
- [Today] Implemented context memory hooks"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?