gsd-context-fetch

Searches codebases with keywords before reading targeted file sections to reduce context usage.

1|Updated Sep 3, 2026
One-click install
npx skills add https://github.com/amanpal3/SKILLs --skill gsd-context-fetch-amanpal3
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gsd-context-fetch
Source: https://github.com/amanpal3/SKILLs/tree/main/.agent/plugins/gsd/skills/gsd-context-fetch
Command: npx skills add https://github.com/amanpal3/SKILLs --skill gsd-context-fetch-amanpal3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding agents often waste context window capacity by loading entire files when only a few lines are relevant. This Skill enforces a search-first discipline so agents locate code with minimal file reads. ## Core Features & Use Cases - Search-First Workflow: Defines a five-step process from question definition through keyword extraction, codebase search, result evaluation, and targeted reading. - Cross-Platform Search Commands: Provides ready-to-use ripgrep, grep, and PowerShell Select-String patterns for locating identifiers. - Efficiency Metrics & Anti-Patterns: Includes measurable criteria (files searched vs. fully read, lines read) and concrete good/bad examples to keep context lean. - Use Case: Before fixing a bug in an unfamiliar repository, search for the failing function name, read only the matching 20-line section, and report candidate files instead of loading entire modules. ## Quick Start Ask the agent to find where a specific function or endpoint is defined using search-first context fetching before reading any files.

Frequently Asked Questions about gsd-context-fetch

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

FAQPage Schema
How do I find code in a large repository without reading every file?▼

Search first with a specific identifier using ripgrep or grep, then read only the matching line ranges. This skill defines a five-step process: define the question, extract keywords, search, evaluate results, and read targeted sections.

How to search code with ripgrep vs grep?▼

ripgrep (rg) is recommended for speed and supports type filters like rg "login" --type ts. grep -r with --include patterns works as a fallback, and PowerShell users can use Select-String with -Recurse.

What keywords should I search for when investigating a bug?▼

Extract specific identifiers from your question, such as function names like processPayment or domain terms like cache and redis. Avoid broad terms like "function" that return thousands of irrelevant results.

When should I not use search-first code exploration?▼

Search-first is less useful when you need full semantic understanding of a small, self-contained file or when the codebase lacks searchable text, such as minified bundles. In those cases, direct full-file reading may be appropriate.

How do I measure whether my code exploration is context-efficient?▼

Track files searched versus files fully read. Good efficiency means searching 10 or more files, fully reading fewer than 3, and reading under 200 lines total with targeted sections only.