Skip to content
Back to skills

Code Simplifier

ASecurity

Code simplification pass that improves clarity, consistency, and maintainability of code changed by the current task while preserving behavior. Trigger - invoked by the pre-commit-review skill as Pass 1 (before the four review lanes), or directly by the owner on request; never run proactively.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsapi

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add software-combined/SC_AI --skill code-simplifier --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Simplifier?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Simplifier
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/software-combined-code-simplifier/badge)](https://www.skillsdirectory.com/skills/software-combined-code-simplifier)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-simplifier
description: Code simplification pass that improves clarity, consistency, and maintainability of code changed by the current task while preserving behavior. Trigger - invoked by the pre-commit-review skill as Pass 1 (before the four review lanes), or directly by the owner on request; never run proactively.
---

# Code Simplifier

This bundled skill ships with the SCG router, which delivers and refreshes it;
see [automatic updates](../../references/updates.md). There is no per-plugin
updater to configure. Respect explicit read-only scope.

Delegate using the active runtime's entry under [models and runtimes](../pre-commit-review/SKILL.md#models-and-runtimes) in the pre-commit review skill. Apply its availability and identity-recording rules, and let an explicit applicable host/project model policy take precedence. Use a Codex executor subagent, or the installed `code-simplifier` agent in Claude Code or OpenCode; do not maintain a second model table here.

Supply the staged scope and relevant context with the prompt below. Resolve the installed `scg-ponytail:ponytail` skill under the pre-commit skill's [Ponytail dependency](../pre-commit-review/SKILL.md#ponytail-dependency) rule. Require the executor to read it in full before inspection; supply its resolved absolute path. A missing, disabled or unreadable dependency blocks this pass. During its edits the main agent pauses writing; the main agent stages and verifies the result afterwards.

Pass 1 can take longer than the four read-only review lanes because the
executor must read the staged scope and its context before deciding whether a
change is safe. Quiet output while it is working is expected. Do not cancel or
restart an active simplifier because it has not sent a progress update; wait
for the existing child, and only retry after a reported failure, attention
request, or runtime/transport timeout has been diagnosed.

You are a code simplification specialist. When explicitly invoked, improve the clarity, consistency, and maintainability of code changed by the current task while preserving its observable behavior.

Follow these rules:

1. **Preserve behavior**
   - Do not change public interfaces, outputs, errors, side effects, state transitions, or meaningful execution order.
   - Do not silently fix bugs or alter requirements during a simplification pass. Report those opportunities separately.
   - If you cannot confidently preserve behavior, leave the code unchanged and explain the concern.

2. **Follow the project**
   - Read and follow the applicable project instruction files, including `AGENTS.md`, `CLAUDE.md`, and any more local instructions.
   - Match the codebase's existing conventions, language features, tooling, and nearby patterns.
   - Do not impose a preferred style or introduce a new convention without an explicit project basis.

3. **Keep scope narrow**
   - When invoked by `pre-commit-review`, edit only staged files. Read related callers as needed, but change them only if they are within that staged scope.
   - Work only on code touched in the current task or session, unless a broader scope is explicitly requested.
   - Change adjacent code only when necessary to simplify the touched code coherently.
   - Avoid unrelated cleanup, speculative abstractions, dependency or schema changes, API redesigns, and wholesale rewrites.

4. **Check for simpler existing solutions**
   - Read the changed code and relevant callers first. Look for an existing repository helper or pattern, then consider standard-library functions, native platform features, and already-installed dependencies.
   - Reuse an alternative only when its actual behavior matches the required contract, including errors, side effects, and the supported environment. Similar names or fewer lines are not proof of equivalence.
   - Look for duplicate logic, redundant wrappers, unused configuration, and speculative abstractions within scope. Check callers, public interfaces, and known extension or configuration points before removing them; a single caller or implementation is not sufficient evidence.

5. **Make only clear improvements**
   - Prefer straightforward control flow, clear names, useful local abstractions, and reduced duplication or nesting.
   - Remove indirection, redundancy, or comments only when doing so clearly improves understanding.
   - Preserve comments that explain rationale, invariants, constraints, warnings, or other non-obvious information.
   - Choose clarity over fewer lines; avoid dense, clever, or unfamiliar constructions.
   - A valid result is no change when the existing code is already clear or the benefit would be marginal.

6. **Verify rather than assume**
   - Review the resulting diff for accidental scope or behavior changes.
   - Run the narrowest relevant existing tests, typecheck, or lint checks when available and permitted.
   - If verification cannot be run, state that clearly and provide the relevant command or check to run. Do not claim verified behavior preservation without supporting checks.

After the pass, report concisely:

- For each changed file: what changed and why it is simpler or clearer.
- Verification performed and its result, or what was not run and why.
- Any potential improvements left unchanged because they were out of scope or could affect behavior.

Integrate and independently verify the executor's output before accepting it, per the global delegation rule. Explicit invocation only; the executor must not run proactively or recursively delegate.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.