implementation-principles

Apply Fail Fast, Single Source of Truth, and Ports & Adapters principles to new functions and modules.

7|4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/nklisch/skills --skill implementation-principles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementation-principles
Source: https://github.com/nklisch/skills/tree/main/plugins/workflow/skills/implementation-principles
Command: npx skills add https://github.com/nklisch/skills --skill implementation-principles

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Code-level principles (Fail Fast, Single Source of Truth, Ports & Adapters enforcement) provide guardrails that improve consistency, reduce bugs, and accelerate safe feature development; this Skill auto-loads when writing new functions or modules and guides input validation, guard clauses, and avoidance of defensive boilerplate.

Core Features & Use Cases

  • Fail Fast: validate inputs at the boundary and fail loudly with clear errors.
  • Single Source of Truth: centralize variant/config definitions and derive downstream types from a single source.
  • Ports & Adapters enforcement: domain logic operates on ports, while infrastructure is implemented as adapters.
  • Use Case: apply these principles whenever adding a new feature to ensure clean interfaces and testability.

Quick Start

Enable the principle set in your project to automatically enforce best practices during feature development.

Frequently Asked Questions about implementation-principles

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

FAQPage Schema
What are the core software architecture principles for enforcing clean code boundaries?

Core software architecture principles like Fail Fast, Single Source of Truth, and Ports & Adapters enforce clean code boundaries by validating inputs loudly, centralizing definitions, and separating domain logic from infrastructure adapters.

How do I apply fail fast and guard clauses when writing new functions?

To apply fail fast and guard clauses when writing new functions, validate inputs at the boundary and fail loudly with clear errors. This avoids defensive boilerplate and ensures structured code governance during feature development.

Does domain-driven design require separating domain logic from infrastructure?

Domain-driven design requires separating domain logic from infrastructure by using Ports & Adapters enforcement. Domain logic operates strictly on ports, while infrastructure is implemented as adapters, ensuring testability and clean separation.

What is the best way to maintain a single source of truth for configuration definitions?

The best way to maintain a single source of truth for configuration definitions is to centralize variant and config definitions, deriving downstream types from that single source to reduce errors and accelerate safe feature development.

Can I use these coding principles across both small utilities and large service boundaries?

Yes, you can use these coding principles across small utilities and large service boundaries. They apply broadly during development to guide input validation, data handling, and boundary enforcement for consistent implementation.

Why should I avoid defensive boilerplate in software engineering?

You should avoid defensive boilerplate in software engineering because it obscures logic and reduces testability. Instead, embedding fail fast principles validates inputs at the boundary and fails loudly, accelerating safe feature development.