claude-force: Skill for Claude Code

.claude/skills/test-generation/SKILL.md

test-generation is a skill for Claude Code from khanh-vu/claude-force. It costs 0 tokens per session (2,729 once invoked), scanned A, original, MIT.

A guide for generating automated tests across common testing styles and frameworks. It covers unit, integration, and end-to-end tests, along with test data, mocks, stubs, and coverage.

In plain words
What is it for?
Use it to create tests with tools such as Jest, Vitest, pytest, JUnit, Playwright, and Cypress.
Why use it?
It helps turn expected behavior and edge cases into repeatable checks instead of relying only on manual testing.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is khanh-vu/claude-force's own configuration. It tells Claude Code how to work on claude-force itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-force configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is files: ./coverage/coverage-final.json.

Reuse

Borrowing it

Nothing to install: this file belongs to khanh-vu/claude-force. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/khanh-vu/claude-force/main/.claude/skills/test-generation/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/khanh-vu/claude-force

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/khanh-vu/claude-force/test-generation.svg)](https://agentmods.dev/skills/khanh-vu/claude-force/test-generation)
Your own site
<a href="https://agentmods.dev/skills/khanh-vu/claude-force/test-generation"><img src="https://agentmods.dev/badge/skills/khanh-vu/claude-force/test-generation.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,729 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00000 $0.02729
Opus 5 $0.00000 $0.01365
Sonnet 5 $0.00000 $0.00546
Haiku 4.5 $0.00000 $0.00273

Measured 7d ago against content hash 37149d222173, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

test-generation scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

with patch('mymodule.requests.get') as mock_get:
.claude/skills/test-generation/SKILL.md · 508 lines

How it starts

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

Test Generation Skill

Overview

Comprehensive patterns and best practices for generating high-quality automated tests across different testing frameworks and paradigms.

Capabilities

  • Unit test generation (Jest, Vitest, pytest, JUnit)
  • Integration test patterns
  • E2E test creation (Playwright, Cypress)
  • Test data generation
  • Mock and stub creation
  • Test coverage strategies

Testing Frameworks

JavaScript/TypeScript

Jest/Vitest Patterns

Basic Unit Test Structure:

import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { functionToTest } from './module';

describe('ModuleName', () => {
  describe('functionToTest', () => {
    it('should return expected result for valid input', () => {
      // Arrange
      const input = 'test';
      const expected = 'TEST';

      // Act
      const result = functionToTest(input);

      // Assert
      expect(result).toBe(expected);
    });

    it('should throw error for invalid input', () => {
      expect(() => functionToTest(null)).toThrow('Invalid input');
    });
  });
});

Testing Async Functions:

it('should fetch user data successfully', async () => {
  const userId = '123';
  const userData = await fetchUser(userId);

  expect(userData).toHaveProperty('id', userId);
  expect(userData).toHaveProperty('name');
});

Testing React Components:

import { render, screen, fireEvent } from '@testing-library/react';
import { Button } from './Button';

describe('Button', () => {
  it('should call onClick handler when clicked', () => {
    const handleClick = vi.fn();
    render(<Button onClick={handleClick}>Click me</Button>);

    const button = screen.getByRole('button', { name: /click me/i });
    fireEvent.click(button);

    expect(handleClick).toHaveBeenCalledTimes(1);
  });

  it('should be disabled when disabled prop is true', () => {
    render(<Button disabled>Click me</Button>);

    const button = screen.getByRole('button');
    expect(button).toBeDisabled();
  });
});

Read the full file on GitHub · 508 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. 7d ago First seen · 508 lines · 0 tokens per session scan A 37149d222173

Subscribe to this mod's changes

test-generation is a skill published in the GitHub repository khanh-vu/claude-force (5 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,729 tokens. A static security scan graded it A with 1 finding (makes network calls). 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

axiom-testing

Use when writing ANY test, debugging flaky tests, making tests faster, or choosing Swift Testing vs XCTest. Covers unit tests, UI tests, async testing, test architecture.

CharlesWiltgen/Axiom · 38 tokens

designing-tests

Designs and implements testing strategies for any codebase. Use when adding tests, improving coverage, setting up testing infrastructure, debugging test failures, or when asked about unit tests, integration tests, or E2E testing.

CloudAI-X/claude-workflow-v2 · 48 tokens

test-automation

Execute Vitest and Playwright test suites with result collection and failure analysis.

a5c-ai/babysitter · 0 tokens

testing-blocks

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.

adobe/skills · 61 tokens

prd-auto-test-loop

A testing workflow driven by a product requirements document (PRD), which describes what a software version should do. It turns acceptance criteria into unit, integration, and end-to-end tests, then records the plan and results.

yunshu0909/yunshu_skillshub · 79 tokens

test-automation-expert

Comprehensive test automation specialist covering unit, integration, and E2E testing strategies. Expert in Jest, Vitest, Playwright, Cypress, pytest, and modern testing frameworks. Guides test pyramid design, coverage optimization, flaky test detection, and CI/CD integration. Activate on 'test strategy', 'unit tests'…

curiositech/some_claude_skills · 133 tokens