agentleFS
yaohuangguanyaohuangguan/agent-playbook/skills/implement-change/SKILL.md

implement-change

Skill1 starsChanged 2 days agoMITView on GitHub

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 "make it support X". It keeps the change small, complete and verified.

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Restate the task: Write one sentence on the goal and a short list of what must be true when it is done.

    line 19
  2. Very specific:

    Orient: If you have not read this area, follow orient-in-codebase.

    line 23
  3. Distinctive:

    Find every affected place: Search for the names you will change.

    line 25
  4. Very specific:

    Open the matching skill: Use secure-change for permissions, input or secrets, change-data-safely for stored data, and use-external-api for …

    line 34
  5. Distinctive:

    Make one small edit at a time: Run the nearest test after each step.

    line 41
  6. Distinctive:

    Review your own diff: Run git diff and read every line:

    line 47
  7. Very specific:

    Use the template in verify-and-report.

    line 95

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Implement 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

  1. 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.
  2. Orient. If you have not read this area, follow orient-in-codebase.
  3. 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.
  4. 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.
  5. Open the matching skill. Use secure-change for permissions, input or secrets, change-data-safely for stored data, and use-external-api for a third-party call.
  6. Write a test first where practical. Make it fail for the expected reason before you change the code. Follow write-tests.
  7. Make one small edit at a time. Run the nearest test after each step. If it breaks, you know which edit caused it.
  8. Handle the unhappy paths. For each new input or dependency, decide what happens when it is empty, invalid, slow, unauthorized or failing.
  9. Review your own diff. Run git diff and 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?
  10. 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 moveWhy it failsDo this instead
Rewrite the whole fileHides real changes and adds riskMake targeted edits
Fix nearby issues tooMakes review harder and adds riskMention them in your report
Add a config option "just in case"Adds code nobody needsBuild what was asked
Stop at the happy pathMost incidents are in failure pathsHandle each failure in step 8
Say it should workNothing was testedRun 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.