Skip to content
Back to skills

Simplify

ASecurity

Simplify recently changed code — inline one-off abstractions, remove speculative code, reduce nesting, replace cleverness with clarity. Run after implementing a feature.

  • 901 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added May 27, 2026
developmentgit

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add kdlbs/kandev --skill simplify --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Simplify?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Simplify
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kdlbs-simplify/badge)](https://www.skillsdirectory.com/skills/kdlbs-simplify)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: simplify
description: Simplify recently changed code — inline one-off abstractions, remove speculative code, reduce nesting, replace cleverness with clarity. Run after implementing a feature.
---

# Simplify

Post-implementation simplification pass. Review recently changed code and actively simplify it while preserving all behavior.

The best code is code you don't have to write. The second best is code anyone can read.

## Available skills and subagents

- **`verify` subagent** — Run after simplifications to ensure all tests, lints, and typechecks still pass.

## Steps

### 1. Identify what to simplify

Run `git diff --name-only` (or `git diff origin/<base>...HEAD --name-only` for a branch) to get the changed files. Read each one.

### 2. Apply simplifications

Work through each changed file. For each simplification, verify tests still pass before moving on.

**Inline one-off abstractions:**
- Helper functions with a single call site — inline them
- Wrapper types that add no behavior — remove the wrapper
- Interfaces with a single implementation and no test mock — remove the interface

**Remove speculative code:**
- Unused function parameters or return values
- Config options that are parsed but never read
- "Reserved for future" scaffolding, empty extension points
- Feature flags with no toggle mechanism

**Reduce nesting:**
- Replace nested if/else with early returns (guard clauses)
- Replace nested ternaries with if/else or switch
- Extract deeply nested blocks into named functions

**Replace cleverness with clarity:**
- Dense one-liners that hide intent — expand to readable multi-line
- Overly generic code where a concrete implementation is simpler
- Abstractions that add indirection without reducing duplication

**Remove noise:**
- Comments that restate code (`// increment counter` above `counter++`)
- Redundant type annotations where inference works
- Empty error handlers, unused catch variables
- Leftover debug logging

### 3. Verify

Delegate to the **`verify` sub-agent** to ensure all tests, lints, and typechecks still pass. If anything breaks, the simplification changed behavior — revert it.

### 4. Summary

Report what was simplified:
- Files modified
- What was removed/inlined/simplified
- Lines removed (net)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.