follow-test-patterns

follow-test-patterns is a skill for Claude Code from eveld/claude. It costs 25 tokens per session (753 once invoked), scanned A, original, MIT.

A testing guide that tells a coding assistant to inspect a project’s documented test patterns before writing tests. TDD, or test-driven development, is a practice of using tests to define and check expected behavior.

In plain words
What is it for?
Adding or changing test files while matching an existing project’s framework, imports, structure, naming, assertions, and mocking approach.
Why use it?
It prevents new tests from using the wrong file names, testing library, layout, assertions, or mocking style, and points out when the project has not documented its conventions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the workflows plugin — 29 skills, 5 commands, 17 agents shipped together

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.

agentmods
npx agentmods add skills/eveld/claude/follow-test-patterns
Any agent
npx skills add eveld/claude --skill follow-test-patterns
Clone the repo
git clone --depth 1 https://github.com/eveld/claude

Made for: Claude Code.

Or install workflows, the plugin that ships this one along with the rest of its 29 skills, 5 commands, 17 agents.

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 follow-test-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/eveld/claude/follow-test-patterns.svg)](https://agentmods.dev/skills/eveld/claude/follow-test-patterns)
Your own site
<a href="https://agentmods.dev/skills/eveld/claude/follow-test-patterns"><img src="https://agentmods.dev/badge/skills/eveld/claude/follow-test-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 753 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00025 $0.00753
Opus 5 $0.00013 $0.00377
Sonnet 5 $0.00005 $0.00151
Haiku 4.5 $0.00003 $0.00075

Measured 6d ago against content hash 93bf7aff6337, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

follow-test-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 6d 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/follow-test-patterns/SKILL.md · 135 lines

How it starts

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

Follow Test Patterns

Reference discovered test patterns when writing tests to ensure consistency with project conventions.

When to Use

  • Before writing any test file
  • When implementing test-related phases in plans
  • When user asks you to add tests

Workflow

1. Check for Pattern Document

if [ -f thoughts/notes/testing.md ]; then
  # Read and follow patterns
else
  # Prompt user to run discover-test-patterns first
  echo "No test patterns found. Run discover-test-patterns skill first."
fi

2. Read Pattern Document

Read thoughts/notes/testing.md fully to understand:

  • File naming conventions
  • Testing framework and imports
  • Test structure (table-driven, etc.)
  • Assertion style
  • Mocking approach

3. Apply Patterns to New Tests

Use the discovered patterns for:

File Naming:

  • Follow the pattern (e.g., *_test.go, *.test.ts)
  • Place alongside source or in test directory as per convention

Imports:

  • Use same testing framework (testify, jest, pytest)
  • Import same assertion libraries

Test Structure:

  • If codebase uses table-driven tests, use that pattern
  • If codebase uses describe/it blocks, use that pattern
  • Match indentation and formatting

Assertions:

  • Use same assertion style (require.Equal vs assert.Equal)
  • Follow error message conventions

Mocking:

  • Use same mocking library (mockery, jest.mock, unittest.mock)
  • Follow interface/class mocking patterns found in codebase

Alternative: Use Test-Writer Agent

For complex test generation, spawn the test-writer agent:

Task(subagent_type="workflows:test-writer",
     prompt="Generate tests for [functions] following patterns in testing.md.
     Expected behavior: [describe].
     Return test code only.")

Benefits:

  • Conserves main agent context (3k instead of 20k+)
  • Agent reads testing.md and examples in isolation
  • Returns only the test code you need
  • Follows project patterns automatically

When to use:

  • Generating multiple test files
  • Complex table-driven tests
  • During phased implementation (see spawn-implementation-agents)

Read the full file on GitHub · 135 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. 6d ago First seen · 135 lines · 25 tokens per session scan A 93bf7aff6337

Subscribe to this mod's changes

follow-test-patterns is a skill published in the GitHub repository eveld/claude (10 stars, last pushed 7mo ago), licensed MIT. It adds 25 tokens to every session and 753 once invoked, about $0.0001 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-08-31.