context-retrieval

Retrieve relevant episodic context from memory using semantic or SQL-based search.

11|Updated Nov 5, 2025
One-click install
npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill context-retrieval
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-retrieval
Source: https://github.com/d-o-hub/rust-self-learning-memory/tree/main/.claude/skills/context-retrieval
Command: npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill context-retrieval

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Retrieve relevant episodic context from memory for informed decision-making. This Skill helps you access past episodes, patterns, and solutions to similar tasks, saving time and avoiding reinventing the wheel.

Core Features & Use Cases

  • Semantic Search (Preferred): When an embedding service is configured, retrieve context via vector similarity to find semantically similar tasks.
  • Keyword/Index Search (Fallback): If embeddings are unavailable, fall back to SQL-like indexing for fast, deterministic results.
  • Use Case: Quickly gather prior implementations and patterns for a current task to accelerate delivery and reduce risk.

Quick Start

Use the context-retrieval skill to fetch the most relevant past episodes for the task "implement async batch updates" and provide a concise context briefing to inform the current work.

Frequently Asked Questions about context-retrieval

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I retrieve relevant past episodes from memory to inform current decisions?

Context retrieval fetches semantically similar tasks and solutions from memory using embeddings or keyword search, ranking results by relevance to accelerate decision-making and reduce duplicate work.

When should I use semantic search versus keyword-based retrieval for context?

Use semantic search with embeddings when available to find conceptually similar tasks; fall back to SQL-based keyword indexing when embeddings are unavailable for deterministic, fast results.

What types of patterns and episodes can context retrieval extract from memory?

Context retrieval surfaces past episodes, implementation patterns, solutions to similar tasks, reusable tool sequences, and heuristics formatted with relevance scores to support decision-making across debugging, batch processing, and tool composition.

Can I use context retrieval without an embedding service?

Yes, context retrieval automatically falls back to SQL-like index-based search when embeddings are unavailable, filtering and ranking results by relevance or recency to return structured context.

How does context retrieval format and rank the results it returns?

Results are formatted into a standardized RetrievedContext structure containing episodes, patterns, heuristics, and relevance scores, ranked by semantic similarity or recency depending on the search method.

What output structure should I expect from context retrieval?

Context retrieval outputs a RetrievedContext object with ranked episodes, extracted patterns, applicable heuristics, and relevance scores ready for downstream decision logic or task implementation.