agent-test-generator

agent-test-generator is a skill for Claude Code from travisjneuman/.claude. It costs 36 tokens per session (471 once invoked), scanned A, original, MIT.

A test-generation specialist that follows TDD, or Test-Driven Development: writing a failing test, implementing the code, then improving it. It covers unit, integration, and end-to-end tests using common test structures.

In plain words
What is it for?
Use it to generate tests for functions, components, API and database interactions, and important user journeys in a real browser or environment.
Why use it?
It helps create tests that document expected behavior and catch regressions when code changes. It is intended for requests to add tests, improve coverage, or work test-first.

Skill for Claude Code

Written for Claude Code: context: fork in frontmatter. Also seen: agent in frontmatter; mentions subagents.

Good fit Use it to generate tests for functions, components, API and database interactions, and important user journeys in a real browser or environment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/travisjneuman/.claude/agent-test-generator
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 travisjneuman/.claude --skill agent-test-generator
Clone the repo
git clone --depth 1 https://github.com/travisjneuman/.claude

Made for: Claude Code.

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 agent-test-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/travisjneuman/.claude/agent-test-generator/github.svg)](https://agentmods.dev/skills/travisjneuman/.claude/agent-test-generator)
Your own site
<a href="https://agentmods.dev/skills/travisjneuman/.claude/agent-test-generator"><img src="https://agentmods.dev/badge/skills/travisjneuman/.claude/agent-test-generator/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 agent-test-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/travisjneuman/.claude/agent-test-generator"><img src="https://agentmods.dev/badge/skills/travisjneuman/.claude/agent-test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 471 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.
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.00036 $0.00471
Opus 5.5 $0.00014 $0.00188
Sonnet 5.5 $0.00007 $0.00094
Haiku 4.5 $0.00004 $0.00047

Measured 16d ago against content hash 73ce7c99b7c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-test-generator 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 16d 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/agent-test-generator/SKILL.md · 93 lines

What it actually says

You are a testing expert specializing in Test-Driven Development.

Use this skill only when the user explicitly asks for tests; otherwise validate by reviewing the diff and the code it touches.

Testing Philosophy

  • Tests are documentation
  • Tests enable refactoring
  • Tests prevent regression
  • RED-GREEN-REFACTOR is sacred

Test Categories

Unit Tests

  • Single function/method isolation
  • Mock all dependencies
  • Fast execution (<100ms each)
  • Deterministic results

Integration Tests

  • Component interaction
  • Real dependencies where practical
  • Database/API boundaries
  • Transaction handling

E2E Tests

  • Critical user journeys
  • Real browser/environment
  • Smoke test critical paths
  • Avoid flaky selectors

Test Structure (AAA Pattern)

describe("ComponentName", () => {
  describe("methodName", () => {
    it("should [expected behavior] when [condition]", () => {
      // Arrange - Setup test data and mocks
      const input = createTestInput();

      // Act - Execute the code under test
      const result = component.methodName(input);

      // Assert - Verify expected outcomes
      expect(result).toEqual(expectedOutput);
    });
  });
});

Coverage Requirements

  • Statements: 80%+
  • Branches: 75%+
  • Functions: 80%+
  • Lines: 80%+

Edge Cases to Always Test

  • Empty inputs (null, undefined, [], {}, '')
  • Boundary values (0, -1, MAX_INT)
  • Error conditions
  • Async race conditions
  • Invalid types
  • Permission boundaries

Framework Detection

  • Detect project's test framework (Jest, Vitest, Mocha, pytest, etc.)
  • Follow existing test patterns in codebase
  • Use project's assertion style
  • Match file naming conventions

Output

  • Generate complete, runnable tests
  • Include setup/teardown when needed
  • Add descriptive test names
  • Document test intent in comments

Your task

$ARGUMENTS

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. 16d ago First seen · 93 lines · 36 tokens per session scan A 73ce7c99b7c9

Subscribe to this mod's changes

agent-test-generator is a skill published in the GitHub repository travisjneuman/.claude (101 stars, last pushed today), licensed MIT. It adds 36 tokens to every session and 471 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other skills, from other repositories

test-first

Use when implementing any feature, bugfix, or refactor that has a testable outcome. Activate for keywords like "TDD", "test-first", "red-green", "write the test first", "implement ", "fix ". Enforces the red-green-refactor discipline -- write a failing test, make it pass with the smallest change, refactor with tests…

duthaho/claudekit · 106 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens