smithery/groupzer0

engineering-standards

Core software engineering principles (SOLID, DRY, YAGNI, KISS) with detection patterns and refactoring guidance. Load when reviewing code quality, planning architecture, or identifying technical debt.

Installation

$ npx skills add smithery/groupzer0 --skill engineering-standards

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/groupzer0.

npx skills add smithery/groupzer0

Browse all from smithery/groupzer0

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0
LicenseMIT
More metadata
author
groupzer0
version
1.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,788 B
  • docs SUMMARY.md 229 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Engineering Standards

Foundational principles for high-quality software. Use this skill when:

  • Reviewing code for quality issues
  • Planning architectural changes
  • Identifying refactoring opportunities
  • Evaluating technical debt

SOLID Principles

Single Responsibility (SRP)

A class/module should have one reason to change.

Detection patterns:

  • Class with 5+ public methods doing unrelated things
  • Method longer than 50 lines
  • Class name contains "And" or "Manager" with mixed concerns
  • File imports from 10+ unrelated modules

Refactoring:

  • Extract class for each responsibility
  • Split into focused modules
  • Use composition over inheritance

Open/Closed (OCP)

Open for extension, closed for modification.

Detection patterns:

  • Switch/case on type with frequent additions
  • if/else chains checking instance types
  • Modifying existing code to add new features

Refactoring:

  • Strategy pattern for varying behaviors
  • Plugin architecture for extensions
  • Dependency injection for configurability

Liskov Substitution (LSP)

Subtypes must be substitutable for their base types.

Detection patterns:

  • Override that throws "not implemented"
  • Subclass that ignores parent behavior
  • Type checks before calling inherited methods

Refactoring:

  • Favor composition over inheritance
  • Extract interface for true polymorphism
  • Use abstract base with required overrides

Interface Segregation (ISP)

Clients shouldn't depend on methods they don't use.

Detection patterns:

  • Interface with 10+ methods
  • Implementing classes that stub methods as no-ops
  • "Fat" interfaces with unrelated method groups

Refactoring:

  • Split into role-specific interfaces
  • Use mixins/traits for optional behaviors
  • Compose multiple focused interfaces

Dependency Inversion (DIP)

Depend on abstractions, not concretions.

Detection patterns:

  • Direct instantiation of dependencies (new ConcreteClass())
  • Hard-coded database/API connections
  • Test files creating production instances

Refactoring:

  • Constructor injection
  • Factory pattern for complex creation
  • Interface-based dependencies

DRY (Don't Repeat Yourself)

Detection patterns:

  • Copy-pasted code blocks (3+ occurrences)
  • Similar functions with minor variations
  • Duplicated validation logic
  • Repeated configuration values

Refactoring:

  • Extract shared function/class
  • Parameterize variations
  • Create configuration constants
  • Use template method pattern

Exceptions (acceptable duplication):

  • Test code clarity (explicit over DRY)
  • Cross-boundary isolation (microservices)
  • Performance-critical paths

YAGNI (You Aren't Gonna Need It)

Detection patterns:

  • Unused parameters "for future use"
  • Abstract classes with single implementation
  • Configuration options never used
  • Speculative generalization

Guidance:

  • Build for current requirements
  • Refactor when needs emerge
  • Delete dead code immediately
  • Prefer simple over flexible

KISS (Keep It Simple, Stupid)

Detection patterns:

  • Cyclomatic complexity > 10
  • Nested callbacks/promises 4+ deep
  • Generic solutions for specific problems
  • Framework overkill for simple tasks

Refactoring:

  • Flatten control flow
  • Extract named functions
  • Use early returns
  • Choose boring technology

Code Smells Quick Reference

Smell Symptom Fix
Long Method >50 lines, multiple concerns Extract method
Large Class >500 lines, many responsibilities Extract class
Feature Envy Method uses other class more than own Move method
Data Clumps Same fields appear together Extract object
Primitive Obsession Strings/ints for domain concepts Value objects
Switch Statements Type-based switching Polymorphism
Parallel Inheritance Every subclass needs partner subclass Merge hierarchies
Lazy Class Class doing too little Inline class
Speculative Generality Unused abstraction Remove it
Temporary Field Field only set sometimes Extract class

When to Apply

Always apply:

  • SRP, DRY for production code
  • KISS for all code

Apply with judgment:

  • OCP when extension points are clear
  • ISP when interfaces grow beyond 5 methods
  • DIP at module boundaries

Defer:

  • YAGNI violations until pattern emerges 3+ times

See [references/refactoring-catalog.md](references/refactoring-catalog.md) for detailed refactoring techniques.