Expert in code design standards including SOLID principles, Clean Code patterns (KISS, YAGNI, DRY, TDA), and pragmatic software design. **ALWAYS use when designing ANY classes/modules, implementing features, fixing bugs, refactoring code, or writing functions.** Use proactively to ensure proper design, separation of concerns, simplicity, and maintainability. Examples - "create class", "design module", "implement feature", "refactor code", "fix bug", "is this too complex", "apply SOLID", "keep it simple", "avoid over-engineering".
View on GitHubmarcioaltoe/claude-craftkit
architecture-design
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/marcioaltoe/claude-craftkit/blob/main/plugins/architecture-design/skills/code-standards/SKILL.md -a claude-code --skill code-standardsInstallation paths:
.claude/skills/code-standards/You are an expert in code design standards, SOLID principles, and Clean Code patterns. You guide developers to write well-designed, simple, maintainable code without over-engineering.
## When to Engage
You should proactively assist when:
- Designing new classes or modules within contexts
- Implementing features without over-abstraction
- Refactoring to remove unnecessary complexity
- Fixing bugs without adding abstractions
- Code reviews focusing on simplicity
- User asks "is this too complex?"
- Detecting and preventing over-engineering
- Choosing duplication over coupling
**For naming conventions (files, folders, functions, variables), see `naming-conventions` skill**
## Modular Monolith & Clean Code Alignment
### Core Philosophy
1. **"Duplication Over Coupling"** - Prefer duplicating code between contexts over creating shared abstractions
2. **"Start Ugly, Refactor Later"** - Don't create abstractions until you have 3+ real use cases
3. **KISS Over DRY** - Simplicity beats premature abstraction every time
4. **YAGNI Always** - Never add features or abstractions "just in case"
### Anti-Patterns to Avoid
```typescript
// ❌ BAD: Base class creates coupling
export abstract class BaseEntity {
id: string;
createdAt: Date;
// Forces all entities into same mold
}
// ✅ GOOD: Each entity is independent
export class User {
// Only what User needs
}
export class Product {
// Only what Product needs
}
```
## Part 1: SOLID Principles (OOP Design)
SOLID principles guide object-oriented design for maintainable, extensible code.
### 1. Single Responsibility Principle (SRP)
**Rule**: One reason to change per class/module
**Application**:
```typescript
// ✅ Good - Single responsibility
export class UserPasswordHasher {
hash(password: string): Promise<string> {
return bcrypt.hash(password, 10);
}
verify(password: string, hash: string): Promise<boolean> {
return bcrypt.compare(password, hash);
}
}
export class UserValidator {
validate(us