ai-test-generation

ai-test-generation is a skill for Claude Code, Codex from petrkindlmann/qa-skills. It costs 169 tokens per session (4,669 once invoked), scanned A, original, MIT.

A staged method for using AI to write new automated tests from requirements, code changes, bug reports, or API specifications. It first identifies expected behavior and risks, then produces test cases and code for human review.

In plain words
What is it for?
Use it to generate tests from PRDs, user stories, acceptance criteria, code diffs, bug reports, OpenAPI documents, or GraphQL schemas, including success, failure, authentication, validation, and edge-case scenarios.
Why use it?
It reduces the time spent turning written requirements into test scenarios while guarding against invented interfaces and tests that make weak checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Good fit Use it to generate tests from PRDs, user stories, acceptance criteria, code diffs, bug reports, OpenAPI documents, or GraphQL schemas, including success, failure, authentication, validation, and edge-case scenarios.

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

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 ai-test-generation

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/petrkindlmann/qa-skills/ai-test-generation"><img src="https://agentmods.dev/badge/skills/petrkindlmann/qa-skills/ai-test-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 169 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,669 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
  • Socket pass 16 Nov 2026
  • Snyk warn 16 Nov 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

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 →

  • medium MCP Rug Pull · line 49
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 50
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 205
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00169 $0.04669
Opus 5.5 $0.00068 $0.01868
Sonnet 5.5 $0.00034 $0.00934
Haiku 4.5 $0.00017 $0.00467

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

Security

Grade A, and why

ai-test-generation 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 15d 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/ai-test-generation/SKILL.md · 262 lines

How it starts

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

Before starting: Check for .agents/qa-project-context.md in the project root. It carries tech stack, test frameworks, naming conventions, selector strategy, and known risk areas that dramatically improve generated test quality.

Quick Route

The pipeline is the same for every input; only the Step 1 extraction emphasis changes. Jump to the matching row, then run Steps 2-7 unchanged.

Input type Step 1 extracts Watch for
PRD / feature spec Entities, business rules, acceptance criteria, NFRs, stated assumptions Implicit requirements inferred from "seamless"/"fast" language
User story + AC Each AC → ≥1 happy + ≥1 negative scenario ACs that hide multiple behaviors in one line
Code diff (git diff main...HEAD) New/changed code paths, modified conditionals, removed behavior Regression scope: test the changed paths, not the whole module
Bug report Repro steps, expected vs actual, environment Write a test asserting expected — fails now, passes after fix
OpenAPI / GraphQL SDL Endpoints, schemas, required fields, enums, auth Validation, auth-failure, and edge cases per endpoint, not just 200s

Playwright projects also pick an agent integration mode — see Discovery Q2.

Discovery Questions

Check .agents/qa-project-context.md first — if it exists, use it and skip anything already answered there. Then clarify:

  1. What is the input source? PRD / spec, user story + AC, code diff, bug report, or API schema. Determines Step 1 extraction emphasis (see Quick Route). For an LLM/AI feature spec, stop — generate eval datasets in ai-system-testing, not Playwright specs.

Read the full file on GitHub · 262 lines

Files

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.

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. 15d ago Changed · +3 lines 2469f2086958
  2. 16d ago Changed · +9 lines b7b269607329
  3. 3mo ago First seen · 250 lines · 169 tokens per session scan A e675c3e58f7c

Subscribe to this mod's changes

ai-test-generation is a skill published in the GitHub repository petrkindlmann/qa-skills (318 stars, last pushed 16d ago), licensed MIT. It adds 169 tokens to every session and 4,669 once invoked, about $0.0007 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-08-30.

Related

ai-test-generation compared with skills from other repositories

ai-test-generation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ai-test-generationpetrkindlmann/qa-skillsSkill31816d agoMITA169Claude Code, Codex
platform-engineeringmagnus919/agent-skillsSkill203yesterdayMITA105Claude Code, Codex
woodpecker-cimagnus919/agent-skillsSkill203yesterdayMITA87Claude Code, Codex
github-runnermagnus919/agent-skillsSkill203yesterdayMITA76Claude Code, Codex
CI Pipeline OptimizerPramodDutta/qaskillsSkill25329d agoMITA29Claude Code, Codex
Flaky Test QuarantinePramodDutta/qaskillsSkill25329d agoMITA32Claude Code, Codex
CI/CD Pipeline AdvancedPramodDutta/qaskillsSkill25329d agoMITA45Claude Code, Codex