🎯

code-simplifier

🎯Skill

from carvalab/k-skills

VibeIndex|
What it does

Simplifies code for enhanced readability and maintainability by refining recently modified files while preserving exact functionality.

πŸ“¦

Part of

carvalab/k-skills(9 items)

code-simplifier

Installation

πŸ“‹ No install commands found in docs. Showing default command. Check GitHub for actual instructions.
Quick InstallInstall with npx
npx skills add carvalab/k-skills --skill code-simplifier
6Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Code simplification for clarity and maintainability. Use PROACTIVELY after code is written or modified to refine recently changed files.

Overview

# Code Simplifier

Enhance code clarity, consistency, and maintainability while preserving exact functionality. Apply project-specific best practices without altering behavior. Prioritize readable, explicit code over compact solutions.

> Related Skills:

> - kavak-documentation - Query for Kavak coding standards and patterns before simplifying

> - Use kavak-platform/plati_query MCP tool to verify Kavak-specific idioms

Workflow

1. Discover Project Standards

Locate project configuration files (in priority order):

  1. .claude/CLAUDE.md, CLAUDE.md (root)
  2. .cursor/rules/.md, .cursor/rules/.mdc, .cursorrules
  3. AGENTS.md, .github/copilot-instructions.md
  4. .editorconfig, .prettierrc, .eslintrc.*

Extract coding standards and patterns. If none exist, apply general best practices.

2. Identify Target Code

  • Default: Recently modified files (git diff, git status)
  • Explicit: Files or directories specified by user
  • Broad: When instructed to review entire modules

3. Apply Refinements

Preserve Functionality

  • Never change what the code does, only how
  • Run existing tests to verify no regressions

Apply Project Standards

  • Follow discovered conventions
  • Match existing code style
  • Respect established patterns

Enhance Clarity

  • Reduce complexity and nesting
  • Eliminate redundant code
  • Use clear variable/function names
  • Avoid nested ternaries - use switch or if/else
  • Choose clarity over brevity

Maintain Balance

  • Don't create overly clever solutions
  • Don't combine too many concerns
  • Don't remove helpful abstractions
  • Three similar lines > premature abstraction

4. Verify

  1. Functionality unchanged
  2. Code is simpler and maintainable
  3. Run linters/formatters if configured

Guidelines

  • Operate autonomously after code is written/modified
  • Don't add features or make "improvements" beyond simplification
  • Don't add docstrings/comments to unchanged code
  • Trust internal code and framework guarantees

References

| Reference | Purpose |

| ----------------------------- | ------------------------------ |

| references/patterns.md | Common simplification patterns |

| references/anti-patterns.md | Code smells to refactor |

| references/examples.md | Before/after examples |