Find your next skill
← All skills
Testing

test-generator

Generate unit, integration, and end-to-end tests for existing code. Use when a user asks to write tests, add test coverage, create unit tests, generate integ...

The answer

Generate unit, integration, and end-to-end tests for existing code.

Install

npx terminal-skills install test-generator

Author's take / 作者点评

Good bootstrap for pytest suites from existing code. Best for greenfield coverage; expect light path/fixture edits.

从现有代码拉起 pytest 很方便;导入路径和 fixture 通常还要微调。

What it does

Generate unit, integration, and end-to-end tests for existing code. Use when a user asks to write tests, add test coverage, create unit tests, generate integration tests, build e2e tests, improve code coverage, write specs, or add testing to a project. Supports Jest, Vitest, Pytest, Playwright, React Testing Library, and Cypress. Analyzes code to produce meaningful assertions, edge cases, and mock setups.

This entry summarizes the public skill for discovery. Prefer the upstream SKILL.md for the full instruction text (we do not paste restricted or lengthy proprietary prompt bodies).

Install & usage

Multi-agent install (Terminal Skills CLI)

npx terminal-skills install test-generator

Manual curl examples:

# Claude Code
curl -sL https://raw.githubusercontent.com/TerminalSkills/skills/main/skills/test-generator/SKILL.md -o .claude/skills/test-generator.md
# Codex
curl -sL https://raw.githubusercontent.com/TerminalSkills/skills/main/skills/test-generator/SKILL.md -o .codex/skills/test-generator.md
# Cursor
curl -sL https://raw.githubusercontent.com/TerminalSkills/skills/main/skills/test-generator/SKILL.md -o .cursor/skills/test-generator.md

Best for

Generating unit/integration/e2e tests for existing code.

Hands-on test

  • test_level: fully-tested
  • Ran: yes
  • When: 2026-11-01T01:20:00+08:00 (Asia/Shanghai)
  • Result: Generated pytest cases for a sample module; tests ran green after small fixes.
  • Gotchas: Generated tests may need import-path tweaks before they pass.

Money-saving tip

Skills are free/open-source; spend goes to your agent plan. Start on Cursor Plus ($8/mo) or Claude Pro / ChatGPT Go before upgrading.

Source & license