kmshdev/plugins/code-simplifier
- community
Checking that the SKILL.md file is still in the repository.
Simplify existing code while preserving behavior during an explicitly requested cleanup pass.
Install
npx vskill@latest install kmshdev/plugins/code-simplifierSKILL.md
Community Code Simplification Best Practices
Comprehensive code simplification guide for AI agents and LLMs. Contains 47 rules across 8 categories, prioritized by impact from critical (context discovery, behavior preservation) to incremental (language idioms). Each rule includes detailed explanations, real-world examples comparing incorrect vs. correct implementations, and specific impact metrics.
Core Principles
- Context First: Understand project conventions before making any changes
- Behavior Preservation: Change how code is written, never what it does
- Scope Discipline: Focus on recently modified code, keep diffs small
- Clarity Over Brevity: Explicit, readable code beats clever one-liners
When to Apply
Reference these guidelines when:
- Simplifying or cleaning up recently modified code
- Reducing nesting, complexity, or duplication
- Improving naming and readability
- Applying language-specific idiomatic patterns
- Reviewing code for maintainability issues
Rule Categories by Priority
| Priority | Category | Impact | Prefix | Rules | |
|---|---|---|---|---|---|
| 1 | Context Discovery | CRITICAL | ctx- | 4 | |
| 2 | Behavior Preservation | CRITICAL | behave- | 6 | |
| 3 | Scope Management | HIGH | scope- | 5 | |
| 4 | Control Flow Simplification | HIGH | flow- | 9 | |
| 5 | Naming and Clarity | MEDIUM-HIGH | name- | 6 | |
| 6 | Duplication Reduction | MEDIUM | dup- | 5 | |
| 7 | Dead Code Elimination | MEDIUM | dead- | 5 | |
| 8 | Language Idioms | LOW-MEDIUM | idiom- | 7 |
Reference routing
Use the category table above to choose a topic. Open the rule index only to locate the specific rule, then read that rule’s reference file.
Workflow
- Discover context: Read CLAUDE.md, lint configs, examine existing patterns
- Identify scope: Focus on recently modified code unless asked to expand
- Apply transformations: Use rules in priority order (CRITICAL first)
- Verify behavior: Ensure outputs, errors, and side effects remain identical
- Keep diffs minimal: Small, focused changes that are easy to review
How to Use
Read individual reference files for detailed explanations and code examples:
- Section definitions - Category structure and impact levels
- Rule template - Template for adding new rules
Reference Files
| File | Description | |
|---|---|---|
| references/_sections.md | Category definitions and ordering | |
| assets/templates/_template.md | Template for new rules |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/code-quality-workbench/skills/code-simplifier/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kmshdev/plugins/code-simplifier)