code-simplifier · aktsmm — Claude Code skill: clean up code after a session
A skill for refactoring code after a coding session: drops nested ternaries, dense one-liners and restating comments without changing behaviour.
npx skills add aktsmm/Agent-Skills --skill code-simplifier -a claude-codeWhat code-simplifier does
The skill kicks in when you want to tidy code after a task, review a PR for readability, or apply the same refactoring moves across files. Functionality stays put: run the existing tests first, then change how the code reads.
Inside you get a set of principles plus a pattern table in references/refactoring-patterns.md, which also covers equivalence traps where a rewrite changes behaviour and a format for review feedback. The skill tells the agent to follow project standards (CLAUDE.md, AGENTS.md, .editorconfig, linters) over personal taste. Scope is limited on purpose: only recently modified code gets touched unless you ask for more. That matters on a large legacy file, where the skill will not start rewriting everything.
There is a catch. Simplification slides into clever code that is hard to debug, so the rules ban new unnecessary abstractions and cramming several concerns into one function. Completion is a checklist: tests pass, behaviour unchanged, standards met.
What it helps with
- tidy code after finishing a task
- review a PR for readability before handing it off
- strip nested ternaries and dense one-liners
- align edits with project standards instead of author taste
- confirm a refactor did not change behaviour
Example prompts for the agent
- simplify the code in this file, tests must still pass
- go over my recent changes and remove unnecessary complexity
- review this PR for readability and suggest refactoring patterns
How to install code-simplifier
1Skills CLI (Vercel)
npx skills add aktsmm/Agent-Skills --skill code-simplifier -a claude-code2Manually: put the files in place
~/.claude/skills/code-simplifier/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/code-simplifier/
1Skills CLI (Vercel)
npx skills add aktsmm/Agent-Skills --skill code-simplifier -a codex2Manually: put the files in place
.agents/skills/code-simplifier/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aktsmm/Agent-Skills --skill code-simplifier -a cursor2Manually: put the files in place
.cursor/skills/code-simplifier/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aktsmm/Agent-Skills code-simplifier2Manually: put the files in place
.github/skills/code-simplifier/SKILL.md1Skills CLI (Vercel)
npx skills add aktsmm/Agent-Skills --skill code-simplifier -a gemini-cli2Platform CLI
gemini skills install https://github.com/aktsmm/Agent-Skills --path code-simplifierManually: put the files in place
.devin/skills/code-simplifier/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aktsmm/Agent-Skills --skill code-simplifier -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about code-simplifier
How do I install code-simplifier in Claude?
Run npx skills add aktsmm/Agent-Skills --skill code-simplifier -a claude-code. The skill lands in ~/.claude/skills/code-simplifier/SKILL.md.
What does code-simplifier do?
It gives the agent rules for simplifying code: preserve behaviour, follow project standards, remove nested ternaries and comments that restate the obvious. It works on recently modified code unless you widen the scope.
Does it need any setup?
It leans on your project config — CLAUDE.md, AGENTS.md, .editorconfig and linters. If those describe a style, the refactor follows them rather than the agent's own preferences.
Similar skills
Everything for Code review and refactoring →code-simplifier by other authors comes first.