Skip to content
Development
Skill

/arn-code-simplify

This skill should be used when the user says "simplify", "arness code simplify", "simplify code", "code simplification", "clean up code", "reduce complexity", "remove duplication", "check for reuse", "find duplicates", "optimize code", "efficiency review", "simplify

From plugin
arness
3590 skills48 agents

Claude Code

$ npx -y skills add AppsVortex/arness --skill arn-code-simplify --agent claude-code

SKILL.md

arn-code-simplify.SKILL.md
name: arn-code-simplify
description: >-
  This skill should be used when the user says "simplify", "arness code simplify",
  "simplify code", "code simplification", "clean up code", "reduce complexity",
  "remove duplication", "check for reuse", "find duplicates", "optimize code",
  "efficiency review", "simplify implementation", "arn-code-simplify",
  or wants to review recently implemented code for reuse opportunities, quality
  issues, and efficiency problems after execution completes. Do NOT use this
  for full implementation correctness review (use arn-code-review-implementation)
  or PR review (use arn-code-review-pr).
version: 1.0.0

Arness Simplify

Analyze recently implemented code for reuse opportunities, quality issues, and efficiency problems. Dispatches three parallel reviewers (code reuse, code quality, efficiency), merges findings, applies user-approved fixes with test verification, and generates a structured simplification report.

This is a post-execution quality improvement skill. It runs after implementation is complete (after execute-plan, swift, or bug-spec) and before review-implementation.

This is an execution skill. It runs in normal conversation (NOT plan mode).

Prerequisites

If no `## Arness` section exists in the project's CLAUDE.md, inform the user: "Arness is not configured for this project yet. Run `/arn-implementing` to get started — it will set everything up automatically." Do not proceed without it.

Pipeline Position

execute --> **arn-code-simplify** --> review-implementation --> document-project --> ship

Arness-simplify is an optional step between execution and review. It can be triggered:

  • By arn-implementing as Gate G3 (opt-in)
  • By the user directly after any execution completes
  • As a next-step offer from arn-code-execute-plan, arn-code-execute-task, or arn-code-swift

Workflow

Step 1: Load Configuration

1. Read the project's CLAUDE.md and extract the `## Arness` section to find:

  • Plans directory
  • Code patterns path
  • Template path
  • Template version and Template updates preference (if present)

2. If the `## Arness` section is missing, inform the user: "Arness is not configured for this project yet. Run `/arn-implementing` to get started — it will set everything up automatically." Do not proceed.

3. Load pattern documentation from the code patterns directory:

  • `code-patterns.md` (required)
  • `testing-patterns.md` (required)
  • `architecture.md` (required)
  • `ui-patterns.md` (if it exists)
  • `security-patterns.md` (if it exists)

4. If pattern documentation is missing, invoke the `arn-code-codebase-analyzer` agent to generate fresh analysis. If the analyzer is unavailable, suggest running `/arn-implementing` to get started.

Hold this context for use throughout the workflow.

---

Step 2: Resolve Scope

> Read `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-simplify/references/scope-detection.md` for the full scope detection algorithm.

1. **If invoked with an explicit scope** (e.g., from arn-code-execute-task passing a report path): use the provided scope directly.

2. **If invoked without explicit scope** (standalone or wizard gate): auto-detect scope using the priority order defined in scope-detection.md (pipeline > swift > bugfix).

3. Build the file list from the scope's artifacts. Apply the 30-file cap. If more than 30 files, split into batches as described in scope-detection.md.

4. Confirm scope and file list with the user before proceeding.

---

Step 3: Dispatch Parallel Reviewers

> Read `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-simplify/references/review-prompts.md` for the three reviewer prompt templates and output format.

Dispatch three Agent tool calls **in a single message** so they run in parallel. Each call passes the model from `.arness/agent-models/code.md` (look up `arn-code-simplify-reviewer`) as the `model` parameter (see `${CLAUDE_PLUGIN_ROOT}/skills/arn-code-ensure-config/references/ensure-config.md` "Dispatch convention" for fallback behavior). The three reviewers share the same synthetic name — apply the multi-agent rule by passing the looked-up value to each call independently.

1. **Code Reuse Reviewer** -- fill the review-prompts.md template with the file list and pattern documentation. Instruct the agent to focus on duplicated logic, missed utilities, and copy-paste patterns.

2. **Code Quality Reviewer** -- fill the template. Instruct the agent to focus on unnecessary complexity, dead code, unclear naming, and overly nested logic.

3. **Efficiency Reviewer** -- fill the template. Instruct the agent to focus on N+1 patterns, redundant computations, suboptimal data structures, and unnecessary allocations.

Each agent receives:

  • `{files_to_review}`: the file list for the current batch
  • `{code_patterns}`: content of code-patterns.md
  • `{testing_patterns}`: content of testing-patterns.md
  • `{architecture}`: content of architecture.md

**Partial failure handling:** If one reviewer fails, merge findings from the other two. Record the failure in `reviewerStatus` with status `"failed"`. Add a warning: "The [axis] reviewer failed. Findings may be incomplete for that axis."

If all files fit in a single batch, dispatch once. If batched, dispatch the three reviewers for each batch sequentially (batch 1 complete, then batch 2, etc.).

---

Step 4: Merge and Present Findings

1. Collect findings from all three reviewers.

2. Deduplicate: if two reviewers flagged the same code location for overlapping reasons, merge into a single finding. Prefer the higher severity and note both axes.

3. Assign sequential IDs: `SIM-001`, `SIM-002`, etc.

4. Automatically defer findings with effort `"large"`: set status to `"deferred"` and add a note suggesting a refactoring spec for strategic improvements.

5. Collect all `patternsPreserved` entries from all reviewers.

6. Present findings to the user grouped by axis:

**Code Reuse Findings:**

  • SIM-001 [medium/small]: Ti
Read more
@appsvortex
Ships witharness

Arness — H not required. Structured AI workflows for Claude Code. From first idea to production deploy. Seven entry commands. That's all you need to remember.

3590 skills48 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
35
Star history of AppsVortex/arness on GitHub, a chart by star-history.com

Other skills on arness.

arn-assessing

arn-assessing

This skill should be used when the user says "assessing", "arness assessing", "assess", "assess codebase", "technical review",…

@appsvortex@appsvortexInstall Skill
arn-code-assess

arn-code-assess

This skill should be used when the user says "arness code assess", "arn-code-assess", "tech debt audit", "assess the project", or…

@appsvortex@appsvortexInstall Skill
arn-code-batch-cve-fix

arn-code-batch-cve-fix

This skill should be used when the user says "fix CVEs", "patch vulnerabilities", "apply security patches", "batch CVE fix",…

@appsvortex@appsvortexInstall Skill
arn-code-batch-cve-scan

arn-code-batch-cve-sca…

This skill should be used when the user says "scan for CVEs", "CVE scan", "check for vulnerabilities", "dependabot triage",…

@appsvortex@appsvortexInstall Skill
arn-code-batch-implement

arn-code-batch-impleme…

This skill should be used when the user says "batch implement", "implement all", "batch execution", "implement all features",…

@appsvortex@appsvortexInstall Skill
arn-code-batch-merge

arn-code-batch-merge

This skill should be used when the user says "batch merge", "merge batch", "arness batch merge", "arn-code-batch-merge", "merge…

@appsvortex@appsvortexInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about arn-code-simplify.

Which coding agents can use arn-code-simplify?
arn-code-simplify installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.