design-principles

Enforce explicit dependencies and boundary responsibility in service constructors and function signatures.

12|1|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/ovargas/virtual-team --skill design-principles-ovargas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-principles
Source: https://github.com/ovargas/virtual-team/tree/main/skills/design-principles
Command: npx skills add https://github.com/ovargas/virtual-team --skill design-principles-ovargas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design principles help ensure code is testable, maintainable, and adaptable by promoting dependency inversion and explicit boundaries between components.

Core Features & Use Cases

  • Enforces explicit dependencies and avoids creating new collaborators inside business logic.
  • Guides when to accept dependencies vs create concrete implementations, improving testability and flexibility.
  • Use Case: When designing a new service, ensure constructors and service functions declare their collaborators and rely on abstractions rather than concrete implementations to enable easy mocking and swapping.

Quick Start

Identify external collaborators for a function and rewrite it to accept them as parameters.

Frequently Asked Questions about design-principles

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

FAQPage Schema
How do I make code testable using dependency injection?

Dependency injection makes code testable by enforcing explicit dependencies and boundary responsibility. You accept external collaborators as parameters rather than creating them, enabling easy mocking and implementation swapping.

What is dependency inversion in software design?

Dependency inversion is a software design principle that decouples implementations by ensuring collaborators are injected. It relies on abstractions rather than concrete implementations to maintain testable and adaptable code.

How do I enforce explicit boundaries between components?

You enforce explicit boundaries by identifying external collaborators and rewriting constructors and service functions to accept them rather than creating them internally, documenting expected behavior at boundaries.

When should I accept dependencies vs create concrete implementations?

You should accept dependencies rather than create concrete implementations when designing a new service to improve testability and flexibility, ensuring your business logic relies on injected abstractions.

Why does creating new collaborators inside business logic reduce testability?

Creating new collaborators inside business logic reduces testability because instantiating concrete implementations directly prevents easy mocking and swapping, tightly coupling your code to specific dependencies.

Does dependency inversion work for service boundaries and function signatures?

Yes, dependency inversion applies across service boundaries, constructors, and function signatures to ensure collaborators are injected and implementations are decoupled for maintainable code.