---
name: wise-simplify-auto
description: >-
  Autonomously simplify recently-modified code and commit it — dispatches
  the `code-simplifier` agent over the working tree (cleanup only,
  behaviour preserved: clarity, consistency, dead-code/redundancy
  removal), then drafts a Conventional-Commits subject and commits. The
  lightweight per-commit tier of the plugin's two-tier quality model, as a
  standalone decision-free building block. NO prompts, never pushes.
  Invoked as `/wise-simplify-auto` (bare alias) or
  `/wise:wise-simplify-auto` (canonical). Use when the user says "simplify
  and commit", "clean up and commit", "run a simplify pass", or types
  `/wise-simplify-auto`.
argument-hint: ""
allowed-tools: Task, Read, Bash(git:*)
---

# /wise-simplify-auto — simplify recently-modified code and commit

## Why this skill exists

The simplify pass (the `code-simplifier` agent) is the plugin's
lightweight per-commit cleanup; it is wired into the commit routine
(`/wise-commit` runs it before staging) and into the implement phase
(per task). This skill exposes it as a **standalone, decision-free
building block**: run the pass, then commit the result — no prompts. The
heavier multi-agent code-review branch gate is the other tier
(`/wise-code-review-auto`).

(Close cousin of `/wise-commit`, which also simplifies-then-commits via
its `SIMPLIFY=yes` default; this skill makes the simplify step the
explicit headline and is the autonomous building block workflows reuse.)

## Invocation

```
/wise-simplify-auto
/wise:wise-simplify-auto              # canonical namespaced form
```

No positionals, no flags. If the argument string contains anything other
than optional whitespace, stop with:

```
Unknown argument(s): <the extra tokens>
Usage: /wise-simplify-auto
```

## Procedure

### 1. Simplify recently-modified code

Run the simplify pass per
`${CLAUDE_PLUGIN_ROOT}/references/simplify-pass.md` — dispatch the
`code-simplifier` agent (a `Task` subagent) over the working tree's
recently-modified code. Surface its summary verbatim. On a simplify
failure, follow that reference's failure policy and stop with
`SIMPLIFY: failed reason="<one-line>"`. If the agent is unavailable in
this session (dispatch rejected), there is nothing to degrade to — the
pass *is* the skill — so stop with
`SIMPLIFY: failed reason="code-simplifier agent unavailable — enable the code-simplifier plugin"`.

### 2. Commit the result

Follow `${CLAUDE_PLUGIN_ROOT}/skills/wise-commit/commit-routine.md` with
`SIMPLIFY=no PUSH=no` (the pass already ran in §1 — `SIMPLIFY=no` avoids
a redundant second pass; `PUSH=no` because this skill never pushes). The
routine stages, drafts a Conventional-Commits subject, and commits.

### 3. Final line

Relay the routine's final `COMMIT:` line verbatim:

```
COMMIT: ok subject="<subject>" pushed=no
COMMIT: skip reason="nothing to commit"
COMMIT: failed reason="<verbatim error>"
```

## Guardrails

- Never call `AskUserQuestion` — the only stop is the argument error above.
- One simplify pass — never re-dispatch the agent to iterate-to-clean.
- Never `git push` — use `/wise-commit-push` for that.
- All of `commit-routine.md`'s guardrails apply (no `--amend` /
  `--no-verify` / `--force`, no AI-attribution trailer, no retry on
  failure).
- Never invoke another wise action skill.
