mutation-test-safety
Skill3 starsChanged 3 months agoMITView on GitHub
The capture-state/smallest-change/verify/revert/verify-revert contract for live-testing a mutation tool against a real account. Use any time you're about to call a mutation tool live, not just during a full audit.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- changelog-styleSkill
- docs-consistency-checkSkill
- live-auditSkill
- prompt-checkSkill
- releaseSkill
- self-learningSkill
- tool-description-checkSkill
The file
Files
Mutation testing safety contract
Applies to any mutation tool (add/update/remove/delete/post/follow/favourite/ etc.) once the user has given explicit go-ahead to test it against a real account. For every mutation call:
- Capture the exact pre-state first (via the matching read tool) — not
just an assumption of what it probably is. A target with no existing
state has a clear pre-state too: "absent." This applies to every call
to a mutation tool, including one you intend only as a validation-only
probe — if the schema isn't
.strict(), a bogus/typo'd field is silently dropped rather than rejected, and any other real field in the same call still applies for real. - Make the smallest possible change that still exercises the behavior (e.g. one field, not a full rewrite). Never combine an unknown/invalid probe field with a real valid field in one call — if the probe field is ignored instead of rejected, the valid field mutates the account for real. Test unknown-param rejection with no other fields set (or on a read-only tool) instead.
- Verify the change landed by re-fetching via a read tool — a mutation's own echoed response is not always trustworthy (some tools have historically omitted fields they actually changed).
- Revert to the captured pre-state immediately, in the same turn, and verify the revert too. Don't batch several mutations and revert at the end — revert each one before moving to the next unrelated test.
- Never leave the target in a different state than you found it, even if a step errors partway through — check and clean up regardless.
- Never touch an uninvolved third party. Self-targeted mutations (a self-message, a self-created and immediately-deleted test post/ thread/comment) are fine; acting on a random other real user/account is not.
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
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.

