code-simplifier
Simplifies and refines code for clarity, readability, and maintainability. Reduces complexity without changing behavior. Use when simplifying, cleaning up, or reducing complexity in code.
- License 许可
- Unlicense
- 所属仓库
- saski/arnesto
- 最近更新
- 2026-11-12
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- code-simplifier
- description
- Simplifies and refines code for clarity, readability, and maintainability. Reduces complexity without changing behavior. Use when simplifying, cleaning up, or reducing complexity in code.
03 SKILL.md 正文
STARTER_CHARACTER = 🧹
When starting, announce: "🧹 Using CODE-SIMPLIFIER skill".
Scope
Default scope: code modified in the current session or specified by the user. Broader scope only when explicitly requested.
Read CLAUDE.md for project-specific coding standards before making changes.
Process
- Identify the code sections in scope
- Analyze each section for simplification opportunities
- Apply changes one at a time — run tests if available to verify behavior preservation
- Summarize what changed and why
Simplification Principles
Prioritize clarity over brevity.
- Reduce nesting depth — extract early returns, guard clauses
- Eliminate dead code, unreachable branches, unused variables
- Replace complex conditionals with named booleans or extracted functions
- Consolidate duplicated logic only when the duplication is real (same reason to change), not coincidental
- Remove comments that restate what the code already says
- Flatten callback chains or deeply nested structures
- Use domain language in names — describe what things ARE, not implementation details
Over-Simplification Anti-Patterns
These make code worse, not better. Do not apply them:
- Nested ternaries: Use if/else or switch for multiple conditions
- Dense one-liners: A readable 3-line version beats a clever 1-line version
- Premature abstraction: Three similar lines are better than a generic helper used once
- Merging unrelated concerns: Two simple functions beat one "smart" function with flags
- Stripping useful abstractions: If an abstraction improves organization or testability, keep it
- Compressing at the cost of debuggability: Code that's hard to step through with a debugger is too compressed
What NOT to Change
- Test code (unless imports/names must follow production renames)
- Public API signatures (unless explicitly requested)
- Behavior — the code must do exactly what it did before
- Code outside of scope
04 同仓库更多 Skills
visualize
Use /visualize for creating compact charts, diagrams, or other visuals inline as part of the conversation itself. It chooses among Markdown tables, Mermaid, inline HTML, and other supported in-transcript forms. Use Canvas for durable artifacts outside the transcript that users may revisit, refine, or share.
update-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
update-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
statusline
Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.
split-to-prs
Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.
shell
Runs the rest of a /shell request as a literal shell command. Use only when the user explicitly invokes /shell and wants the following text executed directly in the terminal.