reduce

Automates safe refactoring of Lisp code with a test-locked workflow.

65|5|Updated May 13, 2026
One-click install
npx skills add https://github.com/escoffier-labs/brigade --skill reduce-escoffier-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reduce
Source: https://github.com/escoffier-labs/brigade/tree/main/registry/skills/reduce
Command: npx skills add https://github.com/escoffier-labs/brigade --skill reduce-escoffier-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually refactoring code to improve readability often risks introducing unintended behavior changes, which can break existing functionality and require time-consuming debugging to fix.

Core Features & Use Cases

  • Behavior-preserving simplification: All edits strictly maintain original inputs, outputs, side effects, and public interfaces, with no unverified changes allowed.
  • Structured safety workflow: Uses a test-locked process that runs verification after every small change to confirm no functional shifts, and escalates to report mode for under-tested or broad-scope work.
  • Use case: When you have a recently modified function with deeply nested conditional logic, use this skill to flatten the control flow and improve naming without breaking any existing tests.

Quick Start

Ask the AI to simplify the code in the src/validators.py file while ensuring all existing behavior remains unchanged.

Frequently Asked Questions about reduce

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

FAQPage Schema
How do I refactor code to improve readability without changing behavior?

To simplify code safely, apply a test-locked workflow that runs verification after every small change to confirm no functional shifts. This preserves original inputs, outputs, side effects, and public interfaces during mechanical cleanup like flattening control flow or consolidating duplication.

What is the best way to flatten nested control flow in recently modified code?

The best way to flatten nested control flow is through behavior-preserving simplification. This approach mechanically cleans up recently modified or explicitly scoped code while enforcing post-change verification to strictly maintain original inputs, outputs, side effects, and public interfaces.

How do I remove unused code and consolidate duplication safely during refactoring?

To remove unused code and consolidate duplication safely, enforce a structured safety workflow with post-change verification. This test-locked process confirms no functional shifts occur during refactoring, guaranteeing your cleanup strictly maintains original side effects and public interfaces.

Can I simplify code in files that lack comprehensive test coverage?

Yes, you can simplify code with under-tested or broad-scope work by escalating to report mode. This structured safety workflow allows refactoring to proceed cautiously when comprehensive test coverage is unavailable, ensuring changes are verified before application.

What are the limitations of mechanical code cleanup for technical debt reduction?

Mechanical code cleanup for technical debt reduction is limited to local, recently modified, or explicitly scoped code. It is not intended for broad-scope architectural refactoring and requires a test-locked workflow with post-change verification to guarantee no unintended behavior changes occur.