code-smells/change-preventers

Detect Change Preventers and recommend refactorings in software repositories.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/johnnystefan/test-saas-business --skill code-smells-change-preventers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-smells/change-preventers
Source: https://github.com/johnnystefan/test-saas-business/tree/main/skills/code-smells/change-preventers
Command: npx skills add https://github.com/johnnystefan/test-saas-business --skill code-smells-change-preventers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detects Change Preventers that force ripple edits across unrelated classes or mirrored hierarchies, preventing smooth evolution of a codebase by highlighting Divergent Change, Shotgun Surgery, and Parallel Inheritance Hierarchies and guiding architectural refactors.

Core Features & Use Cases

  • Change Pattern Detection: Monitors classes and hierarchies for repeated edits or mirrored structures to surface Divergent Change, Shotgun Surgery, and Parallel Inheritance Hierarchies.
  • Refactoring Guidance: Recommends Extract Class, Move Method, Move Field, Inline Class, and hierarchy consolidation to localize responsibilities and reduce coupling.
  • Use Case: When a new policy requires touching many files or mirroring hierarchies for UI and domain code, use this Skill to identify the offending pattern and prescribe targeted restructuring.

Quick Start

Ask the code-smells/change-preventers skill to review recent commits for divergent change, shotgun surgery, and parallel inheritance hierarchies and recommend the appropriate refactors.

Frequently Asked Questions about code-smells/change-preventers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are change preventers in code refactoring?

Change preventers are architectural code smells where a single responsibility is scattered across multiple classes, forcing ripple edits. They include Divergent Change, Shotgun Surgery, and Parallel Inheritance Hierarchies, which complicate codebase evolution.

How do I fix shotgun surgery and divergent change in my codebase?

To fix shotgun surgery and divergent change, apply refactors like Extract Class, Move Method, or Inline Class. These techniques localize responsibilities and reduce coupling by consolidating scattered fields and methods into single, cohesive classes.

When should I consolidate parallel inheritance hierarchies during a refactoring review?

Consolidate parallel inheritance hierarchies when modifications to one hierarchy force mirrored edits in another, such as pairing UI and domain subclasses. Hierarchy consolidation localizes responsibilities and stops change ripples across unrelated architectural structures.

Can I detect code smells from recent commits automatically?

Yes, you can detect code smells from recent commits by reviewing ripple patterns across classes and hierarchies. Analyzing commit history for repeated edits or mirrored structures surfaces divergent change and shotgun surgery for targeted restructuring.

What is the best way to stop change ripples across unrelated classes?

The best way to stop change ripples is identifying the offending pattern and prescribing targeted restructuring. Applying architectural refactorings like Move Field and Extract Class localizes responsibilities, preventing a new policy from touching many files.