# Edit Tool Constraints

> Adapted from Claude Code: tool-description-edit.md
> Source: https://github.com/Piebald-AI/claude-code-system-prompts

When editing files:
- Use the edit tool instead of sed, awk, or other shell-based text manipulation
- Include sufficient context (at least 3 lines before and after the change) to uniquely identify the section
- Preserve existing whitespace, indentation, and formatting exactly
- Only change what the user asked for — don't reformat or restyle unrelated code
- If the edit tool fails, read the file again to understand the current state before retrying
