Skip to content
Back to skills

Act Refactor

ASecurity

Use when asked to refactor, clean up or restructure existing code without changing what it does. Works in small steps with tests after each one, after stating goal and scope and checking the test net. Not for making code faster - use act-perf.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 8, 2026
developmentgotesting

Works with

  • cli

Security analysis

A100/100

Scanned October 8, 2026

npx -y skills add wrufeger/agentic-coding-template --skill act-refactor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Act Refactor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Act Refactor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wrufeger-act-refactor/badge)](https://www.skillsdirectory.com/skills/wrufeger-act-refactor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: act-refactor
description: Use when asked to refactor, clean up or restructure existing code without changing what it does. Works in small steps with tests after each one, after stating goal and scope and checking the test net. Not for making code faster - use act-perf.
---

# Restructure without changing behavior

Restructures existing code to stay readable, consistent, or easier to extend — same result as
before. Not for changing functionality or "modernizing" just because code looks old, and not
without a test net: missing one, run `act-test-gap` for the area first, or decline the refactor.

1. **Name the goal** in one sentence — shorter, less duplication, clearer responsibility, a
   swappable dependency.
2. **Bound the scope** — which files/modules are in, which explicitly aren't. Grows past this
   during the work: stop and re-cut instead of continuing "along the way."
3. **Check the test net** (`docs/project/testing.md`). Doesn't cover the affected behavior: run
   `act-test-gap` first, then continue here.
4. **Restructure in small steps** — one rename, one extraction, one move at a time, never one
   large patch.
5. **Test after every step**; the suite from step 3 stays green before the next step starts, a
   red intermediate state gets fixed immediately.
6. **Compare behavior at the end** — spot-check inputs/outputs, plus the full required checks
   (`docs/ai/config.md` § commands), then `act-commit`.

A behavior change found along the way is a separate, later commit, never folded into this one; a
new library or pattern only when the goal from step 1 requires it (`docs/project/coding_rules.md`).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.