Borrowing it
Nothing to install: this file belongs to pyramidheadshark/claude-scaffold. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/pyramidheadshark/claude-scaffold/main/.claude/skills/test-first-patterns/SKILL.mdgit clone --depth 1 https://github.com/pyramidheadshark/claude-scaffoldWrote 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.
[](https://agentmods.dev/skills/pyramidheadshark/claude-scaffold/test-first-patterns)<a href="https://agentmods.dev/skills/pyramidheadshark/claude-scaffold/test-first-patterns"><img src="https://agentmods.dev/badge/skills/pyramidheadshark/claude-scaffold/test-first-patterns.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00975 |
| Opus 5 | $0.00000 | $0.00487 |
| Sonnet 5 | $0.00000 | $0.00195 |
| Haiku 4.5 | $0.00000 | $0.00097 |
Grade A, and why
test-first-patterns 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-First Patterns
When to Load This Skill
Load when writing tests, creating .feature files, setting up conftest, discussing test strategy, or reviewing coverage.
Philosophy
Tests are written BEFORE code. Always. No exceptions.
The order is: Design Doc → BDD Scenarios → Unit Tests → Implementation.
BDD scenarios come from the design document's use cases section — they are a direct translation of business requirements into executable specifications. This makes tests the living documentation of business logic.
Two-Layer Testing Strategy
Layer 1: BDD (Behaviour-Driven Development)
BDD scenarios live in tests/features/*.feature and describe behaviour from the user's perspective. They directly correspond to use cases in design-doc.md.
Use pytest-bdd (not Behave — stays within pytest ecosystem).
Feature: User asks a question to the knowledge base assistant
Scenario: Successful answer from knowledge base
Given the knowledge base contains documents about system usage
When the user asks "How do I add a new user?"
Then the assistant returns an answer with steps
And the answer references the relevant document section
Scenario: Question outside knowledge base scope
Given the knowledge base contains documents about system usage
When the user asks "What is the weather in Moscow?"
Then the assistant responds that it cannot answer this question
And no hallucinated information is returned
Layer 2: Unit Tests (TDD Red-Green-Refactor)
Unit tests cover individual functions and classes in core/ and services/. They use pytest directly.
import pytest
from src.project_name.core.domain import KnowledgeQuery, QueryResult
def test_query_result_is_empty_when_no_documents_match():
query = KnowledgeQuery(text="unrelated question", top_k=3)
result = QueryResult(matches=[], query=query)
assert result.is_empty is True
def test_query_result_is_not_empty_when_matches_exist():
query = KnowledgeQuery(text="how to add user", top_k=3)
result = QueryResult(matches=["doc1", "doc2"], query=query)
assert result.is_empty is False
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 7d ago First seen · 144 lines · 0 tokens per session scan A 6175ca0d2974
test-first-patterns is a skill published in the GitHub repository pyramidheadshark/claude-scaffold (4 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 975 tokens. 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-08-31.
Other skills, from other repositories
write-vibe-tests
Write or refactor Mistral Vibe tests with proper decoupling. Use when adding behavior coverage, testing ports/adapters, replacing brittle mocks, creating fakes, adding characterization tests before refactors, or changing tests under tests/ for vibe/core, vibe/cli, vibe/acp, tools, config, sessions, skills, hooks, MCP…
composing-matchers
Build compound Gomega assertions by combining matchers — And/SatisfyAll (all pass), Or/SatisfyAny (any pass), Not (negate), WithTransform to map the actual before matching, Satisfy for an ad-hoc predicate, HaveValue to dereference pointers/interfaces, HaveField for struct fields and method results, HaveEach for every…
setup
Set up or update TDD Guard for the current project. Detects the test framework, installs or updates the matching reporter, and configures or migrates its configuration to match the current specification.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
nw-fp-fsharp
F# language-specific patterns, Railway-Oriented Programming, and Computation Expressions.
nw-hexagonal-testing
5-layer agent output validation, I/O contract specification, vertical slice development, and test doubles policy with per-layer examples.