rahulsub/code-practices-plugin/simplify

Claude Code and agent skill by rahulsub/code-practices-plugin

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Remove over-engineering and unnecessary abstractions. Use after implementing features or when code feels bloated.

Install

npx vskill@latest install rahulsub/code-practices-plugin/simplify

SKILL.md

The same SKILL.md was published earlier as rahulsub/code-practices-plugin/simplify.

Simplify Code Skill

Trigger

Use after implementing a feature, or when code feels bloated or over-engineered.

Philosophy

LLMs tend to over-engineer. The best code is code that doesn't exist. Every line is a liability. Simpler code is easier to understand, test, debug, and maintain.

Process

Step 1: Question Every Abstraction
  • Does this abstraction have more than one user?
  • If not, inline it.
  • Is this interface used by external code? If not, simplify it.
  • Are there generic solutions for specific problems? Make them specific.
Step 2: Count the Lines

Before and after. Set a target. If you have 500 lines, ask: "Can this be 200?"

Step 3: Remove These Patterns

Over-abstracted factories:

typescript
// Before: Factory that only creates one thing
class UserServiceFactory {
create(): UserService { return new UserService(); }
}
// After: Just use the class directly
const userService = new UserService();

Unnecessary interfaces:

typescript
// Before: Interface with single implementation
interface IUserRepository { ... }
class UserRepository implements IUserRepository { ... }
// After: Just the class (add interface when you need it)
class UserRepository { ... }

Config objects for fixed values:

typescript
// Before
const config = { maxRetries: 3, timeout: 5000 };
function fetch(url: string, config: Config) { ... }
// After (if values never change)
function fetch(url: string) {
const maxRetries = 3;
const timeout = 5000;
...
}

Premature error handling:

typescript
// Before: Handling impossible errors
try {
const x = 1 + 1;
} catch (e) {
// This can never throw
}
// After: Trust code that can't fail
const x = 1 + 1;
Step 4: Flatten Hierarchies
  • Deep nesting is a smell
  • Early returns over nested ifs
  • Composition over inheritance
  • Inline small helper functions called once
Step 5: Remove Dead Code
  • Unused imports
  • Unused variables
  • Commented-out code
  • Functions that are never called
  • Branches that can never execute

Output

After simplification, report:

  • Lines before: X
  • Lines after: Y
  • Reduction: Z%
  • Key simplifications made

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/rahulsub/code-practices-plugin/simplify/badge)](https://verified-skill.com/skills/rahulsub/code-practices-plugin/simplify)

Something wrong with this skill or its page? Tell us.