Files
claude-mem/plugin/skills/search/SKILL.md
T
Alex Newman ca4f046777 feat: Add search skill with progressive disclosure and refactor existing skills
Enhancements:
- Added search skill with 10 HTTP API endpoints for memory queries
- Refactored version-bump and troubleshoot skills using progressive disclosure pattern
- Added operations/ subdirectories for detailed skill documentation
- Updated CLAUDE.md with skill-based search architecture
- Enhanced worker service with search API endpoints
- Updated CHANGELOG.md with v5.4.0 migration details

Technical changes:
- New plugin/skills/search/ directory with SKILL.md
- New .claude/skills/version-bump/operations/ (workflow.md, scenarios.md)
- New plugin/skills/troubleshoot/operations/ (common-issues.md, worker.md)
- Modified src/services/worker-service.ts (added search endpoints)
- Modified plugin/scripts/worker-service.cjs (rebuilt with search API)
- Reduced main skill files by 89% using progressive disclosure
- Token savings: ~2,250 tokens per session start

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 18:41:53 -05:00

4.2 KiB

name, description
name description
search Search claude-mem persistent memory for past sessions, observations, bugs fixed, features implemented, decisions made, code changes, and previous work. Use when answering questions about history, finding past decisions, or researching previous implementations.

Claude-Mem Search Skill

Access claude-mem's persistent memory through a comprehensive HTTP API. Search for past work, understand context, and learn from previous decisions.

When to Use This Skill

Invoke this skill when users ask about:

  • Past work: "What did we do last session?"
  • Bug fixes: "Did we fix this before?" or "What bugs did we fix?"
  • Features: "How did we implement authentication?"
  • Decisions: "Why did we choose this approach?"
  • Code changes: "What files were modified in that refactor?"
  • File history: "What changes to auth/login.ts?"
  • Timeline context: "What was happening around that time?"
  • Recent activity: "What have we been working on?"

Do NOT invoke for current session work or future planning (use regular tools for that).

Quick Decision Guide

Once the skill is loaded, choose the appropriate operation:

What are you looking for?

Available Operations

Choose the appropriate operation file for detailed instructions:

  1. Search Observations - Find observations by keyword (bugs, features, decisions, etc.)
  2. Search Sessions - Search session summaries to understand what was accomplished
  3. Search Prompts - Find what users have asked about in the past
  1. Search by Type - Find bugfix, feature, refactor, decision, or discovery observations
  2. Search by Concept - Find observations tagged with specific concepts
  3. Search by File - Find all work related to a specific file path

Context Retrieval

  1. Get Recent Context - Get recent session summaries and observations for a project
  2. Get Timeline - Get chronological timeline around a specific point in time
  3. Timeline by Query - Search then get timeline around the best match

Utilities

  1. API Help - Get API documentation

Common Workflows

For step-by-step guides on typical user requests, see operations/common-workflows.md:

  • Understanding past work
  • Finding specific bug fixes
  • Understanding file history
  • Timeline investigation

Response Formatting

For guidelines on how to present search results to users, see operations/formatting.md:

  • Format=index responses (compact lists)
  • Format=full responses (complete details)
  • Timeline responses (chronologically grouped)

Technical Notes

  • Port: Default 37777 (configurable via CLAUDE_MEM_WORKER_PORT)
  • Response format: Always JSON
  • Search type: FTS5 full-text search + structured filters
  • All operations use HTTP GET with query parameters

Performance Tips

  1. Use format=index first for overviews, then format=full for details
  2. Start with limit=5-10, expand if needed
  3. Use project filtering when working on one codebase
  4. Use timeline depth of 5-10 for focused context
  5. Be specific in search queries: "authentication JWT" > "auth"

Error Handling

If HTTP request fails:

  1. Inform user the search service isn't available
  2. Suggest checking if worker is running: pm2 list
  3. Offer to help troubleshoot

For detailed error handling, see the specific operation files.