simplify

Simplifies code for readability while preserving exact behavior and passing existing tests.

2|Updated Jul 25, 2026
One-click install
npx skills add https://github.com/ankaboot-source/boucle --skill simplify-ankaboot-source
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/ankaboot-source/boucle/tree/main/.jcode/skills/simplify
Command: npx skills add https://github.com/ankaboot-source/boucle --skill simplify-ankaboot-source

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working code often accumulates unnecessary complexity — deep nesting, long functions, unclear names, and duplicated logic — making it hard to review, maintain, and extend. This Skill provides a disciplined process for reducing that complexity without changing what the code does. ## Core Features & Use Cases - Behavior-Preserving Refactoring: Every simplification must keep inputs, outputs, side effects, and error behavior identical, verified against existing tests. - Five Guiding Principles: Preserve behavior, follow project conventions, prefer clarity over cleverness, avoid over-simplification, and scope changes to recently modified code. - Structured Four-Step Process: Understand the code first, identify simplification signals (nested ternaries, boolean flags, dead code), apply changes incrementally, then verify with a checklist. - Use Case: After a feature passes its tests but the implementation feels heavy, run this Skill to flatten nested conditionals, rename misleading variables, and remove dead code — producing a cleaner diff that reviewers can approve faster. ## Quick Start Ask the agent to simplify the recently modified module while keeping all tests passing and behavior unchanged.

Frequently Asked Questions about simplify

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

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

Understand the code's responsibility and callers first, then apply one small change at a time and run the relevant tests after each step. Keep the change only if outputs, error behavior, and side effects remain identical.

What are the signs that code needs simplification?

Common signals include deep nesting, long functions with mixed responsibilities, nested ternaries, boolean flag arguments, repeated conditionals, misleading names, duplicated logic, dead code, and wrappers that add no value.

When should I not simplify code?

Avoid simplifying code you do not yet understand, code that is already clean, performance-critical paths where the simpler version is measurably slower, and modules you are about to rewrite entirely.

Does code simplification require updating existing tests?

No. A valid simplification keeps all existing tests passing without modification. If a test must change, the refactor altered behavior and should be reconsidered or split from the simplification work.

How do I avoid over-simplifying code?

Do not inline names that carry meaning, merge unrelated logic into larger functions, or remove abstractions that support testability. Optimize for comprehension by a new team member, not for line count.