engineering-principles

Reviews code against ten foundational software engineering principles including modularity, coupling, DRY, and scalability.

Updated Sep 14, 2026
One-click install
npx skills add https://github.com/Royrahav/my_claude_components --skill engineering-principles-royrahav
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: engineering-principles
Source: https://github.com/Royrahav/my_claude_components/tree/main/skills/engineering-principles
Command: npx skills add https://github.com/Royrahav/my_claude_components --skill engineering-principles-royrahav

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Code that works but is poorly designed becomes hard to change, test, and scale. This Skill helps you catch design problems early by applying ten foundational engineering principles — modularity, cohesion, loose coupling, scalability, CI/CD-friendliness, abstraction, encapsulation, testability, DRY, and SOLID — while writing or reviewing code, with judgment about when each principle actually matters. ## Core Features & Use Cases - Design Review: Diagnose code smells like God objects, leaky abstractions, N+1 queries, and tight coupling, each mapped to a concrete symptom and fix. - Tension-Aware Guidance: Every principle includes a "tension" note explaining when over-applying it becomes a defect itself (e.g., premature abstraction, speculative scalability). - Deep-Dive References: Four reference files provide before/after TypeScript examples for restructuring low-cohesion modules, fixing leaky abstractions, resolving DRY vs. wrong-abstraction traps, and writing scalable, CI/CD-friendly code. - Use Case: When reviewing a pull request, ask whether the new code is modular, cohesive, and loosely coupled — the Skill flags only violations tied to real symptoms like fragility or duplicated bugs, not theoretical purity. ## Quick Start Review this module for coupling, cohesion, and DRY violations and tell me which issues are worth fixing.

Frequently Asked Questions about engineering-principles

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

FAQPage Schema
How do I review code for coupling and cohesion problems?

Check cohesion by listing which fields each method touches — disjoint clusters signal two classes merged into one. Check coupling by asking whether changing a module's internals breaks its consumers; if yes, depend on a smaller stable interface instead.

When should I apply DRY vs. tolerate code duplication?

Unify code only when it represents the same knowledge with the same reason to change, like tax calculation logic. Tolerate duplication when two similar-looking blocks belong to different concerns likely to diverge, such as separate email validators for checkout and newsletter signup.

What is a leaky abstraction and how do I fix it?

A leaky abstraction forces callers to know implementation details, like requiring them to generate idempotency keys or parse raw provider responses. Fix it by reshaping the interface around the concept — expose charge(customer, amount) and hide provider-specific mechanics inside the implementation.

Does this skill cover SOLID principles in depth?

No, SOLID is only summarized here as the class-level counterpart to the module-level principles. For full definitions, code smells, and before/after TypeScript examples for each of the five SOLID principles, use the sibling solid-principles skill.

When is scalability work over-engineering?

Apply cheap scalable habits by default — pagination, bounded caches, avoiding N+1 queries, stateless handlers — since they cost almost nothing. Defer expensive architecture like sharding, queues, and multi-region replication until there is measured evidence of need.