nathankim0/clean-architecture-skills/kent-beck-style
Claude Code and agent skill by nathankim0/clean-architecture-skills
- community
Checking that the SKILL.md file is still in the repository.
Review code following Kent Beck's refactoring philosophy and simple design principles. Detects code smells, guides refactoring techniques, and promotes incremental improvement (YAGNI, KISS). Use when reviewing code quality, refactoring, or improving code readability.
Install
npx vskill@latest install nathankim0/clean-architecture-skills/kent-beck-styleSKILL.md
Kent Beck Style Coding Review Skill
Overview
This skill analyzes and reviews code based on Kent Beck's refactoring philosophy and simple design principles. It focuses on code smells detection, refactoring techniques, and incremental design improvement.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler (Refactoring, foreword by Kent Beck)
When to Use
- When user requests "code smell" detection or "refactoring" guidance
- When asked about "code quality", "readability", or "maintainability"
- When reviewing code for improvement opportunities
- When asked about "YAGNI", "KISS", or "simple design"
- When improving naming, extracting methods, or removing duplication
Core Design Principles
Simple Design (4 Rules of Simple Design)
Kent Beck's rules in priority order:
- Passes the Tests - Code must work correctly
- Reveals Intent - Code should clearly express its purpose
- No Duplication - DRY (Don't Repeat Yourself)
- Fewest Elements - Minimize classes, methods, and code
YAGNI (You Aren't Gonna Need It)
- Don't add functionality until it's actually needed
- Avoid speculative generality
- Build for today's requirements, not imagined futures
KISS (Keep It Simple, Stupid)
- Prefer simple solutions over clever ones
- Complexity is the enemy of maintainability
- If it's hard to explain, it's probably too complex
Incremental Design
- Make small, safe changes
- Refactor continuously as you code
- Design emerges through refactoring
Code Smells Catalog
1. Bloaters
Code that has grown too large to handle.
Long Method
- Methods doing too many things
- Difficult to understand at a glance
- Refactoring: Extract Method, Replace Temp with Query
Large Class
- Class with too many responsibilities
- Too many instance variables
- Refactoring: Extract Class, Extract Subclass
Primitive Obsession
- Overuse of primitives instead of small objects
- Using strings for phone numbers, money, etc.
- Refactoring: Replace Primitive with Object, Introduce Parameter Object
Long Parameter List
- Methods with too many parameters
- Hard to understand and call correctly
- Refactoring: Introduce Parameter Object, Preserve Whole Object
Data Clumps
- Groups of data that always appear together
- Refactoring: Extract Class, Introduce Parameter Object
2. Object-Orientation Abusers
Improper application of OO principles.
Switch Statements
- Repeated type-based switch/case or if/else chains can justify polymorphism
- Keep a short, exhaustive switch when the cases are a closed set and it is easier to understand
- Refactoring: Replace Conditional with Polymorphism, Replace Type Code with Subclasses
Temporary Field
- Fields only set in certain circumstances
- Refactoring: Extract Class, Introduce Null Object
Refused Bequest
- Subclass doesn't use inherited methods
- Refactoring: Replace Inheritance with Delegation
Alternative Classes with Different Interfaces
- Classes doing the same thing with different method names
- Refactoring: Rename Method, Extract Superclass
3. Change Preventers
Code that makes changes difficult.
Divergent Change
- One class changes for multiple reasons
- Violates Single Responsibility Principle
- Refactoring: Extract Class
Shotgun Surgery
- One change requires modifications in many classes
- Refactoring: Move Method, Move Field, Inline Class
Parallel Inheritance Hierarchies
- Creating a subclass requires creating another subclass elsewhere
- Refactoring: Move Method, Move Field
4. Dispensables
Code that is unnecessary.
Duplicate Code
- Same code structure in multiple places
- Refactoring: Extract Method, Extract Class, Pull Up Method
Dead Code
- Unreachable or unused code
- Refactoring: Remove Dead Code
Speculative Generality
- Unused abstractions created "just in case"
- Refactoring: Collapse Hierarchy, Inline Class, Remove Parameter
Comments (as smell)
- Comments explaining what code does (instead of why)
- Often indicates code that should be clearer
- Refactoring: Extract Method, Rename Method
5. Couplers
Code with excessive coupling.
Feature Envy
- Method uses another class's data more than its own
- Refactoring: Move Method, Extract Method
Inappropriate Intimacy
- Classes too dependent on each other's internals
- Refactoring: Move Method, Move Field, Change Bidirectional to Unidirectional
Message Chains
- Long chains of method calls (a.b().c().d())
- Refactoring: Hide Delegate, Extract Method
Middle Man
- Class that only delegates to another class
- Refactoring: Remove Middle Man, Inline Method
Refactoring Techniques
Composing Methods
Extract Method
The most important refactoring. Turn code fragments into methods with intention-revealing names.
Inline Method
When method body is as clear as its name.
Replace Temp with Query
Replace temporary variables with method calls.
Moving Features
Move Method
Move method to the class that uses it most.
Move Field
Move field to where it's used most.
Extract Class
When a class does work that should be done by two.
Inline Class
When a class isn't doing much.
Organizing Data
Encapsulate Field
Make fields private, provide accessors.
Replace Data Value with Object
When a data item needs additional behavior.
Simplifying Conditionals
Decompose Conditional
Extract condition and branches into methods.
Consolidate Conditional Expression
Combine conditionals that have the same result.
Replace Nested Conditional with Guard Clauses
Use early returns to reduce nesting.
Simplifying Method Calls
Rename Method
Names should reveal intent.
Add/Remove Parameter
Keep parameter lists minimal and meaningful.
Introduce Parameter Object
Group related parameters.
Preserve Whole Object
Pass the object instead of extracting values.
Intention-Revealing Code
Magic Numbers and Literals
Name non-obvious literals and business rules. Reuse existing platform or domain constants; keep conventional literals inline when their meaning is already clear.
Naming Guidelines
- Variables: Nouns describing what they hold
- Functions: Verbs describing what they do
- Booleans: Questions that can be answered yes/no
- Classes: Nouns describing what they represent
Self-Documenting Code
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/kent-beck-style/skills/kent-beck-style/SKILL.md
Popularity
- Repository stars
- 108
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. 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
[](https://verified-skill.com/skills/nathankim0/clean-architecture-skills/kent-beck-style)