Back to Skills

pm7y-simplify

verified

Explicitly simplifies code by removing unnecessary abstractions, inlining single-use functions, reducing nesting, and applying YAGNI. Produces cleaner, more maintainable code. Use this skill when: - Code feels over-engineered or hard to follow - There are unnecessary abstractions or indirection - Functions are used only once and could be inlined - Nesting is deep and could be flattened - Code has speculative features that aren't needed

View on GitHub

Marketplace

pm7y-marketplace

pm7y/pm7y-marketplace

Plugin

pm7y-claude-code

Repository

pm7y/pm7y-marketplace

skills/pm7y-simplify/SKILL.md

Last Verified

January 22, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/pm7y/pm7y-marketplace/blob/main/skills/pm7y-simplify/SKILL.md -a claude-code --skill pm7y-simplify

Installation paths:

Claude
.claude/skills/pm7y-simplify/
Powered by add-skill CLI

Instructions

# Code Simplification Skill

Explicitly simplifies code by removing unnecessary complexity while preserving all existing behavior.

---

## Overview

This skill identifies and removes unnecessary complexity including:

- **Unnecessary abstractions** - Wrapper functions, unnecessary classes, over-generalized utilities
- **Single-use functions** - Functions called exactly once that could be inlined
- **Deep nesting** - Nested conditionals and loops that could be flattened
- **YAGNI violations** - Speculative features, unused parameters, premature configurability
- **Indirection** - Unnecessary delegation, pass-through functions, redundant layers

**Output:** Simpler code that does the same thing with less complexity.

**When to use:**

- After implementing a feature that feels over-engineered
- When inheriting code that's hard to understand
- Before a code review to catch unnecessary complexity
- When refactoring legacy code
- When code has grown organically and accumulated cruft

---

## Simplification Process

### Step 1: Identify the Target Code

If specific files/functions are provided, focus there. Otherwise:

```
# Find recently modified files
git diff --name-only HEAD~5

# Or find files with high complexity indicators
# (deep nesting, many small functions, lots of indirection)
```

Read the target code thoroughly before making changes.

### Step 2: Find Unnecessary Abstractions

**Wrapper functions that add no value:**
```
Pattern: Functions that just call another function with same/similar args
```

Before:
```typescript
function getUserById(id: string) {
  return fetchUser(id)
}

function fetchUser(id: string) {
  return api.get(`/users/${id}`)
}
```

After:
```typescript
function getUserById(id: string) {
  return api.get(`/users/${id}`)
}
```

**Over-generalized utilities:**

Before:
```typescript
function processItems<T>(items: T[], processor: (item: T) => T): T[] {
  return items.map(processor)
}

// Usage (only place it's called)
const processed = proces

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
9026 chars