refactor
Find structural refactors that remove caller obligations, then implement the chosen change.
Skill by lithammer
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/lithammer-refactor
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/refactor
What's inside
- Skill name
refactor- Description
- Find structural refactors that remove caller obligations, then implement the chosen change.
- License
- MIT
- Instructions
- 80 lines in SKILL.md · view on GitHub
Files (3)
- HTML-REPORT.md
- SKILL.md
- openai.yaml · agents/
SKILL.md (first lines)
# Refactor Explore existing code for structural changes that remove obligations from callers. No feature or diff is needed. ## 1. Scope Read the repository's instructions and the requested scope or concern: a path, subsystem, goal such as making invalid checkout states unrepresentable, or a ticket and its map from `research-codebase`. With a ticket, inspect the code its change touches; a candidate's cost is what that change would otherwise have to work around. With no target, map the repository's major subsystems and choose promising areas to inspect. ## 2. Discover Use a single agent by default. Apply these related questions in one pass; they overlap and are not separate work queues. Split a large scope only along genuinely independent subsystems. - **Representation:** which units, identities, states, or operations rely on primitives, flags, naming, or caller discipline? - **Derivability:** which stored or passed values could be derived from authoritative state instead of kept in sync? - **Invariant ownership:** which rules do callers repeatedly enforce that one owning module or storage constraint could guarantee? - **Lifecycle ownership:** which acquire/release or transaction protocols could a scoped operation own instead of each caller? - **Least capability:** which callers receive authority they do not need? - **Altitude:** which special cases compensate for limitations in the underlying mechanism? Where should the rule live? - **Deep modules:** which repeated orchestration could sit behind an interface that hides knowledge callers currently need? ## 3. Substantiate Read each promising implementation and its callers in full, with the tests and contracts needed to judge the change. Trace the burden or possible misuse to concrete code. A candidate needs a present cost or credible failure mode; an observed bug is not required. Describe the replacement and check which guarantees it actually enforces, and which still need validation or tests. Distinguish tighter internal representations from changes to accepted external behavior. Preserve required boundary validation. Merge candidates that address the same underlying mechanism. ## 4. Present and wait Rank candidates by concrete benefit and migration risk. With a ticket, rank first a candidate that removes the ticket's need at its cause, making the ticket's change unnecessary. For each, give: - Locations and evidence of the current burden or possible misuse. - The proposed representation or owning module, and what callers stop doing. - Expected size (small/medium/large), justified by the affected modules, callers, and migration work. State any uncertainty. - Guarantees gained, affected contracts, migration risks, and verification needed. State what you explored and what remains unread. Return no candidates when none meet the evidence bar. Render the candidates as an HTML report following [HTML-REPORT.md](HTML-REPORT.md), and reply with its path and the ranked candidate titles, one line each. Wait for the user to select a candidate and approve any changes to accepted behavior before editing. ## 5. Implement Use the `develop` skill for the chosen change. Pass the selected candidate's evidence, scope, accepted contracts, and risks as its requirements. With a ticket, finish the refactor before the ticket's change, so each lands as its own diff. When the refactor removes the ticket's need, verify the need is met and drop the ticket's change.
From lithammer/ai, MIT.
More from lithammer/ai
- 0.565score
code-review
lithammer
Review changed code for correctness bugs and instruction-file violations, verify each candidate, and report the survivors without editing.
SkillAFreshness: AClaude Code +9 - 0.565score
develop
lithammer
Implement a feature or fix from agreed requirements, then verify it and resolve an independent spec review.
SkillAFreshness: AClaude Code +9 - 0.565score
create-pr
lithammer
Create a draft or ready-for-review PR for the current branch.
SkillAFreshness: AClaude Code +9 - 0.561score
simplify
lithammer
Clean up changed code without changing behavior — review it for reuse, simplification, efficiency, and altitude, then apply the fixes.
SkillAFreshness: AClaude Code +9 - 0.558score
review-docs
lithammer
Reviews doc, docstring, and comment diffs for AI-like prose and for comments that no longer have a job.
SkillAFreshness: AClaude Code +9 - 0.558score
research-codebase
lithammer
Map how the code a ticket touches works today, then name the next step: develop, refactor, or grill-with-docs.
SkillAFreshness: AClaude Code +9 - 0.558score
nemesis
lithammer
Challenge a plan, design, or implementation one branch at a time.
SkillAFreshness: AClaude Code +9 - 0.539score
implement-review
lithammer
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding…
SkillAFreshness: AClaude Code +9 - 0.539score
tdd
lithammer
Test-driven development.
SkillAFreshness: AClaude Code +9 - 0.533score
ask-matt
lithammer
Ask which skill or flow fits your situation.
SkillAFreshness: AClaude Code +9 - 0.530score
implement-spec
lithammer
Implement the result of /to-spec and /to-tickets in code.
SkillAFreshness: AClaude Code +9 - 0.528score
implement
lithammer
Implement a piece of work based on a spec or set of tickets.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 15, 2026 (14 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/lithammer/ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from lithammer
- 0.565score
code-review
lithammer
Review changed code for correctness bugs and instruction-file violations, verify each candidate, and report the survivors without editing.
SkillAFreshness: AClaude Code +9 - 0.565score
create-pr
lithammer
Create a draft or ready-for-review PR for the current branch.
SkillAFreshness: AClaude Code +9 - 0.565score
develop
lithammer
Implement a feature or fix from agreed requirements, then verify it and resolve an independent spec review.
SkillAFreshness: AClaude Code +9 - 0.561score
simplify
lithammer
Clean up changed code without changing behavior — review it for reuse, simplification, efficiency, and altitude, then apply the fixes.
SkillAFreshness: AClaude Code +9 - 0.558score
review-docs
lithammer
Reviews doc, docstring, and comment diffs for AI-like prose and for comments that no longer have a job.
SkillAFreshness: AClaude Code +9 - 0.558score
nemesis
lithammer
Challenge a plan, design, or implementation one branch at a time.
SkillAFreshness: AClaude Code +9
Cite this page
refactor skill. Agent Mart. https://agentmart.dev/skills/lithammer-refactor (last updated 2026-10-24)