test-generate

test-generate is a skill for Claude Code from berkcangumusisik/claude-code-practices. It costs 19 tokens per session (226 once invoked), scanned A, original, MIT.

A unit-test generator for testing individual functions or classes in isolation. It examines the project's existing test style before adding tests.

In plain words
What is it for?
Use it to create tests for a file or function and place them according to the project's conventions.
Why use it?
It covers normal use, edge cases, errors, and asynchronous behavior that are easy to miss when writing tests manually.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it to create tests for a file or function and place them according to the project's conventions.

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

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 test-generate

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/berkcangumusisik/claude-code-practices/test-generate"><img src="https://agentmods.dev/badge/skills/berkcangumusisik/claude-code-practices/test-generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 226 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.00019 $0.00226
Opus 5 $0.00010 $0.00113
Sonnet 5 $0.00004 $0.00045
Haiku 4.5 $0.00002 $0.00023

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

Security

Grade A, and why

test-generate 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/test-generate/SKILL.md · 30 lines

What it actually says

Generate Tests

Target: $1 $2

  1. Read the file and understand:

    • What framework is used (Jest, Vitest, Mocha, pytest, Go test, etc.) - check existing test files for patterns
    • The function/class signatures, types, return values
    • Existing tests (if any) to match style
  2. Identify test cases:

    • Happy path (normal usage)
    • Edge cases (null, undefined, empty, boundary values)
    • Error cases (thrown exceptions, rejected promises)
    • Async behavior if applicable
  3. Write tests following the project's existing test style.

  4. Place the test file next to the source or in __tests__/ - match project convention.

  5. Show a summary: N tests covering X scenarios.

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 · 30 lines · 19 tokens per session scan A 988c5f926887

Subscribe to this mod's changes

test-generate is a skill published in the GitHub repository berkcangumusisik/claude-code-practices (10 stars, last pushed 4mo ago), licensed MIT. It adds 19 tokens to every session and 226 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-09-03.

Related

Other skills, from other repositories

rspec

This skill should be used when the user asks to "write specs", "create spec", "add RSpec tests", "fix failing spec", or mentions RSpec, describe blocks, it blocks, expect syntax, test doubles, or matchers. Should also be used when editing spec.rb files, working in spec/ directory, planning implementation phases that…

hoblin/claude-ruby-marketplace · 125 tokens

prodtest

Senior-QA test pass on a newly implemented feature. Detects the project's real test stack, writes unit and functional/integration tests, then drives the running app with Playwright for end-to-end coverage, saving screenshots to a gitignored folder for human review. Asks upfront whether found bugs should be fixed or…

nazmulnahid-git/Ai-Stack · 90 tokens

test-gen

Generate test cases from type constraints and specs. Creates boundary tests, edge cases, and fixtures automatically. Pact-lang inspired. Triggers on: generate tests, test from spec, create fixtures, boundary tests.

chidekina/aria-superpowers · 44 tokens

generate-tests

Auto-generate Jest/Vitest test files with intelligent coverage and mock detection.

chidekina/aria-superpowers · 0 tokens

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work.

browser-use/browser-use · 26 tokens

neuron-test-engineer

Write tests for Neuron AI agents, RAG systems, workflows, and tools using the built-in testing utilities. Use this skill when the user mentions testing agents, writing unit tests, mocking AI providers, testing tool execution, verifying RAG retrieval, testing workflow behavior, or creating test cases for Neuron AI…

neuron-core/neuron-ai · 94 tokens