code-retrieval

Guide semantic-to-symbol search and extract code snippets for editing.

3|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/joshka0/foxctl --skill code-retrieval
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-retrieval
Source: https://github.com/joshka0/foxctl/tree/main/docs/knowledge/code-retrieval
Command: npx skills add https://github.com/joshka0/foxctl --skill code-retrieval

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill solves the problem of locating the correct code paths and extracting actionable context so edits can be made with precision instead of guesswork.

Core Features & Use Cases

  • Semantic-to-symbol code discovery: start with intent-driven symbol search to identify likely functions and types.
  • Snippet extraction for targeted context: use question-guided snippet retrieval from candidate files to obtain the smallest useful view before editing.
  • Edit-tool alignment with risk-aware guardrails: choose between simple replacements and structured multi-hunk diffs based on change complexity, with explicit “when not to use” guidance.
  • Resource-driven workflow: a single reference hub for symbol_search, swe_grep, edit tools, and retrieval guardrails to keep agent behavior consistent.

Quick Start

Use the code-retrieval skill to plan a retrieval funnel for a change request, then run symbol_search to get candidates and swe_grep to extract the exact snippets you will edit.

Frequently Asked Questions about code-retrieval

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

FAQPage Schema
How does semantic search for code retrieval work?

Semantic code search bridges intent and implementation by mapping natural language queries to exact symbols. This skill executes a semantic-to-symbol funnel, using intent to find likely functions, then narrows down to high-signal snippets from candidate files for precise context extraction.

How do I extract targeted context from multiple files before editing?

You extract targeted context by consuming candidate files and using question-guided snippet retrieval to obtain the smallest useful view of the code. This ensures you have exactly the necessary multi-file modification context before applying any changes.

What is the best way to choose between structured diffs and simple replacements for code edits?

The best way to choose is by aligning edit tools with change complexity. This skill provides risk-aware guardrails to select between simple replacements for minor tweaks and structured multi-hunk diffs for complex modifications.

Do I need a workspace-scoped symbol index to use semantic code search?

A workspace-scoped symbol index is required when available to effectively execute semantic code search and identify candidate functions. The retrieval workflow relies on this index to map intent to specific code symbols.

When should I not use structured multi-hunk diffs for code modification?

You should not use structured multi-hunk diffs for simple, isolated text changes where a basic replacement suffices. The skill includes explicit guardrails to prevent misuse and direct users to simpler edit tools when complexity is low.