Make multiple sequential edits to the same file to refine content or fix issues iteratively.
Overview
This skill describes a common pattern of making two or more consecutive edits to the same file. This approach is useful when you need to refine code, fix issues, or make related changes that benefit from being applied in sequence rather than all at once.
When to Use
Incremental refinement: Make an initial change, then improve it based on the result
Multi-step fixes: Address related issues in separate, logical passes
Testing and validation: Apply a change, then modify it if needed
Code review cycles: Apply feedback in distinct, reviewable steps
Steps
Make the first edit to the file with your initial change
Review the result to see how it looks and identify any needed adjustments
Make the second edit to refine, fix, or extend the previous change
Repeat as needed if additional refinements are necessary
Tips
Keep each edit focused on a specific aspect of the change
Use descriptive messages for each edit so the context is clear
Consider the file size and complexity—multiple small edits can be easier to understand than one large edit
This pattern works well when changes build on each other logically
You can also use this to test changes incrementally before finalizing them
Common Scenarios
Editing a function, then adjusting its parameters or logic
Fixing a bug, then improving the fix based on testing
Adding a feature in stages with validation between each stage
Refactoring code in multiple passes
1---2name: iterative-file-editing3description: iterative-file-editing4---5# iterative-file-editing67Make multiple sequential edits to the same file to refine content or fix issues iteratively.89## Overview10This skill describes a common pattern of making two or more consecutive edits to the same file. This approach is useful when you need to refine code, fix issues, or make related changes that benefit from being applied in sequence rather than all at once.1112## When to Use13- **Incremental refinement**: Make an initial change, then improve it based on the result14- **Multi-step fixes**: Address related issues in separate, logical passes15- **Testing and validation**: Apply a change, then modify it if needed16- **Code review cycles**: Apply feedback in distinct, reviewable steps1718## Steps191. **Make the first edit** to the file with your initial change202. **Review the result** to see how it looks and identify any needed adjustments213. **Make the second edit** to refine, fix, or extend the previous change224. **Repeat as needed** if additional refinements are necessary2324## Tips25- Keep each edit focused on a specific aspect of the change26- Use descriptive messages for each edit so the context is clear27- Consider the file size and complexity—multiple small edits can be easier to understand than one large edit28- This pattern works well when changes build on each other logically29- You can also use this to test changes incrementally before finalizing them3031## Common Scenarios32- Editing a function, then adjusting its parameters or logic33- Fixing a bug, then improving the fix based on testing34- Adding a feature in stages with validation between each stage35- Refactoring code in multiple passes
Run npx skillmds@latest add claudiawong522/iterative-file-editing in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
iterative-file-editing It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
claudiawong522 (@claudiawong522) published this skill. Their other Agent Skills are listed on their SkillMD profile.