- Home
- Skills
- Agents & Orchestration
- retrieval harness
Works with the AI Agents you already use
retrieval harness
Merge exact search, semantic search, and call-graphs into a token-budgeted context for large-scale code refactoring.
Free
retrieval harness
Example session with this skill installed
I need to rename the process_transaction function. Find all its callers, the implementation, and any related test files.
- Read your context and instructions
- Compiled the retrieval harness
I have executed the retrieval harness to map the dependencies for process_transaction. The search combined exact string matching, semantic analysis of the transaction logic, and a call-graph traversal to identify where this function is invoked and tested.
Retrieval Results
| File Path | Lines | Context Type | Relevance Score |
|---|---|---|---|
src/core/gateway.py | 142-168 | Implementation | 1.00 |
src/api/endpoints.py | 45-52 | Direct Caller | 0.92 |
src/workers/queue_processor.py | 89-104 | Direct Caller | 0.88 |
tests/unit/test_gateway.py | 12-40 | Related Tests | 0.85 |
src/models/transaction.py | 10-25 | Semantic Match | 0.72 |
Context Excerpts
# src/core/gateway.py:142-168
def process_transaction(self, tx_id: str, amount: Decimal) -> bool:
"""Core logic for validating and committing transactions."""
# ... logic ...
# src/api/endpoints.py:45-52
@app.post("/tx")
def handle_request(data: TxSchema):
return gateway.process_transaction(data.id, data.amount)
Next steps
- Review the
trace.htmlin.rh/trace/latest/to see if the semantic engine dropped any low-confidence matches. - Run
rh doctorto ensure the graph index isn't stale before starting the rename. - Update the function signature in
src/core/gateway.pyand propagate changes to the identified callers inendpoints.pyandqueue_processor.py.
Connects securely to your tools. The creator never sees your data.
About this skill
Large codebases make it difficult to find where logic actually lives. Relying on simple keyword search often misses semantic matches or fails to capture the necessary call graph context for a safe refactor.
What it does
- Multi-engine retrieval combines ripgrep for exact matches with ColGREP for semantic search.
- Call-graph expansion identifies callers, callees, and related test files for a specific symbol.
- Token-budgeted output returns relevant excerpts formatted as
path:start-endto stay within LLM context limits. - Context judging uses a local Ollama model to filter out irrelevant search results before presenting them.
- Trace reporting generates a local HTML trace showing why specific code blocks were kept or dropped.
How it works
- Initialize the repository by running
rh initto build semantic and graph indexes. - Verify tool health and index freshness using the
rh doctorcommand. - Execute the retrieval by providing a natural language task description via
rh retrieve --task. - Review the token-budgeted Markdown context or inspect the trace log in
.rh/trace/.
Frameworks & tools
Requires Python 3.11+, uv, and ripgrep. Uses ColGREP for vector search and codebase-memory-mcp for graph analysis. Optional local filtering requires Ollama.
Why this beats prompting it yourself
Manual searching often misses the "hidden" dependencies or non-obvious callers that lead to breaking changes. This skill automates the discovery of the entire execution path, providing a complete map of the code's impact rather than just a list of text matches.
Use cases
- Map dependencies and callers before renaming a core library function.
- Locate the implementation and relevant tests for a specific feature in an unfamiliar repo.
- Gather context for multi-file architectural changes without blowing the token budget.
Known limitations
Requires local installation of Python, uv, ripgrep, and ColGREP. Indexes must be manually updated if they become stale. Local judging requires a running Ollama instance.
Requires Python 3.11+, uv, ripgrep, and ColGREP binary. Indexes must be manually refreshed via rh init when code changes. Local judging requires Ollama.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Requires