testable-design

testable-design is a skill for Claude Code, Codex from pantheon-org/tekhne. It costs 60 tokens per session (1,623 once invoked), scanned A, original, MIT.

A guide to designing code so its parts can be tested separately, using isolated boundaries, injected dependencies, and test doubles.

In plain words
What is it for?
Use it when planning tests, improving coverage, refactoring tightly coupled code, or applying TDD, where tests guide implementation.
Why use it?
It makes hard-to-test code easier to verify without relying on databases, services, or other external systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when planning tests, improving coverage, refactoring tightly coupled code, or applying TDD, where tests guide implementation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pantheon-org/tekhne/testable-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pantheon-org/tekhne --skill testable-design
Clone the repo
git clone --depth 1 https://github.com/pantheon-org/tekhne

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testable-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/pantheon-org/tekhne/testable-design/github.svg)](https://agentmods.dev/skills/pantheon-org/tekhne/testable-design)
Your own site
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/testable-design"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/testable-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testable-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/testable-design"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/testable-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 218
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.01623
Opus 5 $0.00030 $0.00812
Sonnet 5 $0.00012 $0.00325
Haiku 4.5 $0.00006 $0.00162

Measured 9d ago against content hash 479989ef2c4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

testable-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/software-engineering/design-principles/testable-design/SKILL.md · 243 lines

How it starts

The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testable Design

Architecture and design patterns for testable code, focusing on boundary isolation and dependency injection.

When to Use

  • Designing test strategies for new features
  • Refactoring untestable code with hard dependencies
  • Improving test coverage by isolating layers
  • Evaluating whether code is testable before implementation
  • Designing boundaries that enable fast unit tests

When Not to Use

  • Class-level SOLID violations (use solid-principles)
  • Architectural boundary decisions (use clean-architecture)
  • Choosing structural patterns (use design-patterns)

Testable Design Principles

Tests Are Architecture

If code is hard to test, it's a design problem, not a testing problem.

Boundary Verification

Test at architectural boundaries, not internal implementation details:

  • Unit tests: Test pure business logic (entities, use cases) in isolation
  • Integration tests: Test boundary adapters (repositories, controllers, gateways)
  • End-to-end tests: Test complete user workflows across boundaries

Layer Isolation

Each layer should be testable in isolation:

  • Entities: Pure functions, no dependencies
  • Use Cases: Depend on interfaces (ports), not concrete implementations
  • Adapters: Test with fake use cases or real infrastructure
  • Infrastructure: Test with integration tests, not unit tests

Workflow

Step 1: Identify Hard-to-Test Code

Output: List of testability blockers.

Example:

Testability blocker: OrderService instantiates PostgresRepository in constructor.
Problem: Cannot unit test OrderService without a real database.
Refactor: Inject IOrderRepository interface; provide mock in tests.

Step 2: Apply Dependency Injection

Output: Dependencies injected via constructor or method parameters.

Template:

// Before: hard to test (concrete dependency)
class OrderService {
  private repo = new PostgresOrderRepository()
  
  async createOrder(input: OrderInput): Promise<Order> {
    // Logic using this.repo
  }
}

// After: testable (injected interface)
class OrderService {
  constructor(private repo: IOrderRepository) {}
  
  async createOrder(input: OrderInput): Promise<Order> {
    // Logic using this.repo (mockable in tests)
  }
}

Read the full file on GitHub · 243 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 243 lines · 60 tokens per session scan A 479989ef2c4c

Subscribe to this mod's changes

testable-design is a skill published in the GitHub repository pantheon-org/tekhne (10 stars, last pushed yesterday), licensed MIT. It adds 60 tokens to every session and 1,623 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code.

obra/superpowers · 17 tokens

test-driven-development

Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.

addyosmani/agent-skills · 57 tokens

writing-skills

A guide for creating and testing reusable instructions for AI agents, called skills. It applies test-driven development, or TDD—the practice of writing tests before implementation—to instruction documents.

jnMetaCode/superpowers-zh · 23 tokens

test-driven-development

Test-driven development, or TDD, is a way to build software by writing a test that fails, adding the smallest code that makes it pass, and then cleaning up the code. These instructions require that process for features, bug fixes, refactors, and behavior changes.

jnMetaCode/superpowers-zh · 20 tokens

skillshare-implement-feature

Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare. This skill enforces test-first development…

runkids/skillshare · 114 tokens

skill-authoring

Guide creating Claude Code skills with TDD and persuasion principles. Use for new skill development.

athola/claude-night-market · 22 tokens