simplify

Simplify implementation code while preserving passing test suites.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/sizukutamago/claude-code-harness --skill simplify-sizukutamago
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/sizukutamago/claude-code-harness/tree/main/.claude/skills/simplify
Command: npx skills add https://github.com/sizukutamago/claude-code-harness --skill simplify-sizukutamago

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplify eliminates implementation cruft and improves code clarity after TDD by removing duplication, improving naming, and simplifying structure while guaranteeing that existing tests remain passing. It reduces implementer bias by delegating refactor work to a separate agent and enforces small, reversible steps so behavior does not change unintentionally. The skill enforces a test-driven safety net and a reproducible baseline to ensure refactors are purely structural.

Core Features & Use Cases

  • Baseline snapshot and verification: capture and confirm the full test suite is green before any change.
  • Targeted simplification plan: analyze duplication, naming, nesting, and unnecessary abstractions and propose one atomic simplification at a time.
  • Safe apply-and-verify loop: apply a single simplification, run the entire test suite, revert on failure, and iterate until done.
  • Agent orchestration: dispatches test-runner and simplifier agents, requires presenting the REQ path and full contextual files, and reports status as DONE / DONE_WITH_CONCERNS / NEEDS_CONTEXT / BLOCKED.
  • Use case: perform repository-level refactors after TDD completion and before code review to improve readability and reduce technical debt without changing behavior.

Quick Start

Ask the simplify skill to refactor the implementation for the relevant REQ path while ensuring the full test suite stays green.

Frequently Asked Questions about simplify

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

FAQPage Schema
How do I refactor code safely while keeping tests green after TDD?

To refactor code safely while keeping tests green, you need a passing test suite as a baseline and an automated apply-and-verify loop that reverts changes if tests fail. This ensures purely structural simplification preserves behavior.

What is the best way to remove code duplication without changing behavior?

The best way to remove code duplication without changing behavior is through targeted simplification plans that apply one atomic change at a time, verifying the full test suite remains green after each modification to prevent unintended side effects.

When should I perform code refactoring in the TDD workflow?

Code refactoring in the TDD workflow should be performed after TDD completion when the full test suite is green. It targets repository-level improvements like naming, nesting reduction, and duplicate removal before the code review stage.

How does agent orchestration work for automated code refactoring?

Agent orchestration for automated code refactoring works by dispatching separate test-runner and simplifier agents. The simplifier proposes atomic changes, and the test-runner executes the test suite, reverting on failure to ensure structural integrity.

Can I refactor implementation code if my test suite is currently failing?

You cannot refactor implementation code if your test suite is currently failing. The process requires capturing a baseline snapshot confirming the full test suite is green before any structural changes or simplification attempts can begin.

Does automated refactoring handle naming improvements and structural simplification?

Automated refactoring handles naming improvements and structural simplification by analyzing duplication, naming, nesting, and unnecessary abstractions. It proposes targeted atomic changes iteratively, ensuring the test suite stays green throughout the transformation.