codex-simplify

codex-simplify is a skill for Claude Code, Codex from juan294/cc-rpi. It costs 63 tokens per session (1,024 once invoked), scanned A, original, MIT.

A cleanup skill for recently changed code that reviews reuse, quality, and efficiency, then applies appropriate fixes.

In plain words
What is it for?
Use it for a final refactoring pass on changed files, with extra attention to concerns such as readability, memory use, or repeated code.
Why use it?
It catches duplication, dead code, and other cleanup issues after the main implementation is complete.

Skill for Claude CodeCodex

Part of the cc-rpi plugin — 14 skills, 19 commands, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/juan294/cc-rpi/codex-simplify
Any agent
npx skills add juan294/cc-rpi --skill codex-simplify
Clone the repo
git clone --depth 1 https://github.com/juan294/cc-rpi

Made for: Claude Code, Codex.

Or install cc-rpi, the plugin that ships this one along with the rest of its 14 skills, 19 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codex-simplify

README.md
[![agentmods](https://agentmods.dev/badge/skills/juan294/cc-rpi/codex-simplify.svg)](https://agentmods.dev/skills/juan294/cc-rpi/codex-simplify)
Your own site
<a href="https://agentmods.dev/skills/juan294/cc-rpi/codex-simplify"><img src="https://agentmods.dev/badge/skills/juan294/cc-rpi/codex-simplify.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,024 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00063 $0.01024
Opus 5 $0.00032 $0.00512
Sonnet 5 $0.00013 $0.00205
Haiku 4.5 $0.00006 $0.00102

Measured 4d ago against content hash 7800fb5487a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-simplify scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/codex-simplify/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codex Simplify

Run a post-implementation cleanup pass over recently changed files.

This skill is the Codex approximation of Claude Code's bundled /simplify behavior. It intentionally lives outside .claude/skills/ and uses the non-conflicting name codex-simplify so Claude Code keeps its native /simplify command.

Preserve the public contract:

  • target recently changed files
  • review for reuse, quality, and efficiency
  • use three independent review passes
  • aggregate findings
  • apply fixes

Treat any user-supplied focus, such as memory efficiency, dead code, duplication, or readability, as extra weighting rather than a replacement for the core three review lenses.

When to use

Use this skill when:

  • the code already exists
  • the implementation or bug fix is already done
  • the user wants a cleanup or refactoring pass rather than new feature work
  • a workflow calls for a /simplify-style pass after review approval

Do not use this skill as a substitute for initial implementation, plan compliance review, or full validation.

Target file selection

Approximate "recently changed files" with this priority order:

  1. Tracked unstaged changes in the current worktree
  2. Tracked staged changes
  3. Untracked files clearly related to the current task
  4. If the tree is clean, files changed by the most recent commit

Use git to discover the set. Prefer file lists equivalent to:

git diff --name-only --diff-filter=ACMR
git diff --cached --name-only --diff-filter=ACMR
git ls-files --others --exclude-standard
git diff --name-only --diff-filter=ACMR HEAD~1..HEAD

Deduplicate the list. Exclude generated artifacts, lockfiles, build output, and unrelated files unless the user explicitly asks for them.

If there are no relevant changed files, stop and report that codex-simplify has nothing to do.

Review workflow

Run three independent review passes over the same target file set:

  1. Reuse pass Look for duplication, repeated logic, avoidable branching, and places where a simpler shared helper or existing abstraction should be used.
  2. Quality pass Look for confusing structure, dead code, weak naming, brittle conditionals, unnecessary complexity, and maintainability problems.
  3. Efficiency pass Look for avoidable work, redundant allocations, repeated I/O, wasteful data transformations, and obvious performance footguns.

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 142 lines · 63 tokens per session scan A 7800fb5487a3

Subscribe to this mod's changes

codex-simplify is a skill published in the GitHub repository juan294/cc-rpi (5 stars, last pushed 3d ago), licensed MIT. It adds 63 tokens to every session and 1,024 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.