Execute one behavior-preserving structural transformation and report evidence. Triggers: "refactor this", "simplify without changing behavior".
npx skills add https://github.com/boshu2/agentops --skill refactor
Refactor changes structure while preserving observable behavior. It performs one
caller-selected transformation and reports the result.
encapsulate, move, or delete dead code.
by the changed surface.
Do not combine a newly discovered behavior fix with the structural change. A red
result is evidence for the caller; this skill does not revert, narrow, retry,
commit, validate, or route subsequent work automatically.
When the transformation needs a seam — an extraction boundary, interface, or
module split — and more than one candidate seam exists, probe before you cut.
Run the probe in disposable isolation (a scratch branch, worktree, or copied
tree the caller's policy allows): rough in the seam, see what it forces —
signature churn, import cycles, test rewrites — then discard the probe and
keep only the knowledge. Stop condition: at most two probes; if the second
candidate seam also fights back, report both findings to the caller instead of
trying a third. Cutting the first imaginable seam directly into the working
tree is the premature seam failure mode: the wrong boundary calcifies
because reverting it now costs more than living with it.
"Behavior-preserving" is a claim to execute, not assert. Gate the
transformation on behavior-identical proof:
and after, with the same set of pre-existing failures — no new red, and no
quietly vanished red either (a test that stops running is a behavior change).
hash the outputs: capture golden-output hashes over identical inputs before
the change and compare byte-for-byte after. A hash mismatch is a behavior
diff to surface and explain, never to shrug at; the caller decides whether to
keep, narrow, or reverse the change.
surface are part of behavior unless the caller excluded them.
A neutrality gate that was skipped or narrowed after the fact is the
post-hoc neutrality failure mode — the diff decides what got tested. Name
any surface the gates did not cover in the report's behavior-not-checked list.
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
Comprehensive GitHub code review with AI-powered swarm coordination
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.
Take boshu2/refactor from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.