file-edit-batching
Installation
SKILL.md
File Edit Batching
Overview
Strategies for batching file edits to reduce edit count and improve efficiency. Identify related changes, batch independent edits, and plan edits before execution.
Safe / incremental edits
Prefer small, targeted search-and-replace edits with unique context and minimal span (at least 3–5 lines of unique context before and after). Avoid replacing entire files or large sections unless you are intentionally doing a full rewrite. If an edit could match multiple locations, narrow the context so the match is unique. After two failed or ambiguous edits, consider a smaller span or a different anchor. This reduces "file corruption" or accidentally replacing the whole file.
Identify All Related Changes Before Editing
Pattern 1: Read All Related Files First
Read all files that need changes before editing: