code-simplifier

pproenca/dot-skills · updated Apr 8, 2026

$npx skills add https://github.com/pproenca/dot-skills --skill code-simplifier
0 commentsdiscussion
summary

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.

skill.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

  1. Context First: Understand project conventions before making any changes
  2. Behavior Preservation: Change how code is written, never what it does
  3. Scope Discipline: Focus on recently modified code, keep diffs small
  4. 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

Quick Reference

1. Context Discovery (CRITICAL)

2. Behavior Preservation (CRITICAL)

3. Scope Management (HIGH)

4. Control Flow Simplification (HIGH)

5. Naming and Clarity (MEDIUM-HIGH)

6. Duplication Reduction (MEDIUM)

7. Dead Code Elimination (MEDIUM)

8. Language Idioms (LOW-MEDIUM)

Workflow

  1. Discover context: Read CLAUDE.md, lint configs, examine existing patterns
  2. Identify scope: Focus on recently modified code unless asked to expand
  3. Apply transformations: Use rules in priority order (CRITICAL first)
  4. Verify behavior: Ensure outputs, errors, and side effects remain identical
  5. Keep diffs minimal: Small, focused changes that are easy to review

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

File Description
references/_sections.md Category definitions and ordering
assets/templates/_template.md Template for new rules
metadata.json Version and reference information

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.840 reviews
  • Harper Brown· Dec 28, 2024

    We added code-simplifier from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Aarav Choi· Dec 24, 2024

    code-simplifier has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Henry Brown· Dec 24, 2024

    I recommend code-simplifier for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Carlos Khan· Dec 12, 2024

    Solid pick for teams standardizing on skills: code-simplifier is focused, and the summary matches what you get after install.

  • Shikha Mishra· Dec 8, 2024

    Solid pick for teams standardizing on skills: code-simplifier is focused, and the summary matches what you get after install.

  • Yash Thakker· Nov 27, 2024

    We added code-simplifier from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • William White· Nov 27, 2024

    I recommend code-simplifier for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Sakshi Patil· Nov 23, 2024

    I recommend code-simplifier for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Michael Gupta· Nov 19, 2024

    Solid pick for teams standardizing on skills: code-simplifier is focused, and the summary matches what you get after install.

  • Luis Ghosh· Nov 15, 2024

    code-simplifier fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 40

1 / 4