implement-change
Plan, make and check a code change from start to finish. Use this for any feature, bug fix, enhancement or behaviour change, including requests that sound small such as "add a field", "fix this" or "m
SKILL.md.claude/skills/implement-change/SKILL.md
GitHubImplement a change
A good change is complete and small. It updates every place that needs it and touches nothing else. The common failures are missing a related place, doing extra work, and stopping before anything was checked.
When to use
Any task that changes behaviour. For structure-only work use refactor-safely.
For a failure with an unknown cause, start with debug-failure.
Steps
Restate the task. Write one sentence on the goal and a short list of what must be true when it is done. If two readings would produce different code, ask before you start.
Orient. If you have not read this area, follow
orient-in-codebase.Find every affected place. Search for the names you will change. Check callers, tests, docs, translations, schemas, config, and lists that repeat a value such as routes, plans or permissions. A missed copy is the most common cause of a half-finished change.
Choose the smallest design. Reuse existing helpers and patterns. Do not add options, abstractions or dependencies the task did not ask for. Write the plan as a short list of files and what changes in each.
Open the matching skill. Use
secure-changefor permissions, input or secrets,change-data-safelyfor stored data, anduse-external-apifor a third-party call.Write a test first where practical. Make it fail for the expected reason before you change the code. Follow
write-tests.Make one small edit at a time. Run the nearest test after each step. If it breaks, you know which edit caused it.
Handle the unhappy paths. For each new input or dependency, decide what happens when it is empty, invalid, slow, unauthorized or failing.
Review your own diff. Run
git diffand read every line:- Is each line needed for this task?
- Did you leave debug output, commented code or unused imports?
- Did you change formatting in unrelated lines?
- Are existing users and existing data still fine?
Finish. Follow
verify-and-report.
Stop and ask when
- The requirement is ambiguous and the choice affects behaviour.
- The change needs a new dependency, a public API change or a data migration that the task did not mention.
- You have failed three times with the same approach.
Common mistakes
| Tempting move | Why it fails | Do this instead |
|---|---|---|
| Rewrite the whole file | Hides real changes and adds risk | Make targeted edits |
| Fix nearby issues too | Makes review harder and adds risk | Mention them in your report |
| Add a config option "just in case" | Adds code nobody needs | Build what was asked |
| Stop at the happy path | Most incidents are in failure paths | Handle each failure in step 8 |
| Say it should work | Nothing was tested | Run it and report the result |
Example
Task: "Add a nickname field to user profiles."
Weak plan: "Add nickname to the User model."
Strong plan:
Done when: users can save, see and clear a nickname of at most 40 characters.
Files:
- migrations/: add a nullable column
- models/user: add the field
- api/profile: accept, validate and return it; reject over 40 characters
- ui/profile: add the input and error message
- locales/: add the label in each language
- tests: both sides of the limit, blank value, another user's profile
Unchanged: existing users keep a null nickname.
Report
Use the template in verify-and-report.