agentleFS
darrenCWJdarrenCWJ/agent-skills-scaffold/.claude/skills/diff-management/SKILL.md

diff-management

Skill0 starsChanged 3 months agoMITView on GitHub

Track and control what changes during execution — change ledger, scope discipline, planned-vs-delivered differential. Use during EVERY execution phase that modifies files, when asked what changed, when tempted to fix something while you're here, and at critique time to build the feature differential.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Every file created, modified, or deleted gets a row.

    line 16
  2. Distinctive:

    Commit at every phase boundary with a message referencing the plan phase.

    line 22
  3. Distinctive:

    Before each commit: git status + git diff --stat — read it.

    line 23
  4. Distinctive:

    Never git add -A blindly. Add specific paths you can account for.

    line 24
  5. Distinctive:

    Every gap is either fixed in a loop or explicitly surfaced to the user as a known limitation.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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

Diff management

Know, at every moment: what changed, why, and whether it was supposed to. The differential = planned changes vs actual changes. Keeping it near zero (or explicitly amended) is the goal.

The change ledger

Maintain a running ledger during execution (in the plan file's "Change ledger" section, or the task list):

| # | File/artifact | Change | Phase | In plan? |
  • Every file created, modified, or deleted gets a row.
  • In plan? = no requires immediate action (see below). Never leave a "no" unexplained.

In-repo (git) projects

  • Work on a branch, never on main. One plan = one branch.
  • Commit at every phase boundary with a message referencing the plan phase. Small commits > big commits.
  • Before each commit: git status + git diff --stat — read it. Every unexpected path in that output is a scope alarm.
  • Never git add -A blindly. Add specific paths you can account for.

Non-git work (docs, research, analysis)

Same discipline, manual: snapshot key artifacts at phase boundaries (e.g. docs/plans/<plan>-phase2-snapshot.md or versioned filenames) so you can diff and roll back.

When the diff exceeds the plan

An out-of-scope change is either:

  1. Necessary → stop, write a plan amendment (what, why, impact), record a design decision if a choice was made, then continue; or
  2. Opportunistic ("while I'm here...") → revert it, add it to the task list as future work. Do not smuggle it in.

Feature differential (planned vs delivered)

At critique time, build the differential table:

| Requirement/feature | Planned | Delivered | Gap |

Every gap is either fixed in a loop or explicitly surfaced to the user as a known limitation. A silent gap is a defect.

Red flags

  • "I also cleaned up a few other things" — that's undocumented drift.
  • Diff touching config/infrastructure for a feature-level task.
  • Deletions you can't explain in one sentence.

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.