AgentStack
SKILL verified Apache-2.0 Self-run

Refactoring

skill-mingo07-dev-claude-skills-refactoring · by Mingo07-dev

Refactor code for readability and structure without changing behavior. Use when the user asks to refactor, clean up, improve readability, rename variables, extract functions, or reduce code smells. Runs a two-subagent pipeline: reader/planner then executor.

No reviews yet
0 installs
15 views
0.0% view→install

Install

$ agentstack add skill-mingo07-dev-claude-skills-refactoring

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Refactoring? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Refactoring pipeline (two subagents)

When to use

  • Code is hard to read or maintain
  • Functions are too long or doing too many things
  • Naming is unclear or inconsistent
  • The user explicitly asks for refactoring or clean code

Goal

Produce human-readable, well-structured code without behavior changes.

Pipeline overview

Parent Agent
  -> Subagent 1: Reader/Planner (analyze, plan, no edits)
  -> Subagent 2: Executor (apply plan, run tests, report)

Phase 1: Parent scope and baseline

  1. Determine scope (files, directory, or full codebase)
  2. Scan for existing tests
  3. Run tests if present and save baseline output
  4. Pass scope and context to Subagent 1

Phase 2: Subagent 1 (Reader/Planner)

Use the checklist and plan format in [references/checklist.md](references/checklist.md). Write the plan to /tmp/refactoring-plan.md.

Phase 3: Subagent 2 (Executor)

Apply the plan from /tmp/refactoring-plan.md and follow the execution rules in [references/execution.md](references/execution.md). Write REFACTORING_REPORT.md.

Phase 4: Parent validation

  1. Read REFACTORING_REPORT.md
  2. Compare tests vs baseline (if any)
  3. Summarize changes and deviations

Notes

  • Subagent 1 never edits files.
  • Subagent 2 must follow the plan exactly.
  • Do not rename public APIs without explicit confirmation.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.