agentsclimarketplace

Refactor for openclaw

Skill LeoYeAI/openclaw-coding-skills/skills/refactor-for-openclaw

Production-grade coding workflow, execution scaffolding, and tuning skills for OpenClaw agents, part of the MyClaw.ai ecosystem.

Install
npx -y skills add LeoYeAI/openclaw-coding-skills --skill refactor-for-openclaw

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Simplify or restructure code in an OpenClaw workspace while preserving behavior. Use when the request sounds like "clean this code up", "simplify this without changing behavior", "reduce duplication here", "this module is getting hard to maintain", or when readability, structure, or verification quality need improvement without changing intended outcomes.

SKILL.md

1.7 KB, as published. Nobody here has run it

Refactor For OpenClaw

Refactor to reduce complexity, not to satisfy aesthetic preference.

Process

  1. Define what behavior must remain unchanged.
  2. Identify the specific complexity being reduced.
  3. Prefer small structural improvements over broad rewrites.
  4. Keep public interfaces stable unless the task explicitly includes interface change.
  5. Verify that behavior is preserved after each meaningful step.
  6. Stop when the code is materially clearer, not merely different.

Refactor Rules

  • Do not mix speculative optimization into a clarity refactor.
  • Do not rename or move code without a readability payoff.
  • Preserve existing conventions unless the convention itself is the problem.
  • Keep the diff explainable to a skeptical reviewer.

Reference Files

Read references/refactor-decision-test.md before broad cleanup or structural edits.

Read references/scope-guardrails.md when the refactor is expanding beyond one local concern.

Read references/behavior-preservation-checks.md when the code is fragile or the preserved behavior is easy to over-assume.

OpenClaw Guidance

  • Pair this skill with test-for-openclaw for behavior-preservation proof.
  • If the refactor broadens beyond the original scope, return to planning.
  • If the real problem is a bug, debug first and refactor second.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.