refactoring

Identify and plan code refactoring with coverage and complexity analyses.

1|Updated Oct 21, 2025
One-click install
npx skills add https://github.com/bryonjacob/aug --skill refactoring-bryonjacob
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring
Source: https://github.com/bryonjacob/aug/tree/main/aug-dev/skills/refactoring
Command: npx skills add https://github.com/bryonjacob/aug --skill refactoring-bryonjacob

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams safely identify and execute code refactor opportunities to improve maintainability while preserving behavior, guided by automated quality gates and a structured workflow.

Core Features & Use Cases

  • Automated target identification: Use coverage and complexity analyses to surface refactoring candidates.
  • Plan and execute safely: Create clear issues with acceptance criteria and run a RED-GREEN-REFACTOR cycle using /plan and /work.
  • Quality gate compliance: Enforce high test coverage (≥96%) before applying changes and validate with automated tests.

Quick Start

Use /refactor to discover opportunities, then follow with /plan, /work, and /test to implement changes incrementally.

Frequently Asked Questions about refactoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify and plan safe code refactoring targets?

To identify and plan safe code refactoring, you can use automated coverage and complexity analyses to surface candidates, then create issues with clear acceptance criteria to guide the execution workflow.

What is the RED-GREEN-REFACTOR cycle for maintaining test coverage?

The RED-GREEN-REFACTOR cycle is an execution workflow that enforces writing failing tests first, making them pass, and then improving code structure while validating changes with automated tests before merging.

Do I need automated quality gates to enforce maintainability during a refactor?

Yes, this refactoring workflow applies to codebases with automated quality gates, requiring a strict test coverage threshold above 96% to validate changes before applying them and merging.

How do I execute a maintainability refactor using justfile workflows?

You execute a maintainability refactor by running /refactor to discover opportunities, following with /plan and /work to implement changes incrementally, and validating everything with /test using justfile commands.

Can I use this refactoring workflow without meeting a specific test coverage threshold?

No, the workflow enforces high test coverage at or above 96% before applying refactoring changes, ensuring that automated tests validate behavior preservation throughout the entire process.

What's the best way to safely execute code refactoring in an automated environment?

The best way to safely execute code refactoring is to use a structured workflow that combines complexity analysis for target identification, strict quality gates, and a RED-GREEN-REFACTOR cycle for validation.