testdata-builders

testdata-builders is a skill for Claude Code, Codex from d-o-hub/github-template-ai-agents. It costs 63 tokens per session (696 once invoked), scanned A, original, MIT.

A set of instructions for building consistent test data with reusable factories and builders. Test data is the sample information used by automated tests.

In plain words
What is it for?
Use it when writing tests, updating test utilities, seeding integration-test data, or changing fields in the data schema.
Why use it?
It replaces repeated, ad-hoc objects in tests and keeps test results stable by controlling defaults and randomness.

Skill for Claude CodeCodex

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/d-o-hub/github-template-ai-agents/testdata-builders
Any agent
npx skills add d-o-hub/github-template-ai-agents --skill testdata-builders
Clone the repo
git clone --depth 1 https://github.com/d-o-hub/github-template-ai-agents

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 testdata-builders

README.md
[![agentmods](https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/testdata-builders.svg)](https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/testdata-builders)
Your own site
<a href="https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/testdata-builders"><img src="https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/testdata-builders.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 696 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 $0.00063 $0.00696
Opus 5 $0.00032 $0.00348
Sonnet 5 $0.00013 $0.00139
Haiku 4.5 $0.00006 $0.00070

Measured 3d ago against content hash d40f58ac3f4b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testdata-builders 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 3d 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.

.agents/skills/testdata-builders/SKILL.md · 83 lines

How it starts

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

Testdata Builders

Provide consistent factories/builders for test entities to keep tests concise and deterministic.

When to Use

  • Authoring or refactoring tests.
  • Extending test utilities or seeding data for integration tests.
  • Adding new schema fields that affect test fixtures.

Workflow

  1. Catalog entities -- list required builders for all domain entities.
  2. Define defaults -- choose realistic base values aligned with project conventions.
  3. Implement builder -- pure function returning object + withOverrides pattern for customization; ensure types exported.
  4. Helpers -- add specialized utilities (e.g., makeEntityWithRelations, makeSeededRandom).
  5. Docs -- update test utilities README to explain builder usage.
  6. Usage -- refactor tests to import builders instead of ad-hoc inline objects.

Checklist

  • Builders updated whenever schema changes (CI should fail otherwise).
  • Randomness eliminated or seeded to keep snapshots stable.
  • Builders include metadata defaults (timestamps, locale, trace IDs).
  • Exported types re-used by all test suites.
  • Test utilities package has unit tests covering builder edge cases.

Example Pattern

// Builder pattern for test entities
function makeUser(overrides: Partial<User> = {}): User {
  return {
    id: `user-${nextId()}`,
    email: `user-${nextId()}@example.com`,
    name: `Test User ${nextId()}`,
    createdAt: new Date('2026-01-01T00:00:00Z'),
    ...overrides,
  };
}

// Usage: const admin = makeUser({ role: 'admin', email: '[email protected]' });

See Also

  • test-runner — Execute tests and diagnose failures
  • testing-strategy — Choose testing approaches and plan test suites
  • dogfood — Exploratory testing of web applications

Rationalizations

Rationalization Reality
"Inline test data is fine for now" Inline objects proliferate silently; builders enforce consistency and catch schema drift.
"Builders are overkill for simple entities" Simple today becomes complex tomorrow; early investment prevents ad-hoc sprawl.
"I'll reuse fixtures from other tests" Shared mutable fixtures cause order-dependent failures and hidden coupling.

Read the full file on GitHub · 83 lines

Files

What ships with it

3 files 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.

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. 3d ago First seen · 83 lines · 63 tokens per session scan A d40f58ac3f4b

Subscribe to this mod's changes

testdata-builders is a skill published in the GitHub repository d-o-hub/github-template-ai-agents (2 stars, last pushed 3d ago), licensed MIT. It adds 63 tokens to every session and 696 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-08-31.

Related

Other skills, from other repositories

code-review

Orchestrates code review by detecting the project language and architecture, then routing to the appropriate specialized review skill (code-review-go, code-review-typescript, code-review-python, code-review-php, code-review-architecture). Falls back to the generic checklist when no specific skill applies. Invoked when…

soulcodex/agentic · 80 tokens

code-review-architecture

Architecture-focused code review covering hexagonal boundary violations, DDD anti-patterns, CQRS misuse, and microservices coupling issues. Applied in addition to the language-specific review skill when architecture markers are detected. Invoked when reviewing hexagonal architectures, DDD patterns, or microservices…

soulcodex/agentic · 63 tokens

code-review-go

Deep Go-specific code review covering goroutine lifecycle, data races, error wrapping, domain modeling, and interface design. Applied in addition to the generic code-review skill when Go code is detected. Invoked when reviewing Go PRs, Go code changes, or performing Go-specific quality checks.

soulcodex/agentic · 61 tokens

code-review-php

Deep PHP-specific code review covering strict types, PHPStan compliance, PSR standards, domain modeling, and ORM boundary violations. Applied in addition to the generic code-review skill when PHP code is detected. Invoked when reviewing PHP PRs, Symfony/Laravel changes, or performing PHP-specific quality checks.

soulcodex/agentic · 66 tokens

code-review-python

Deep Python-specific code review covering type annotations, async pitfalls, mutable defaults, threading safety, and domain modeling. Applied in addition to the generic code-review skill when Python code is detected. Invoked when reviewing Python PRs, Py changes, or performing Python-specific quality checks.

soulcodex/agentic · 59 tokens

code-review-typescript

Deep TypeScript-specific code review covering type safety, ESM/CJS, async correctness, money precision, and domain modeling. Applied in addition to the generic code-review skill when TypeScript/JavaScript code is detected. Invoked when reviewing TS/JS PRs, TypeScript changes, or performing TypeScript-specific quality…

soulcodex/agentic · 71 tokens