simplify

Simplify recently changed code by inlining abstractions, removing dead code, and adding guard clauses.

562|80|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/kdlbs/kandev --skill simplify-kdlbs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/kdlbs/kandev/tree/main/.agents/skills/simplify
Command: npx skills add https://github.com/kdlbs/kandev --skill simplify-kdlbs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplify recently changed code to reduce complexity, improve readability, and minimize the risk of introducing bugs during feature work.

Core Features & Use Cases

  • Inline one-off abstractions: replace single-use helpers with direct implementations to reduce indirection.
  • Remove speculative code: drop unused parameters, unused scaffolding, and feature-flag cruft.
  • Reduce nesting with guard clauses: convert deep nesting into early returns for clarity.
  • Preserve behavior: ensure all tests pass and behavior remains unchanged after simplification.

Quick Start

Run the simplify pass on your recently changed code after implementing a feature.

Frequently Asked Questions about simplify

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

FAQPage Schema
How do I simplify recently changed code without breaking existing behavior?

Code refactoring after feature changes involves removing unnecessary complexity, inlining single-use helpers, and reducing nesting with guard clauses, which clarifies logic and minimizes bug risks while preserving behavior.

What is the best way to reduce deep nesting in code logic?

Reducing deep nesting in code logic is achieved by applying guard clauses to convert complex nested conditions into early returns, which clarifies execution flow and improves readability without altering behavior.

How do I clean up speculative and dead code after a feature implementation?

Cleaning up speculative and dead code after feature implementation requires running a simplify pass across changed files to drop unused parameters, scaffolding, and feature-flag cruft while maintaining behavior.

Does code simplification require passing tests to preserve behavior?

Yes, code simplification requires passing tests to preserve behavior, ensuring that refactoring inline abstractions and removing dead code do not introduce bugs or alter the original functionality.

When should I use guard clauses over nested conditionals during a code refactor?

Use guard clauses over nested conditionals during a code refactor when you need to improve readability by replacing complex nested logic with early returns, effectively reducing unnecessary complexity.