edit
Installation
SKILL.md
Edit Tool
Replace exact text in a file. This is the default tool for changing any existing file — prefer it over Write for anything except creating a new file from scratch.
REQUIRED: path (absolute), edits (array of {oldText, newText}) OPTIONAL: none
RULES:
- Each
oldTextmust match EXACTLY (whitespace, indentation, line endings all matter) - Each
oldTextmust be unique in the file — include 2-3 lines of surrounding context if needed editsis matched against the original file, not after earlier edits apply — do not overlap or nest- To delete text: set
newTextto "" - Read the file first if you do not already have its current content
- Batch multiple disjoint changes in one call by passing multiple
edits[]entries
EXAMPLE (single change):