Skip to content
Skillpedia
General coding48k · #4170

simplify-code

Lets your agent review code to simplify it. It aims to make code clearer and easier to understand, safely.

What it does

This tool reviews code snippets that have been changed. It looks for ways to simplify the code, make it easier to understand, and ensure it works correctly, by applying only safe changes.

When to use it

  • ✓When you want to simplify code that was just changed.
  • ✓When you want to ensure code changes are clear and safe.
  • ✓When you want to review or clean up a specific piece of code.

Example of what to ask your AI

“Review this code and simplify it if possible.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/simplify-code/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/simplify-code/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool uses smaller 'artificial intelligences' to analyze the code from different angles: reuse, quality, efficiency, and clarity. Then, it suggests or applies only the safest changes that do not alter the original functionality.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill simplify-code

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/simplify-code/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Simplify Code

Review changed code for reuse, quality, efficiency, and clarity issues. Use Codex sub-agents to review in parallel, then optionally apply only high-confidence, behavior-preserving fixes.

When to Use

  • When the user asks to simplify, clean up, refactor, or review changed code.
  • When you want high-confidence, behavior-preserving improvements on a scoped diff.

Modes

Choose the mode from the user's request:

  • review-only: user asks to review, audit, or check the changes
  • safe-fixes: user asks to simplify, clean up, or refactor the changes
  • fix-and-validate: same as safe-fixes, but also run the smallest relevant validation after edits

If the user does not specify, default to:

  • review-only for "review", "audit", or "check"
  • safe-fixes for "simplify", "clean up", or "refactor"

Step 1: Determine the Scope and Diff Command

Prefer this scope order:

  1. Files or paths explicitly named by the user
  2. Current git changes
  3. Files edited earlier in the current Codex turn
  4. Most recently modified tracked files, only if the user asked for a review but there is no diff

If there is no clear scope, stop and say so briefly.

When using git changes, determine the smallest correct diff command based on the repo state:

  • unstaged work: git diff
  • staged work: git diff --cached
  • branch or commit comparison explicitly requested by the user: use that exact diff target
  • mixed staged and unstaged work: review both

Do not assume git diff HEAD is the right default when a smaller diff is available.

Before reviewing standards or applying fixes, read the repo's local instruction files and relevant project docs for the touched area. Prefer the closest applicable guidance, such as:

  • AGENTS.md
  • repo workflow docs
  • architecture or style docs for the touched module

Use those instructions to distinguish real issues from intentional local patterns.

Step 2: Launch Four Review Sub-Agents in Parallel

Use Codex sub-agents when the scope is large enough for parallel review to help. For a tiny diff or one very small file, it is acceptable to review locally instead.

When spawning sub-agents:

  • give each sub-agent the same scope
  • tell each sub-agent to inspect only its assigned review role
  • ask for concise, structured findings only
  • ask each sub-agent to report file, line or symbol, problem, recommended fix, and confidence

Use four review roles.

Sub-Agent 1: Code Reuse Review

Review the changes for reuse opportunities:

  1. Search for existing helpers, utilities, or shared abstractions that already solve the same problem.
  2. Flag duplicated functions or near-duplicate logic introduced in the change.
  3. Flag inline logic that should call an existing helper instead of re-implementing it.

Recommended sub-agent role: explorer for broad codebase lookup, or reviewer if a stronger review pass is more useful than wide search.

Sub-Agent 2: Code Quality Review

Review the same changes for code quality issues:

  1. Redundant state, cached values, or derived values stored unnecessarily
  2. Parameter sprawl caused by threading new arguments through existing call chains
  3. Copy-paste with slight variation that should become a shared abstraction
  4. Leaky abstractions or ownership violations across module boundaries
  5. Stringly-typed values where existing typed contracts, enums, or constants already exist

Recommended sub-agent role: reviewer

Sub-Agent 3: Efficiency Review

Review the same changes for efficiency issues:

  1. Repeated work, duplicate reads, duplicate API calls, or unnecessary recomputation
  2. Sequential work that could safely run concurrently
  3. New work added to startup, render, request, or other hot paths without clear need
  4. Pre-checks for existence when the operation itself can be attempted directly and errors handled
  5. Memory growth, missing cleanup, or listener/subscription leaks
  6. Overly broad reads or scans when the code only needs a subset

Recommended sub-agent role: reviewer

Sub-Agent 4: Clarity and Standards Review

Review the same changes for clarity, local standards, and balance:

  1. Violations of local project conventions or module patterns
  2. Unnecessary complexity, deep nesting, weak names, or redundant comments
  3. Overly compact or clever code that reduces readability
  4. Over-simplification that collapses separate concerns into one unclear unit
  5. Dead code, dead abstractions, or indirection without value

…

FAQ

What is a 'diff'?

A 'diff' is a comparison that shows the differences between two versions of a file or set of files. It's like seeing the exact changes that were made.

What does 'apply safe changes' mean?

It means the tool only makes code changes that have a high chance of not breaking anything or changing the program's expected behavior. It avoids risky modifications.

Why does the tool use 'sub-agents'?

Using sub-agents allows code review to be done in parallel by different specialists, making the process faster and more thorough by covering multiple aspects of the code simultaneously.

Details

Original description by the author

Review a diff for clarity and safe simplifications, then optionally apply low-risk fixes.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#4170
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills