Code Simplifier
Refactors recently-touched code for clarity while proving behavior is unchanged -- kills nested ternaries and magic numbers.
Test report
- Verdict
- Tested · Works
- Score
- Tested
- Jul 15, 2026
- Environment
- Claude Code 2.x (agent harness)
- Upstream re-checked
- Aug 10, 2026 · 9dfc65f
Ran a real node vm test of 80 input combinations against the original, a naive baseline refactor, and the skill-guided refactor of a discount-pricing function: 0 mismatches for both, but only the skill version actually eliminated the nested ternary and inlined magic numbers as the skill's own rules demand -- the baseline kept one nested ternary out of natural habit.
Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works
- Installs cleanly 5/5
- Triggers reliably 5/5
- Output vs. baseline 8/10
- Docs & honesty 5/5
What Code Simplifier does
A single-file prompt that pushes Claude to simplify and refactor code just written or modified, favoring explicit if/else chains and named functions over nested ternaries and dense one-liners, while never changing behavior. Triggers on simplify/refactor/clean-up-code phrasing in English or Chinese, and is designed to run proactively after code changes rather than only on explicit request.
How to install Code Simplifier
git clone https://github.com/fanqingxuan/awesome-skills
cd awesome-skills
mkdir -p ~/.claude/skills
cp -r skills/code-simplifier ~/.claude/skills/code-simplifier
Skills live in ~/.claude/skills/ (global) or .claude/skills/
(per-project). Restart Claude Code after installing.
Commands — how to trigger Code Simplifier
-
/code-simplifierRefactors recently-touched code for clarity while proving behavior is unchanged -- kills nested ternaries and magic numbers.
It also activates on plain-language prompts like these:
-
Clean up this nested ternary pricing function I just wrote -
Simplify this calcPrice function without changing its behavior -
Refactor this messy discount logic into clearer if/else code
Frequently asked questions
- Is the Code Simplifier skill free?
- Yes. The skill itself is free from fanqingxuan/awesome-skills. SkillProof publishes the install command and an independent test verdict at no cost.
- Does Code Simplifier work with Claude Code?
- We tested it with Claude Code 2.x (agent harness) on Jul 15, 2026. Verdict: Tested · Works. Ran a real node vm test of 80 input combinations against the original, a naive baseline refactor, and the skill-guided refactor of a discount-pricing function: 0 mismatches for both, but only the skill version actually eliminated the nested ternary and inlined magic numbers as the skill's own rules demand -- the baseline kept one nested ternary out of natural habit.
- What is the Code Simplifier SkillProof Score?
- 9.2/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 8/10, docs & honesty 5/5.
- How do I install Code Simplifier?
- Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
- Can I use Code Simplifier with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
- The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.