Skip to content
Agentmart
Submit a tool

refactor

Find structural refactors that remove caller obligations, then implement the chosen change.

Skill by lithammer

IndexedMIT
Write a review

Chalk Labs

Need help deploying refactor?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

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.

We use your email only for this newsletter. Privacy

About

Find structural refactors that remove caller obligations, then implement the chosen change.

No 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 and code. Checked Nov 2, 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

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 15, 2026 (23 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from lithammer

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get refactor running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying refactor?

CallGet help
Cite this page

refactor skill. Agent Mart. https://agentmart.dev/skills/lithammer-refactor (last updated 2026-10-24)