generate-test-cases

generate-test-cases is a skill for Claude Code from mavka-ai/unit-tests-skills. It costs 35 tokens per session (1,189 once invoked), scanned A, original, MIT.

A skill that analyzes code and produces descriptions of test cases needed for a method or class, without writing the test code.

In plain words
What is it for?
Use it to review test coverage, identify success and failure cases, and plan additional tests for a target part of the codebase.
Why use it?
It reveals missing branches and behaviors by examining dependencies and existing tests before coverage work starts.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the unit-tests-skills plugin — 2 skills shipped together

Good fit Use it to review test coverage, identify success and failure cases, and plan additional tests for a target part of the codebase.

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

Made for: Claude Code.

Or install unit-tests-skills, the plugin that ships this one along with the rest of its 2 skills.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mavka-ai/unit-tests-skills/generate-test-cases"><img src="https://agentmods.dev/badge/skills/mavka-ai/unit-tests-skills/generate-test-cases.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,189 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
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00035 $0.01189
Opus 5 $0.00017 $0.00594
Sonnet 5 $0.00007 $0.00238
Haiku 4.5 $0.00003 $0.00119

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

Security

Grade A, and why

generate-test-cases 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 11d 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/generate-test-cases/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.

Generate Test Cases Skill

You will analyze code and generate a list of test cases that should be written for a given method/class. This skill outputs test case descriptions only — it does NOT generate actual test code.

Target to analyze: $ARGUMENTS

Quality Standards

  • Take your time to analyze the code thoroughly before listing test cases.
  • Quality is more important than speed — read all relevant source files and rules carefully.
  • Do not skip reading the dependency classes. Understanding the full context produces better test cases.

Instructions

Step 1: Read Rules and Analyze Context

  1. Read the rules from ./rules/general/ directory (see Rules Reference below)
  2. Read the target source file/class/method specified above
  3. Read dependencies: Follow imports to read DTOs, entities, enums, and other types referenced by the target (as specified in code-context-analysis rule)
  4. Check for existing tests: Search for existing test classes covering this target (as specified in existing-test-awareness rule) — if found, read it fully and focus only on behaviors not yet covered

Step 2: Generate Test Cases

  1. Analyze ALL code branches, including:
    • Success paths
    • Error/exception paths
    • Validation logic
    • Private/protected methods called by the target
    • Security annotations (if present)
  2. Apply the INCLUDE/EXCLUDE rules strictly
  3. Output the list of test cases in the specified format
  4. Do NOT generate actual test code — only the test case descriptions

Output Format

For each test case, provide:

## Test Cases for {ClassName}.{methodName}

### 1. {testMethodName}
- **Given:** {preconditions/input state}
- **When:** {action being tested}
- **Then:** {expected outcome}
- **Code branch:** {which code path this covers}

### 2. {testMethodName}
...

Naming Convention

Test method name format: {testedMethod}_{givenState}_{expectedOutcome}

Examples:

  • calculateTotal_validProducts_returnsSum
  • calculateTotal_emptyList_throwsIllegalArgumentException
  • getUser_unauthorized_returns401
  • getUser_forbidden_returns403

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. 11d ago First seen · 135 lines · 35 tokens per session scan A dfe4b3ff01b2

Subscribe to this mod's changes

generate-test-cases is a skill published in the GitHub repository mavka-ai/unit-tests-skills (50 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,189 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

test-namer

Guide for writing expressive, behavior-focused tests following Vladimir Khorikov's testing principles. Apply when writing, reviewing, or renaming any test (unit, integration, e2e) in any programming language. Triggers: writing tests, creating test files, adding test cases, reviewing test names, 'test naming', 'rename…

mryll/skills · 116 tokens

dual-testing

Language-agnostic strategy for testing code at the boundary with external infrastructure (databases, APIs, queues): integration tests with real infrastructure (e.g. Testcontainers) prove the full chain works for happy paths; unit/slice tests with mocks prove error-handling and mapping logic (domain error to status…

mryll/skills · 208 tokens

michel-create-packmind-dataset

Seed a local Packmind instance with a realistic dataset — one organization populated with standards, commands, and skills — so an autonomous agent can exercise its own changes against lifelike data instead of an empty app. Use this whenever you need populated Packmind data to verify a change end-to-end: reproducing a…

PackmindHub/packmind · 0 tokens

app-user-story-qa

End-to-end app feature inventory and user-story testing workflow with a canonical tracker. Use when the user asks to audit every feature, derive expected behavior from code, test user journeys, or explicitly fix and retest documented UX or logistical defects.

majiayu000/spellbook · 54 tokens

skill-lifeguard

Use when a skill is brittle, drifting, repeatedly failing, or needs a Reliable Skill Contract. Trigger for phrases like skill lifeguard, reliable skill, self-maintaining skill, negative examples, verification checkpoints, drift signals, replay hooks, or failure log to skill patch. Audits or patches skills so…

majiayu000/spellbook · 92 tokens

test-driven-development

Enforces TDD discipline with RED-GREEN-REFACTOR cycle. Use when writing new features, fixing bugs, or refactoring code. Ensures tests genuinely verify behavior.

majiayu000/spellbook · 40 tokens