Agent skill
search-memory
Search the hierarchical memory system for relevant memories. Searches across all tiers (working, episodic, semantic) and returns ranked results. Use for context retrieval and pattern matching. Keywords: memory, search, retrieve, recall, context, similarity.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/search-memory
Metadata
Additional technical details for this skill
- domain
- general
- category
- memory
- confidence
- 0.9
- mcp servers
-
[]
- requires approval
- NO
SKILL.md
Search Memory
Preconditions
Before applying this skill, verify:
- Memory system is initialized
- Search query is meaningful
- Result limit is specified
Actions
1. Build Search Query
Prepare the semantic search query:
query: $search_text
user_id: $user_id
limit: $result_limit (default: 10)
2. Search Each Tier
Working Memory (exact + recency):
working_results = memory.search_working(query, limit=limit//3)
Episodic Memory (semantic + time decay):
episodic_results = memory.search_episodic(
query=query,
user_id=user_id,
limit=limit//3
)
Semantic Memory (semantic + permanence):
semantic_results = memory.search_semantic(
query=query,
user_id=user_id,
limit=limit//3
)
3. Merge and Rank Results
Combine results from all tiers:
- Apply tier-specific weights
- Remove duplicates
- Sort by relevance score
- Return top N results
Success Criteria
The skill succeeds when:
- All accessible tiers searched
- Results ranked by relevance
- Metadata includes source tier
Failure Handling
If search fails:
- Return partial results from available tiers
- Log which tiers were unreachable
- Include error context in response
Examples
Input Context:
{
"query": "nginx pod memory issues",
"user_id": "k8s-monitor",
"limit": 10
}
Expected Output:
{
"results": [
{
"content": "Pod nginx-abc crashed due to OOM. Fixed by increasing limits.",
"tier": "episodic",
"score": 0.89,
"timestamp": "2024-01-15T10:30:00Z"
},
{
"content": "Nginx pods require 1Gi memory minimum for production workloads",
"tier": "semantic",
"score": 0.85,
"pattern_type": "resource_requirement"
}
],
"total_searched": 3,
"tiers_searched": ["working", "episodic", "semantic"]
}
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?