Tooluck logoTooluck
SKILL.md

code-simplification

Agent skill fromaddyosmani/agent-skills

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity. Use when asked to simplify, clean up, or reduce the nesting of a function or module that already works, even when the code is pasted inline and nothing else needs to change.

How to install code-simplification

install code-simplification
# install the agent-skills pack with the skills CLI
npx skills add addyosmani/agent-skills

# or add only this skill to Claude Code: copy the folder

skills/code-simplification/

# into

~/.claude/skills/code-simplification/ (all projects)

.claude/skills/code-simplification/ (one project)

skills/code-simplification/SKILL.md

MITFull file
1# Code Simplification
2
3> Inspired by the [Claude Code Simplifier plugin](https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-simplifier/agents/code-simplifier.md). Adapted here as a model-agnostic, process-driven skill for any AI coding agent.
4
5## Overview
6
7Simplify code by reducing complexity while preserving exact behavior. The goal is not fewer lines — it's code that is easier to read, understand, modify, and debug. Every simplification must pass a simple test: "Would a new team member understand this faster than the original?"
8
9## When to Use
10
11- After a feature is working and tests pass, but the implementation feels heavier than it needs to be
12- During code review when readability or complexity issues are flagged
13- When you encounter deeply nested logic, long functions, or unclear names
14- When refactoring code written under time pressure
15- When consolidating related logic scattered across files
16- After merging changes that introduced duplication or inconsistency
17
18**When NOT to use:**
19
20- Code is already clean and readable — don't simplify for the sake of it
21- You don't understand what the code does yet — comprehend before you simplify
22- The code is performance-critical and the "simpler" version would be measurably slower
23- You're about to rewrite the module entirely — simplifying throwaway code wastes effort
24
25## The Five Principles
26
27### 1. Preserve Behavior Exactly
28…

Excerpt shown under the repository's MIT license.

More skills in agent-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates