refactor-verifier
Skill0 starsChanged 3 months agoMITView on GitHub
Verify that a rename, extraction, or signature change updated every call site and import across the codebase, with no stale references left behind. Use when renaming a function, changing a type signature, moving a file, or extracting a helper — before you declare the refactor complete.
In this repository11 other files it gives its agents.
- agent-verificationSkill
- claim-evidenceSkill
- crypto-news-digestSkill
- defi-risk-assessmentSkill
- evidence-firstSkill
- flaky-test-detectorSkill
- on-chain-analystSkill
- prompt-injection-hardeningSkill
- skill-security-auditSkill
- smart-contract-reviewSkill
- test-integrity-guardSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Distinctive: line 21
Find every reference BEFORE you rename: Use your editor's semantic tools if available (find-references, find-symbol, go-to-definition), and …
- Distinctive: line 34
Change the definition AND all references in one pass: If you use a tool that only touches one file, do it file by file but verify the whole …
- Distinctive: line 45
Verify behavior with the test suite: Run the relevant tests. A green suite after a rename is necessary but not sufficient — it will not …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Refactor Verifier
A refactor that misses one call site is a regression, not an improvement. The
classic failure: you rename getUser to fetchUser and update the file you
are looking at, but three other files still call the old name — and the
language doesn't error because the old export was left in "for safety", or
because they're in another package, or because the reference is dynamic. This
skill makes "no call site left behind" a checkable claim, not an assumption.
Procedure
- Find every reference BEFORE you rename. Use your editor's semantic
tools if available (find-references, find-symbol, go-to-definition), and a
plain text search (grep, or your client's search tool) as the backstop —
semantic tools miss string references, dynamic
require/import()calls, and config/template mentions; text search misses indirect usages that a language server resolves (re-exports, interface implementations). Use both. - Enumerate the full surface. For a rename/removal, the old name can
appear as:
- an import (
import { oldName },require('./old')) - a call (
oldName(...)) - a string (
'oldName', a route path, a tool name, a config key) - a re-export (
export { oldName }) - a dynamic reference (
obj['oldName'], a lookup table, a registry entry)
- an import (
- Change the definition AND all references in one pass. If you use a tool that only touches one file, do it file by file but verify the whole set at the end.
- Re-scan for the old name after the change. The old name should now appear nowhere except in legitimate historical contexts (changelogs, migration notes, a compatibility shim you are deliberately keeping).
- If you keep a shim or alias "for compatibility", verify it is actually used. A no-op shim with zero callers and zero dynamic references is dead code wearing a justification. Grep for it; if nothing uses it, delete it — and flip any test that asserted the shim's existence into one that asserts its removal.
- Verify behavior with the test suite. Run the relevant tests. A green suite after a rename is necessary but not sufficient — it will not catch a stale reference in an untested path, which is why steps 1 and 4 matter.
What "complete" means
You are not done until BOTH hold:
- A text search for the old name returns only legitimate historical/alias hits (which you can name and justify).
- The test suite (or the relevant subset) passes.
Output format
Refactor: <old> -> <new>
References found: <N> (<list of files>)
References updated: <N>
Old-name residue: <none | list with justification>
Tests: <pass/fail, with the command run>
Verdict: complete | <what is still left>Why this is worth a skill
The failure is silent. Nothing errors when you leave a stale reference in a string or a config key — it only misbehaves at runtime, sometimes far from where the mistake is. The discipline of enumerating the surface first, and re-scanning last, is what catches it before a user does.
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.

