skills/code-smells/change-preventers/SKILL.md
Detect and refactor Change Preventers — flaws that hinder software evolution. Trigger: When identifying Divergent Change, Shotgun Surgery, or Parallel Inheritance Hierarchies.
npx skillsauth add johnnystefan/test-saas-business code-smells/change-preventersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill enables the agent to identify "Change Preventers" — architectural flaws that hinder software evolution by requiring widespread changes for single functional updates. The agent will apply refactoring techniques to consolidate responsibilities and reduce the ripple effect of code modifications.
Triangle → TriangleDrawing, Circle → CircleDrawing). This is Parallel Inheritance.// BAD: This class changes for DB reasons, UI reasons, and logic reasons
class ProductManager {
getProduct(id: string) {
/* DB Logic */
}
renderProductHtml() {
/* UI Logic */
}
calculateDiscount() {
/* Business Logic */
}
}
// GOOD: Responsibilities extracted into dedicated classes (SRP)
class ProductRepository {
getProduct(id: string) {
/* ... */
}
}
class ProductPresenter {
renderHtml(product: Product) {
/* ... */
}
}
class DiscountCalculator {
calculate(product: Product) {
/* ... */
}
}
// BAD: A single change to "Account" forces changes in three separate classes
class AccountTransfer {
execute(amount: number) {
/* ... */
}
}
class AccountInterest {
apply(rate: number) {
/* ... */
}
}
class AccountAudit {
log(action: string) {
/* ... */
}
}
// GOOD: Related behaviors consolidated into one class
class Account {
transfer(amount: number) {
/* ... */
}
applyInterest(rate: number) {
/* ... */
}
logAction(action: string) {
/* ... */
}
}
tools
Zustand 5 state management patterns. Trigger: When implementing client-side state with Zustand (stores, selectors, persist middleware, slices).
databases
Zod 4 schema validation patterns. Trigger: When creating or updating Zod v4 schemas for validation/parsing (forms, request payloads, adapters), including v3 -> v4 migration patterns.
development
Vitest unit testing patterns with React Testing Library. Trigger: When writing unit tests for React components, hooks, or utilities.
tools
Vite 8 (Rolldown-powered) build tool configuration, plugin API, SSR, and migration guide. Trigger: When working with vite.config.ts, Vite plugins, building libraries, or SSR apps with Vite.