search-before-edit

Enforce mandatory pre-edit searches across create, modify, and delete operations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/adilkalam/orca-os --skill search-before-edit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: search-before-edit
Source: https://github.com/adilkalam/orca-os/tree/main/skills/search-before-edit
Command: npx skills add https://github.com/adilkalam/orca-os --skill search-before-edit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Modifying code without understanding its full context often leads to introducing new bugs, breaking existing functionality, or creating inconsistent patterns. This Skill enforces a mandatory "search before edit" protocol, ensuring all code changes are well-informed, safe, and align with the existing codebase, saving significant debugging time.

Core Features & Use Cases

  • Mandatory Pre-Edit Search Protocol: Requires comprehensive searching for existing patterns, usages, and related code before any modification, creation, or deletion of code.
  • Multi-Strategy Search Guidance: Advises on using multiple query wordings, semantic-first approaches, and file type filters for thorough investigation, preventing missed dependencies.
  • Minimum Search Requirements: Defines specific search thresholds for different operations (new file, modify, delete, rename) to ensure due diligence and prevent oversight.
  • Use Case: You need to rename a core function. Instead of just changing the name and hoping for the best, use this Skill to automatically perform a series of grep searches across the entire codebase, identifying all call sites, imports, and tests that need updating, preventing runtime errors and ensuring a smooth refactor.

Quick Start

I need to rename the 'getUserById' function. What should I search for before I make the change?

Frequently Asked Questions about search-before-edit

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

FAQPage Schema
How do I prevent bugs when refactoring code across multiple files?▼

Search for all existing usages, imports, and related tests before making changes. A mandatory pre-edit search protocol identifies dependencies and call sites across the codebase, preventing broken references and inconsistent patterns that cause runtime errors.

What should I search for before renaming a function?▼

Search for the function name, its imports in other files, and all test references. This multi-strategy search approach using varied query wordings and file type filters uncovers all locations where the function is called or tested, ensuring a complete and safe refactor.

How many searches should I do before modifying or deleting code?▼

Perform at least 3 searches when modifying code and 5 searches when deleting to meet minimum search thresholds. These requirements ensure due diligence by validating cross-file references, related patterns, and test impact before committing changes.

Why do bugs appear after making code changes?▼

Changes made without understanding full context break existing functionality and create inconsistent patterns. Enforcing pre-edit searches identifies all affected code locations, tests, and established patterns before modification, eliminating context-blindness as a bug source.

Can I use this approach when creating new files?▼

Yes, search for existing patterns and related code before creating new files. Perform at least 2 searches to align new code with established conventions, preventing duplicate logic and ensuring consistency with the existing codebase architecture.