Simplify

From x-cmd/x-cmd · View interactive version

Simplify is an AI agent skill from the GitHub repository x-cmd/x-cmd. Review code for readability, reuse, and simplicity. Triggered by "/simplify" when user wants to refactor complex code, remove duplication, or improve clarity.

How to use this skill

Skill file

Code Simplifier

Trigger

Use when:

Do NOT use when:

Steps

Step 1: Gather Code

git diff main..HEAD --stat

For specific files:

cat path/to/file

Step 2: Analyze Issues

Checklist:

Step 3: Generate Report

Use the output format below.

Output Format

## Simplification Review

### Readability Issues
| File | Line | Issue | Suggestion |
|------|------|-------|------------|
| ... | ... | ... | ... |

### Duplication Found

file1:X and file2:Y are identical

→ Extract to shared module


### Complexity Concerns
- [Specific issues]

### Suggested Refactors
1. [Action with file:line]
2. [Action with file:line]

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.