surgical-file-reader

Inspects repositories through minimal search and targeted file reads to reduce token usage.

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/Martino17x/Sentinel-Invest --skill surgical-file-reader-martino17x
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: surgical-file-reader
Source: https://github.com/Martino17x/Sentinel-Invest/tree/main/.agents/skills/surgical-file-reader
Command: npx skills add https://github.com/Martino17x/Sentinel-Invest --skill surgical-file-reader-martino17x

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reading entire files or directories to answer a small question wastes context tokens and slows down code exploration. This Skill enforces a disciplined, minimal-cost inspection sequence so you only read what is strictly necessary. ## Core Features & Use Cases - Tool Hierarchy: Enforces a strict order of operations: list files first, then search, then list code definitions, and only read files as a last resort. - Surgical Reading Process: Guides a five-step workflow from delimiting the question to consolidating confirmed findings with file and symbol references. - Guardrails & Heuristics: Prevents curiosity-driven reads, repeated reads, and reading tests or generated files unless explicitly needed. - Use Case: When debugging a large repository, use this Skill to locate the exact function handling an error message, confirm its signature, and stop—without opening neighboring files. ## Quick Start Find where the login validation function is defined in this repository and confirm its parameters without reading entire files.

Frequently Asked Questions about surgical-file-reader

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

FAQPage Schema
How do I explore a large codebase without wasting tokens?▼

Start by listing files in the most specific folder, then search for exact symbols or text patterns, list code definitions in candidate areas, and only read the single most promising file. Stop reading as soon as the question is answered.

What is the correct order of tools for code exploration?▼

Use list_files first to map structure, then search_files to locate symbols or text, then list_code_definition_names to identify the right file, and read_file only as a last resort for the confirmed target.

When should I avoid reading entire files?▼

Avoid full reads when you only need to confirm existence, location, or a signature. If a search result or definition listing already answers the question, do not open the file at all.

Should I read test files or generated code during exploration?▼

No, skip tests, mocks, and generated files unless the question specifically concerns them. They add context cost without helping locate production logic in most investigations.

What should I do if a search returns too many results?▼

Refine the search pattern before opening any files. Try synonyms, name variants, visible strings, config keys, or error messages to narrow candidates until one file clearly stands out.