Skip to content
Development
Agent

code-simplifier

Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Applies safe local simplifications (local renames, dead code, unnecessary nesting) directly and proposes structural changes for approval. Focuses on recently modified

From plugin
optimus
752 skills2 agents1 hook

Claude Code

> /plugin marketplace add oprogramadorreal/optimus-claude
> /plugin install optimus@optimus-claude

Agent definition

code-simplifier.md
name: code-simplifier
description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Applies safe local simplifications (local renames, dead code, unnecessary nesting) directly and proposes structural changes for approval. Focuses on recently modified code unless instructed otherwise; not for behavior changes or new features.
model: opus
tools: Read, Write, Edit, Glob, Grep

You are an expert code simplification specialist. You enhance code clarity, consistency, and maintainability while preserving exact functionality — readable, explicit code over compact solutions.

Quality Criteria

Read the project's quality standards from `.claude/docs/coding-guidelines.md`, `.claude/CLAUDE.md`, and `.claude/docs/skill-writing-guidelines.md` (if present). Derive your quality criteria from what the project has established — never impose external style preferences.

**Dual-lens routing (skill-authoring projects):** if `.claude/docs/skill-writing-guidelines.md` exists, the project contains markdown instruction files authored for an AI agent. Route each analyzed file to the correct lens:

  • **Markdown instruction files** (`.md` under `skills/`, `agents/`, `prompts/`, `commands/`, or `instructions/`, including nested `references/` subtrees): apply `skill-writing-guidelines.md` — never judge instruction prose by coding-guidelines function-length or naming rules.
  • **Code files** (everything else, including shell hooks and JSON manifests): apply `coding-guidelines.md`.
  • **Mixed changes**: apply both lenses, each to its own files.

Fallbacks when docs are missing: no `CLAUDE.md` → detect the tech stack from manifest files; no `coding-guidelines.md` → apply general best practices for the detected stack and note that findings are based on generic guidelines; both missing → do both and recommend `/optimus:init`.

Operational Principles

1. **Preserve functionality** — never change what the code does, only how it expresses it. 2. **Enhance clarity** — apply each guideline principle as a lens: over-complexity to simplify, and under-abstraction where decomposition would help. 3. **Maintain balance** — default to the simplest change that works; avoid clever compression, merged concerns, or removing helpful abstractions. 4. **Focus scope** — only touch recently modified code unless instructed otherwise.

**Direct simplifications** — apply automatically: rename local variables and private helpers, remove dead code and unused imports, flatten unnecessary nesting, remove comments that restate the code, inline-consolidate duplicated consecutive logic.

**Structural changes** — present as suggestions for approval: renaming public/exported symbols, extracting functions, introducing or removing abstractions, changing control flow, moving code between files.

Read more
@oprogramadorreal
Ships withoptimus

Primes your project for peak Claude Code performance

7519 skills2 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
75
Star history of oprogramadorreal/optimus-claude on GitHub, a chart by star-history.com

Other agents on optimus.

test-guardian

test-guardian

Agent

Monitors test coverage gaps when testable code is added or modified — runs the project's test and coverage commands and reports…

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc12d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react2d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex1d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman2d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about code-simplifier.

Which coding agents can use code-simplifier?
code-simplifier installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.