From hb
Simplifies working code without changing behavior — reduces complexity, removes dead abstractions, and favors clarity over cleverness. Use when code is harder to read or maintain than it should be.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hb:code-simplifyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Make working code clearer without changing what it does. Clarity over cleverness. Behavior is frozen — the test suite is the contract. Applies to frontend and backend equally.
Make working code clearer without changing what it does. Clarity over cleverness. Behavior is frozen — the test suite is the contract. Applies to frontend and backend equally.
Target: $ARGUMENTS (file, directory, or module — if blank, use unstaged changes)
/fortify)List findings, most-impactful first:
| Smell | Simplification |
|---|---|
| Deep nesting (> 2 levels) | Guard clauses / early return |
| Dead code, unused params, unreachable branches | Delete (after Chesterton's Fence) |
| Duplicated logic | Extract one named helper |
| Clever one-liners, dense ternaries | Expand to readable form |
| Shallow pass-through wrapper | Inline it (/codebase-design — the deletion test) |
| Speculative flexibility / config never used | Remove |
| Unclear names, primitive obsession | Rename to intent |
Present the audit. Ask which items to apply — list each as an option, "All items" first and marked (Recommended). Use AskUserQuestion (multiSelect) when available; otherwise a numbered checklist.
Per approved item:
Never batch. Use immutable edits — introduce no new mutation.
## Simplify Report
### Applied
- Flattened `parseConfig` — 4 nesting levels → guard clauses
- Deleted unused `legacyMode` param (Chesterton: git blame shows the feature was removed)
- Inlined `wrapResult` pass-through (deletion test: complexity vanished)
### Skipped / Blocked
- `retryLoop` — kept the sleep; couldn't confirm why (Chesterton's Fence)
### Result
Tests: 42 passed | 0 failed | behavior unchanged
/codebase-design vocabulary (deletion test, shallow module) when a simplification is really an interface question./fortify (it changes structure and adds tests; this skill only removes complexity)./architecture-audit.npx claudepluginhub helderberto/agent-skills --plugin hbSimplifies code for clarity while preserving behavior. Use when refactoring for readability, during code review, or when code has accumulated unnecessary complexity.
Simplifies code for clarity and maintainability without changing behavior. Useful after features work, during code review, or when refactoring complex logic.
Refines existing code for clarity, readability, and maintainability without changing behavior, interfaces, or outputs. Use for simplify, clean up, refactor for readability requests.