test-generation

Use when generating tests for new or existing code to improve coverage - provides a structured workflow for analyzing code, creating tests, and validating coverage goals.

13 stars

Best use case

test-generation is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when generating tests for new or existing code to improve coverage - provides a structured workflow for analyzing code, creating tests, and validating coverage goals.

Teams using test-generation should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/test-generation/SKILL.md --create-dirs "https://raw.githubusercontent.com/NickCrew/Claude-Cortex/main/skills/test-generation/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/test-generation/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How test-generation Compares

Feature / Agenttest-generationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when generating tests for new or existing code to improve coverage - provides a structured workflow for analyzing code, creating tests, and validating coverage goals.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Test Generation

## Overview
Generate tests systematically by analyzing code paths, covering edge cases, and validating coverage targets.

## When to Use
- Creating tests for new features
- Improving coverage in weak areas
- Building regression or integration test suites

Avoid when:
- The task is only running existing tests (use dev-workflows)

## Quick Reference

| Task | Load reference |
| --- | --- |
| Test generation workflow | `skills/test-generation/references/generate-tests.md` |

## Workflow
1. Identify target scope and test type.
2. Load the test generation reference.
3. Analyze code paths and edge cases.
4. Generate tests and validate coverage.
5. Summarize results and gaps.

## Output
- Generated tests
- Coverage report and follow-ups

## Common Mistakes
- Writing tests without understanding code paths
- Ignoring edge cases or failure modes

Related Skills

webapp-testing

13
from NickCrew/Claude-Cortex

Toolkit for interacting with and testing local web applications using Playwright. Use when verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

testing-skills-with-subagents

13
from NickCrew/Claude-Cortex

Use when creating or editing skills, before deployment, to verify they work under pressure and resist rationalization - applies RED-GREEN-REFACTOR cycle to process documentation by running baseline without skill, writing to address failures, iterating to close loopholes

testing-anti-patterns

13
from NickCrew/Claude-Cortex

Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies

test-review

13
from NickCrew/Claude-Cortex

Review test quality and audit test coverage for any module. This skill should be used when reviewing existing tests, auditing test gaps, writing new tests, or when asked to assess test health. It pipelines testing standards into the audit workflow to produce a prioritized gap report. The output is a report, not code — do not write test implementations until the report is reviewed.

test-driven-development

13
from NickCrew/Claude-Cortex

Use when implementing any feature or bugfix, before writing implementation code - write the test first, watch it fail, write minimal code to pass; ensures tests actually verify behavior by requiring failure first

python-testing-patterns

13
from NickCrew/Claude-Cortex

Python testing patterns and best practices using pytest, mocking, and property-based testing. Use when writing unit tests, integration tests, or implementing test-driven development in Python projects.

writing-skills

13
from NickCrew/Claude-Cortex

Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization

workflow-security-audit

13
from NickCrew/Claude-Cortex

Comprehensive security assessment and remediation. Use for security reviews, compliance checks, vulnerability assessments.

workflow-performance

13
from NickCrew/Claude-Cortex

Systematic performance analysis and optimization. Use when things are slow, need optimization, or preparing for scale.

workflow-feature

13
from NickCrew/Claude-Cortex

Complete feature development workflow from design to deployment. Use when implementing new features or functionality.

workflow-feature-development

13
from NickCrew/Claude-Cortex

Complete workflow for developing new features from design to deployment. Use when starting a new feature, adding functionality, or building something new.

workflow-bug-fix

13
from NickCrew/Claude-Cortex

Systematic approach to identifying, fixing, and validating bug fixes. Use when fixing bugs, resolving issues, or addressing errors.