Install
$ agentstack add skill-loomantix-claude-platform-refactorpass ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Refactor pass — PR-first wrapper
Run one behavior-preserving cleanup pass on an open draft PR before adversarial review. This is the Claude engine's one cleanup pass on that PR, not a step that repeats each review round.
Context-window check
/simplify reads and edits the full changeset. If this session authored the change or carries dense implementation context, recommend a fresh Claude session. Continue only after an explicit override.
PR-first pre-flight
- Load [
../../references/local-review-ledger.md](../../references/local-review-ledger.md). - Require a clean, committed feature branch, not
main,master, or
staging.
- Reuse its open PR. If none exists, push normally and open a draft PR before
cleanup starts.
- Require local HEAD, remote head, and PR head to match. Read all prior review
threads.
- Resolve the exact base SHA once and use its literal
..HEADrange. - Skip docs/config-only changesets, per the ledger's changeset
classification.
- Check the once-per-engine latch. Search the PR's comments for
local-review-refactor:v1 engine=claude, authored by the actor running this review. If it is present, this PR has already had its Claude cleanup pass: report the skip with the head the earlier pass ran on and stop. Do not run /simplify. Continue only when the marker is absent or $ARGUMENTS contains force, and say which of the two applied.
The rule exists because the second pass over an already-simplified diff returns naming and shape churn, not cleanups. That churn moves the head and re-stales the other engine's attestation for no shipped benefit.
- Resolve the changed-file list once and follow the ledger's diff-delivery
rules. If this pass fans cleanup angles out to agents, scope each to the files it reviews rather than giving every angle the same whole-diff artifact.
Single /simplify pass
Record the exact HEAD and clean worktree status. Invoke Skill(skill="simplify", args="Analyze the PR diff and propose behavior-preserving cleanups. Do not commit.") once. Do not run a second pass.
/simplify applies the cleanups it finds — that is its contract, and asking it for a proposal-only run is not reliable. Handle whichever outcome you get:
- It left the tree clean and HEAD unmoved. It found nothing, or it only
reported. Nothing to commit.
- It edited the worktree. Normal. Review every edit before keeping it.
- It committed. Verify the commit is behavior-preserving and in scope; keep
it rather than rewriting history. Never resolve this by force-push or git stash.
Verify each cleanup against the source and drop any that:
- changes behavior, or reaches outside the changed code apart from a tiny
adjacent edit required to complete it safely;
- is a broad rewrite, unrelated style churn, or speculative abstraction.
Revert what you drop (git checkout -- for uncommitted edits, a follow-up edit for committed ones) before validating.
Cleanups are not adversarial findings, so the ledger's post-before-editing rule does not apply here: there is no defect to disposition and no thread to resolve, and /simplify has already edited by the time you could post one.
If anything survived: run the smallest relevant formatter or test, stage the remaining edits, create one refactor: /simplify pass — commit, and push normally. Then post one informational PR comment naming the cleanup lane, the exact reviewed head, the resulting commit SHA, and a one-line list of what was consolidated. Stop if any step fails.
If nothing survived, the branch is unchanged: post the same informational comment with no commit SHA and move on. Do not push.
Either way, that comment closes the latch for this engine and must carry the ledger's marker:
Post it only for a pass that actually ran /simplify. A docs/config-only skip leaves the latch open, so a later round whose changeset contains source can still spend the one pass.
Do not write a local-review-pass:v3 result or open local-review:v3 finding threads for cleanups: only the final adversarial critique lane may certify the enclosing Claude review hook, and the outer wrapper owns its attestation.
Output
Report:
- PR number and reviewed head;
- latch state:
first pass for this engine,skipped — already spent at,
or forced re-run;
- whether cleanup changed the branch and the commit SHA;
- cleanups kept and cleanups dropped on verification;
- validation run;
- next step:
/critiqueor return to/deepcritique.
Boundaries
- Do not force-push or merge.
- Do not invoke adversarial or hosted reviewers.
Source of truth
This skill lives upstream at .claude/skills/refactorpass/ and is synced to consumer repos.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: loomantix
- Source: loomantix/claude-platform
- License: Apache-2.0
- Homepage: https://github.com/loomantix/claude-platform
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.