simplify

Refactor code to reduce complexity while preserving behavior and tests.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/forgefabrik/agent-bigbrother --skill simplify-forgefabrik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/forgefabrik/agent-bigbrother/tree/main/.config/opencode/skills/simplify
Command: npx skills add https://github.com/forgefabrik/agent-bigbrother --skill simplify-forgefabrik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you reduce code complexity and improve readability after the implementation is already correct, so refactors stay safe and behavior-preserving.

Core Features & Use Cases

  • Behavior-Preserving Refactoring: Keep inputs, outputs, side effects, and error handling identical while making code easier to understand.
  • Clarity-Focused Cleanup: Simplify long functions, nested logic, confusing names, and duplicated patterns without rewriting the module.
  • Review-Ready Changes: Use it when code review flags maintainability issues, when recent edits added clutter, or when a working feature needs a cleaner implementation.

Quick Start

Use the simplify skill to review the selected code and propose scoped refactors that improve clarity without changing behavior.

Frequently Asked Questions about simplify

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

FAQPage Schema
How do I simplify complex code without changing its behavior?

Behavior-preserving refactoring simplifies long functions and nested logic by keeping inputs, outputs, and side effects identical. It requires exact parity in error behavior and project conventions, verifying changes incrementally with tests before and after each refactoring step.

What is the best way to clean up duplicated code for better readability?

Consolidating duplicate code through scoped refactors clarifies long functions and nested logic without rewriting the module. This approach maintains project conventions while improving maintainability and ensuring the implementation remains behavior-preserving.

How do I refactor nested logic flagged during code review?

Refactoring nested logic flagged during code review involves applying scoped changes that improve clarity while keeping error behavior identical. You must clean up clutter incrementally and verify exact behavior parity with tests before and after each modification.

Does behavior-preserving refactoring require running tests before simplifying?

Yes, behavior-preserving refactoring requires running tests before and after simplifying code. Verifying functionality before each incremental change ensures exact parity in inputs, outputs, and side effects is maintained throughout the complexity reduction process.

When should I not use refactoring to reduce code complexity?

You should not use refactoring to reduce code complexity when the implementation is not yet correct or when you cannot verify exact behavior parity. Without tests to confirm inputs, outputs, and side effects remain identical, simplifying changes risk altering functionality.