← ClaudeAtlas

code-simplifierlisted

Always-active simplicity rules: no speculative abstractions, one job per function, max 30 lines, flat over nested with early returns, descriptive names, comments explain why
yeisonrestrepo/code-conductor · ★ 18 · AI & Automation · score 77
Install: claude install-skill yeisonrestrepo/code-conductor
# Code Simplifier **Always active.** Apply these rules to every piece of code written or reviewed. ## Rules ### 1. No Speculative Abstractions Solve today's problem. Do not build for hypothetical future requirements. ❌ Bad: ```typescript interface DataProcessor<T, R> { process(data: T): R; validate(data: T): boolean; } ``` ✅ Good: ```typescript function parseUserInput(raw: string): User { ... } ``` ### 2. No Premature Layers Add a layer only when it carries real logic — not to "separate concerns" theoretically. ❌ Bad: ```typescript class UserRepository { constructor(private db: UserDataAccessLayer) {} findById(id: string) { return this.db.findById(id); } } ``` ✅ Good: ```typescript async function getUserById(db: Database, id: string): Promise<User> { return db.query('SELECT * FROM users WHERE id = ?', [id]); } ``` ### 3. No Single-Implementation Interfaces Don't create an interface for a type that will only ever have one implementation. ❌ Bad: `interface Logger { log(msg: string): void }` ✅ Good: Use the class directly, or a plain function. ### 4. Functions Do One Thing (Max 30 Lines) If a function needs a comment to describe what a section does, that section should be its own function. ### 5. No Defensive Code for Impossible Cases Don't validate inputs that can't be wrong (internal calls, typed parameters, framework guarantees). ❌ Bad: ```typescript function add(a: number, b: number): number { if (typeof a !== 'number') throw new Error('a must be a n