testability

Enforce testable design rules for dependency injection, pure functions, seams, and observable state.

6|3|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/alo-exp/silver-bullet --skill testability-alo-exp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testability
Source: https://github.com/alo-exp/silver-bullet/tree/main/forge/skills/testability
Command: npx skills add https://github.com/alo-exp/silver-bullet --skill testability-alo-exp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Every design, plan, and implementation MUST produce code that is easy to test in isolation. If it's hard to test, the design is wrong — not the test.

Why this matters: Untestable code is unverifiable code. When a simple test cannot be written for a component, it's because the component has too many hidden dependencies, side effects, or tightly coupled concerns. Testability is a direct measure of design quality.

Core Features & Use Cases

  • Enforces dependency injection over hard-wiring to ensure testability
  • Promotes pure functions for business logic and observable state for verifiable behavior
  • Provides seams for substituting components to enable testing with mocks or fakes

Quick Start

Run the planning and review checks to apply dependency injection, pure functions, seams, and observable state to a non-trivial change.

Frequently Asked Questions about testability

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

FAQPage Schema
Why is my code so hard to test in isolation?

Code is hard to test in isolation when it has hidden dependencies, side effects, or tightly coupled concerns. Testability rules enforce dependency injection and pure functions to fix these design flaws, ensuring verifiable behavior.

How do I design seams for substituting components during testing?

Designing seams involves creating clear boundaries where dependencies are injected rather than hard-wired. This allows substituting components with mocks or fakes during testing, enabling isolation and reducing the test surface.

What is the best way to ensure verifiable behavior in business logic?

The best way to ensure verifiable behavior is using pure functions for business logic alongside observable state. This approach eliminates hidden side effects, making outputs deterministic and directly testable.

When do I need dependency injection for testability?

You need dependency injection whenever a component relies on external services or state. Replacing hard-wiring with injection satisfies testability requirements, allowing you to isolate components and mock dependencies during code reviews.

How do I apply testability rules during code reviews and refactoring?

Apply testability rules during reviews by checking for dependency injection over hard-wiring, pure business logic, and observable state. Refactor tightly coupled code by introducing seams to isolate components and reduce the test surface.