# Simplify

> A Claude skill from sjarmak/agent-workflows.

- **Type:** Skill
- **Install:** `agentstack add skill-sjarmak-agent-workflows-simplify`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [sjarmak](https://agentstack.voostack.com/s/sjarmak)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [sjarmak](https://github.com/sjarmak)
- **Source:** https://github.com/sjarmak/agent-workflows/tree/main/skills/simplify

## Install

```sh
agentstack add skill-sjarmak-agent-workflows-simplify
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Review changed code for reuse, quality, and efficiency, then fix any issues found.

## Arguments

$ARGUMENTS — format: `[file path | glob pattern | blank]`

- If a file path or glob is provided, scope the review to those files.
- If no argument is provided, review all uncommitted changes via `git diff`.

## Parse Arguments

Extract:

- **scope**: a file path, glob pattern, or empty (defaults to uncommitted changes)

## Phase 1: Identify Changes

1. If scope is empty, run `git diff --name-only` to list changed files. If there are no uncommitted changes, check `git diff --name-only HEAD~1` for the last commit.
2. If scope is a path or pattern, resolve matching files.
3. For each file, run `git diff` (or `git diff HEAD~1` if already committed) to get the actual changes.
4. Present the scope to the user: file count, total lines changed, and a one-line summary per file.

## Phase 2: Analyze

For each changed file, look for:

- **Unnecessary complexity** — can this be simpler without losing clarity?
- **Duplicated code** — shared logic that should be extracted
- **Dead code** — unused imports, unreachable branches, commented-out code
- **Over-engineering** — abstractions that aren't needed yet
- **Missing error handling** — at system boundaries only (user input, external APIs)

## Phase 3: Apply Fixes

Apply fixes directly — don't just report issues. For each fix:

1. Make the change
2. Verify the file still parses / compiles
3. If tests exist, run them after all changes to confirm nothing broke

## Rules

- **Scope discipline**: only refine recently modified code unless the user explicitly asks for broader review.
- **Preserve functionality**: never change what the code does, only how it does it.
- **Prefer deletion over addition**: the best code is code that doesn't exist.
- **Clarity over brevity**: explicit code is often better than compact code. Avoid:
  - Overly clever solutions that are hard to understand
  - Combining too many concerns into single functions
  - Removing helpful abstractions that improve code organization
  - Dense one-liners or nested ternaries that sacrifice readability
  - Changes that make the code harder to debug or extend
- **No cosmetic drift**: don't reformat code you didn't change for functional reasons.
- **Run tests**: always verify after changes.

## Pipeline Position

- Runs after implementation, before code review and commit.
- In `/focus`, this is the simplify phase between execute and review.
- Can be used standalone on any codebase at any time.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [sjarmak](https://github.com/sjarmak)
- **Source:** [sjarmak/agent-workflows](https://github.com/sjarmak/agent-workflows)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-sjarmak-agent-workflows-simplify
- Seller: https://agentstack.voostack.com/s/sjarmak
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
