Search First
Use this skill when a task involves changing code, tracing behavior, or understanding an
unfamiliar area.
Core rule
Do not modify code until you have first searched for the relevant files, symbols, call sites,
nearby patterns, and affected references.
Workflow
- Search for the exact file, symbol, route, command, or error text.
- Read the most relevant definitions and references.
- Identify adjacent code paths that could be affected.
- Identify tests, docs, configs, or UI flows coupled to the target.
- Before proposing or editing, report a concise investigation summary: the primary
implementation, important callers, coupled artifacts, the project pattern to follow, and the
smallest safe change.
- Only then propose or implement changes.
Priorities
- Prefer exact evidence over assumptions.
- Prefer existing project patterns over inventing new ones.
- Prefer narrow, targeted changes after understanding the local context.
- For a task that proposes changing how code uses an external API or SDK, prefer versioned
documentation already present in the repository or local environment. If it is unavailable and
host policy permits network access, consult the dependency vendor's official documentation using
only the minimum necessary public product, API, and version details. Never send source code,
credentials, personal data, private endpoints, internal hostnames, or private package names.
- For read-only tracing, explanation, or investigation tasks, do not initiate an online
documentation lookup; report any version-sensitive uncertainty instead.
- If official documentation cannot be accessed, report that limitation and treat version-sensitive
behavior as unverified. Avoid guessing; ask the user for documentation or approval of the
explicitly stated risk before making that part of the change.
- When the task spans multiple files or uncertainty remains high, narrow the scope or split the
work instead of guessing.
Minimum investigation before editing
Before editing, try to answer:
- Where is the primary implementation?
- What calls it or imports it?
- Are there tests, docs, configs, or browser flows coupled to it?
- Is there an existing pattern nearby to follow?
- What is the smallest safe change that solves the request?
Good outcomes
- Fewer blind edits.
- Lower regression risk.
- Faster convergence on the right file and change shape.
Notes
- This skill is a workflow aid only.
- It must not modify hooks, settings, plugins, or global configuration on its own.
1---2name: search-first3description: Enforce a search-before-edit workflow for code changes. Use this Skill whenever a task involves changing code, tracing behavior, or understanding an unfamiliar area, so the agent searches and reads the relevant files before proposing or implementing edits.4---56# Search First78Use this skill when a task involves changing code, tracing behavior, or understanding an9unfamiliar area.1011## Core rule1213Do not modify code until you have first searched for the relevant files, symbols, call sites,14nearby patterns, and affected references.1516## Workflow17181. Search for the exact file, symbol, route, command, or error text.192. Read the most relevant definitions and references.203. Identify adjacent code paths that could be affected.214. Identify tests, docs, configs, or UI flows coupled to the target.225. Before proposing or editing, report a concise investigation summary: the primary23 implementation, important callers, coupled artifacts, the project pattern to follow, and the24 smallest safe change.256. Only then propose or implement changes.2627## Priorities2829- Prefer exact evidence over assumptions.30- Prefer existing project patterns over inventing new ones.31- Prefer narrow, targeted changes after understanding the local context.32- For a task that proposes changing how code uses an external API or SDK, prefer versioned33 documentation already present in the repository or local environment. If it is unavailable and34 host policy permits network access, consult the dependency vendor's official documentation using35 only the minimum necessary public product, API, and version details. Never send source code,36 credentials, personal data, private endpoints, internal hostnames, or private package names.37- For read-only tracing, explanation, or investigation tasks, do not initiate an online38 documentation lookup; report any version-sensitive uncertainty instead.39- If official documentation cannot be accessed, report that limitation and treat version-sensitive40 behavior as unverified. Avoid guessing; ask the user for documentation or approval of the41 explicitly stated risk before making that part of the change.42- When the task spans multiple files or uncertainty remains high, narrow the scope or split the43 work instead of guessing.4445## Minimum investigation before editing4647Before editing, try to answer:4849- Where is the primary implementation?50- What calls it or imports it?51- Are there tests, docs, configs, or browser flows coupled to it?52- Is there an existing pattern nearby to follow?53- What is the smallest safe change that solves the request?5455## Good outcomes5657- Fewer blind edits.58- Lower regression risk.59- Faster convergence on the right file and change shape.6061## Notes6263- This skill is a workflow aid only.64- It must not modify hooks, settings, plugins, or global configuration on its own.