# Ce Simplify Code

Simplify code for clarity, reuse, quality, and efficiency while preserving behavior...

- Repository: https://github.com/EveryInc/compound-engineering-plugin (25818 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add EveryInc/compound-engineering-plugin --skill ce-simplify-code -g -a claude-code -y`
Codex: `npx skills add EveryInc/compound-engineering-plugin --skill ce-simplify-code -g -a codex -y`
Cursor: `npx skills add EveryInc/compound-engineering-plugin --skill ce-simplify-code -g -a cursor -y`
Gemini CLI: `npx skills add EveryInc/compound-engineering-plugin --skill ce-simplify-code -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add EveryInc/compound-engineering-plugin`

## Description

Simplify code for clarity, reuse, quality, and efficiency while preserving behavior, and prune tests and comments that carry no value. Use after implementation and before review, or to audit tests or comments in any part of a repo; use ce-debug for bugs.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

Simplify code for clarity, reuse, quality, and efficiency, and prune tests and comments that carry no value, while preserving exact behavior. Prioritize readable, explicit code over compact code, fewer lines is not the goal.

## Mode

Strip a `mode:pipeline` token and every `proof-test:<path>` token from the input before reading the rest as the scope. The proof-test path is context for Step 3, never scope; a caller may pass several.

- **Pipeline** when `mode:pipeline` is present, or when no one asked for this run in their own current message: a step of another skill, or a run the agent starts itself, such as at a completion boundary. Work only on the current work, apply fixes without asking or waiting, and return the Step 5 summary to the caller. That summary is for the caller's record; never paste it into a commit, PR body, or other artifact.
- **Standalone** when the user's own current message asked for this run. Their request sets the scope and focus. Report findings before editing anything, unless the request says to just fix them. Read `references/standalone-report.md` now, and again before applying any reported finding.

## Step 1: Identify scope

Resolve the scope in this order:

1. **User-named scope** is authoritative; do not widen it. In standalone mode it may be the whole repo, an area, or a path.
2. **Otherwise, in git**, use the current branch versus its base. Without a usable base, use staged and unstaged changes (`git diff HEAD`).
3. **Outside git or without a diff**, use files the user named or that were edited earlier in the conversation.

In pipeline mode the scope is what the caller passed, else the branch diff. Within it, prune only tests and comments the current work added or changed.

If none of the above produces a non-empty scope, pipeline mode reports "nothing to simplify" and returns. Standalone mode asks the user what to simplify, as `references/standalone-report.md` describes.

The rest: https://github.com/EveryInc/compound-engineering-plugin/blob/HEAD/skills/ce-simplify-code/SKILL.md
