/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
$ npx -y skills add AppsVortex/arness --skill arn-code-simplify --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/arn-code-simplify
Context preview
The summary Claude sees to decide when to auto-load this skill.
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
SKILL.md
arn-code-simplify.SKILL.mdname: 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/step-0-fast-path.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]:
Read more
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/step-0-fast-path.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]:
Showing the first part of this file.
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.
Repo: AppsVortex/arness
Other skills on arness.
- /arn-assessing
This skill should be used when the user says "assessing", "arness assessing", "assess", "assess codebase", "technical review", "codebase assessment", "find improvements", "what should I improve", "tech debt review", "pattern compliance check", "codebase health check",
Open skill - /arn-code-assess
This skill should be used when the user says "arness code assess", "arn-code-assess", "assess codebase", "technical review", "codebase assessment", "find improvements", "what should I improve", "tech debt review", "tech debt audit", "pattern compliance check", "codebase health
Open skill - /arn-code-batch-cve-fix
This skill should be used when the user says "fix CVEs", "patch vulnerabilities", "apply security patches", "resolve security advisories", "batch CVE fix", "patch dependencies", "fix security findings", "remediate CVEs", "apply CVE fixes", "batch fix vulnerabilities", "resolve
Open skill - /arn-code-batch-cve-scan
This skill should be used when the user says "scan for CVEs", "CVE scan", "check for vulnerabilities", "find vulnerabilities", "check security advisories", "dependabot triage", "dependabot scan", "scan dependencies for security issues", "audit dependencies", "vulnerability
Open skill - /arn-code-batch-implement
This skill should be used when the user says "batch implement", "implement all", "batch execution", "implement all features", "parallel implement", "implement in parallel", "arness batch implement", "arn-code-batch-implement", "run batch implementation", "implement everything",
Open skill - /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 all PRs", "merge batch PRs", "merge the batch", "merge implemented features", "batch merge PRs", "merge open PRs", "merge all feature PRs", "combine
Open skill

