refactor-code

Apply single-issue code refactors after review while preserving behavior.

1|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/daddia/space --skill refactor-code-daddia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-code
Source: https://github.com/daddia/space/tree/main/.agents/skills/refactor-code
Command: npx skills add https://github.com/daddia/space --skill refactor-code-daddia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps engineers apply targeted refactors after code reviews to fix blocking issues, warnings, or suggestions while preserving observable behaviour.

Core Features & Use Cases

  • Apply small, auditable diffs that address a single issue at a time.
  • Validate changes by running tests and type checks to ensure no observable behaviour changes.
  • Maintain a clear commit history and traceability for review-derived fixes.

Quick Start

Begin by applying the smallest change that resolves the review findings and run the test suite to confirm no behavioural changes.

Frequently Asked Questions about refactor-code

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

FAQPage Schema
How do I refactor code after a review without changing observable behaviour?

To refactor code without changing observable behaviour, apply small, auditable diffs that address a single review issue at a time, then run tests and type checks to confirm no behavioural changes occurred.

What is the best way to fix blocking code review issues across modules?

The best way to fix blocking code review issues is applying targeted refactors that address one issue at a time, ensuring each change is validated by passing tests and type checks before moving to the next.

When do I need to enforce one-issue-at-a-time changes during a code refactor?

You need to enforce one-issue-at-a-time changes during a code refactor when applying review-derived fixes across modules, as this maintains clear commit history and traceability while preserving observable behaviour.

How does test validation ensure behaviour preservation during code changes?

Test validation ensures behaviour preservation during code changes by requiring the test suite and type checks to pass after each targeted refactor, confirming that the original observable behaviour remains intact.

Can I apply targeted refactors to a codebase undergoing review workflows?

Yes, you can apply targeted refactors to a codebase undergoing review workflows by addressing identified warnings and style suggestions, validating each fix with tests to ensure no observable behaviour changes.

What are the limitations of refactoring code without changing behaviour?

A limitation of refactoring code without changing behaviour is that changes are constrained to one issue at a time and must pass tests and type checks, which may slow down large-scale structural modifications.