From kimchi
Enforces simplicity principles like YAGNI, preferring duplication over wrong abstractions, and hardcoding first. Use when designing solutions, implementing features, or considering abstractions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kimchi:simplicity-enforcementThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Complexity is the enemy. Every abstraction, configuration option, and "extensible" pattern is a cost. Pay it only when you must.
Complexity is the enemy. Every abstraction, configuration option, and "extensible" pattern is a cost. Pay it only when you must.
Core principle: Prefer simple solutions over clever ones. Always.
Violating the letter of these rules is violating the spirit of simplicity.
Every implementation decision. No exceptions.
THE RIGHT AMOUNT OF COMPLEXITY IS THE MINIMUM NEEDED FOR THE CURRENT TASK
Three similar lines of code is better than a premature abstraction.
If you're not sure an abstraction is right:
class DocumentUploadService def upload(file) validate_size(file) validate_type(file) store_in_s3(file) end end
Two cases. Let it sit. Extract when you see the third.
</Good>
<Bad>
```ruby
# Premature abstraction
class GenericUploadService
def initialize(validator:, storage:, processor: nil)
@validator = validator
@storage = storage
@processor = processor
end
def upload(file)
@validator.validate(file)
processed = @processor&.process(file) || file
@storage.store(processed)
end
end
Over-engineered for two use cases
Don't build for hypothetical future requirements.
```ruby # Build what's needed now class ImageResizer def resize(file, dimensions) ImageProcessing::Vips .source(file) .resize_to_fill(*dimensions) .call end end ``` ```ruby # Hypothetical future support class ImageResizer STRATEGIES = { vips: VipsStrategy, imagemagick: ImageMagickStrategy, cloudinary: CloudinaryStrategy, # "in case we switch" }def initialize(strategy: :vips) @strategy = STRATEGIES[strategy].new end end
</Bad>
### Hardcode First, Configure Later
If a value won't change soon, hardcode it.
<Good>
```ruby
AVATAR_SIZES = [32, 128, 512].freeze
BUCKET = 'avatars'
```ruby
config.avatar_sizes = [32, 128, 512] # In YAML config
config.avatar_bucket = ENV['AVATAR_BUCKET'] # When it's always 'avatars'
```
Don't provide multiple ways to accomplish the same thing.
```ruby user.avatar_url(:medium) ``` ```ruby user.avatar_url user.get_avatar_url user.fetch_avatar(size: :medium) Avatar.url_for(user) ```| Excuse | Reality |
|---|---|
| "We might need this later" | Build it later. YAGNI. |
| "It's more flexible this way" | Flexibility you don't need is complexity you pay for now. |
| "DRY says extract it" | DRY applies at 3+ repetitions with clear pattern, not 2. |
| "Enterprise patterns are best practice" | Factory/Strategy/Observer for one use case is anti-practice. |
| "Configuration makes it reusable" | Configuration for fixed values is noise. |
| "What if requirements change?" | They will. Refactor then, with full context. Cheaper than guessing now. |
| "It's only a little more complex" | Complexity compounds. Every "little" addition adds up. |
ALL of these mean: STOP. Delete. Write the simple version.
Before completing:
Factory, Strategy, Observer, Visitor patterns are rarely needed. If you have one implementation, you don't need a pattern.
"What if we need to support X later?" — Build it later. You'll have more context then.
Duplication is better than wrong abstraction. Two similar functions are fine. Extract at three.
If something is unused, delete it. Don't rename to _var, re-export, or add # removed comments.
npx claudepluginhub tromml/kimchi --plugin kimchiApplies KISS, YAGNI, and Principle of Least Astonishment to simplify code when designing solutions, adding features, or refactoring.
Guides decisions to add features or abstractions only when required by current concrete requirements, avoiding unnecessary complexity.
Reviews Rails code for simplicity, identifying anti-patterns, code smells, YAGNI violations, long methods, god objects, and unnecessary abstractions.