code-simplifier skill
✓ VerifiedRefactor existing code to improve clarity and maintainability while preserving original behavior and project-specific conventions.
- GitHub stars
- 249
- Files
- 2
- Last commit
- Nov 5, 2026
- License
- MIT
- Allowed tools
- —
What does the code-simplifier skill do?
code-simplifier is an agent skill. Refactor existing code to improve clarity and maintainability while preserving original behavior and project-specific conventions.
Summary generated from the skill's SKILL.md.
About the code-simplifier skill
Refactoring existing code to improve clarity and maintainability while preserving original behavior is the primary function of this skill. Developers use it when they need to clean up recent changes or simplify complex logic within specific files or diffs. An agent should load this tool when tasked with reducing unnecessary nesting, removing duplication, or improving variable names without altering the public interfaces, outputs, or side effects of the software.
Instead of imposing a generic style, the skill derives import styles, function syntax, and error handling patterns from the existing project environment. It looks for guidance in files like AGENTS.md or CLAUDE.md to ensure all rewrites follow local conventions. The process focuses on making logic easier to follow by preferring explicit branches over dense one-liners or nested ternaries. It avoids repository-wide refactors by staying within the scope of the identified changes or the files provided by the user.
What an agent can do with it
- 1Clean up recent code changesAsk the agent to simplify logic in a specific file or a recent diff to make it more readable.
- 2Maintain project-specific coding stylesRequest a refactor that strictly adheres to the existing framework patterns and type annotations found in the repository.
- 3Reduce logic complexityInstruct the agent to remove deep nesting and redundant code while keeping the original behavior intact.
- 4Propose non-destructive code improvementsAsk for a review of a code block to suggest improvements without actually editing the files.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the code-simplifier skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the code-simplifier skill in Claude Code
~/.claude/skills/code-simplifier/SKILL.md
$ npx degit feiskyer/codex-settings/skills/code-simplifier ~/.claude/skills/code-simplifierInstall the code-simplifier skill in Claude Code (project)
.claude/skills/code-simplifier/SKILL.md
$ npx degit feiskyer/codex-settings/skills/code-simplifier .claude/skills/code-simplifierInstall the code-simplifier skill in Codex
~/.agents/skills/code-simplifier/SKILL.md
$ npx degit feiskyer/codex-settings/skills/code-simplifier ~/.agents/skills/code-simplifierInstall the code-simplifier skill in Gemini CLI
~/.gemini/skills/code-simplifier/SKILL.md
$ npx degit feiskyer/codex-settings/skills/code-simplifier ~/.gemini/skills/code-simplifierInstall the code-simplifier skill in Claude.ai
npx degit feiskyer/codex-settings/skills/code-simplifier code-simplifier && zip -r code-simplifier.zip code-simplifier # claude.ai → Customize → Skills → + → Create skill → Upload a skill → code-simplifier.zip
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablefeiskyer/codex-settings/skills/code-simplifier is public and reachablegithub.com/feiskyer/codex-settings/tree/HEAD/skills/code-sim ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-05github.com/feiskyer/codex-settings/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/feiskyer/codex-settings/blob/HEAD/skills/code-sim ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/feiskyer/codex-settings/blob/HEAD/skills/code-sim ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 28 linesgithub.com/feiskyer/codex-settings/blob/HEAD/skills/code-sim ↗Pass
SKILL.md
View on GitHubCode Simplifier
Make code easier to understand and maintain without changing what it does. Prefer readable, explicit code over compact or clever rewrites.
Scope and conventions
Use the user's named files or diff. Otherwise, focus on code touched in the current task or clearly identified recent changes; ask for a target if none is evident. Inspect surrounding code as needed without turning a local cleanup into a repository-wide refactor. For review-only requests, propose changes without editing.
Follow applicable project guidance, such as AGENTS.md or CLAUDE.md, and the conventions in nearby code. Derive import style, function syntax, type annotations, framework patterns, and error handling from that project rather than imposing a different style.
Refinement criteria
- Preserve observable behavior, including public interfaces, outputs, errors, side effects, and evaluation order. Treat bug fixes or behavior changes as separate work unless requested.
- Reduce unnecessary nesting, duplication, and indirection where doing so makes the logic easier to follow. Keep helpful abstractions and separate unrelated concerns.
- Improve names and remove comments that merely restate the code; retain comments that explain intent or non-obvious constraints.
- Prefer explicit branches over nested ternaries or dense one-liners when they obscure the logic. Fewer lines alone is not an improvement.
Completion
Finish the scoped cleanup and validate it using checks appropriate to the change and the repository's requirements. For non-obvious rewrites, check relevant edge cases against the original behavior. If behavioral equivalence remains unclear, retain the original form and explain the limitation.
Report significant refinements, checks run, and any remaining validation gaps. If no worthwhile simplification is found, say so without manufacturing edits.
Files in this skill
2code-simplifier skill questions
How do I install the code-simplifier skill in Claude Code?
Run npx degit feiskyer/codex-settings/skills/code-simplifier ~/.claude/skills/code-simplifier. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the code-simplifier skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
Does this tool change the functionality of the code?
No, the tool focuses on making code easier to understand without changing observable behavior, public interfaces, or side effects.
How does the tool handle project-specific coding styles?
The tool derives its style, such as import patterns and type annotations, from the existing project conventions found in the repository.
What should the agent do if no simplification is possible?
If no meaningful improvements can be made, the agent should state that no simplification was found instead of making unnecessary edits.