# code-simplify

The code-simplify skill simplifies existing code without changing its behavior. Use it for a focused cleanup when the user explicitly asks for less complexity.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 186 installs · ★ 5 repo stars
- Author: ulpi-io
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ulpi-io/skills/tree/HEAD/code-simplify/SKILL.md
- Updated: 2026-08-31
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/code-simplify

## What it does

The skill reads the target, nearby callers, and relevant tests before editing. It establishes a useful check, then works through small readability changes: dead-code removal, boolean cleanup, flatter control flow, less duplication, local renames, and narrowly scoped helper extraction.

Checks run again after each edit. A change that affects observable behavior or causes a regression is reverted, while safe improvements remain. The skill is not for bug fixes, performance tuning, architecture redesign, or generated files. It runs only after an explicit request to simplify or clean up existing code.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add ulpi-io/skills --skill code-simplify -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/code-simplify/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/code-simplify/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add ulpi-io/skills --skill code-simplify -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/code-simplify/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add ulpi-io/skills --skill code-simplify -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/code-simplify/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install ulpi-io/skills code-simplify
```

2. **Manually: put the files in place**
- File: `.github/skills/code-simplify/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add ulpi-io/skills --skill code-simplify -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/ulpi-io/skills --path code-simplify
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/code-simplify/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add ulpi-io/skills --skill code-simplify -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ulpi-io/skills/tree/HEAD/code-simplify/SKILL.md

## When to use it
- flatten nested conditionals safely
- remove dead branches and unused code
- reduce duplication in local logic
- rename unclear local symbols
- verify cleanup without changing behavior

## Example prompts
- Simplify this file while preserving behavior and error handling.
- Clean up `auth.ts`, then inspect its callers and tests.
- Reduce complexity in this section with guard clauses, without changing the public contract.

## Similar
- [ce-simplify-code](https://affpapa.org/en/nevibecode/skills/ce-simplify-code.md) — skill · 3800 installs
- [review-and-simplify-changes](https://affpapa.org/en/nevibecode/skills/review-and-simplify-changes.md) — skill · 872 installs
- [simplify-and-harden](https://affpapa.org/en/nevibecode/skills/simplify-and-harden.md) — skill · 543 installs
- [simplify](https://affpapa.org/en/nevibecode/skills/legendapp-simplify.md) — skill · 479 installs
- [simplify-skill](https://affpapa.org/en/nevibecode/skills/simplify-skill.md) — skill · 540 installs
- [absolute-simplify](https://affpapa.org/en/nevibecode/skills/absolute-simplify.md) — skill · 336 installs

From the same set: [ulpi-io/skills](https://affpapa.org/en/nevibecode/by/ulpi-io/skills.md) — 49 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
