test-forge

Generate behavioral tests for Python modules with review and execution verification.

1|Updated May 15, 2026
One-click install
npx skills add https://github.com/mslshao/claude-harness --skill test-forge-mslshao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-forge
Source: https://github.com/mslshao/claude-harness/tree/main/dotclaude/skills/test-forge
Command: npx skills add https://github.com/mslshao/claude-harness --skill test-forge-mslshao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create high-quality behavioral tests for a source file or module without drifting into brittle implementation checks, weak assertions, or framework-level noise. It adds a structured review loop so generated tests are not just fast to produce, but also meaningful, maintainable, and aligned with domain behavior.

Core Features & Use Cases

  • Behavior-first test generation: Reads the target code, identifies public interfaces, decision points, error modes, and external boundaries, then generates tests around what the code actually does.
  • Iterative quality review: Runs a reviewer feedback loop to catch overly coupled tests, unnecessary mocks, weak naming, and missing outcome-based assertions before finalizing.
  • Verification and safety guardrails: Executes the resulting test file, limits retry cycles, and explicitly avoids weakening assertions just to make tests pass.
  • Use cases: Ideal when you need tests for a business-logic module, want to add coverage for a new class or function, or need to review existing tests to ensure they validate behavior rather than internals.

Quick Start

Ask the AI to use test-forge on a specific source file or module path to generate and verify behavioral tests for that code.

Frequently Asked Questions about test-forge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate behavioral tests for Python modules without writing brittle implementation checks?

Behavioral tests for Python modules are generated by reading target code, identifying public interfaces and external boundaries, and creating outcome-focused assertions. This approach validates domain behavior rather than internal implementation details, ensuring tests remain maintainable.

What is the best way to create pytest tests that validate business logic rather than internals?

Creating pytest tests that validate business logic requires identifying decision points, error modes, and external boundaries in source code. Tests focus on outcome-based assertions with minimal mocking, applying an iterative reviewer feedback loop to catch weak assertions and unnecessary mocks.

Can I generate tests for Python code that integrates with external services like AWS, HTTP, or Salesforce?

Tests for Python code integrating with AWS, HTTP, or Salesforce are supported through external boundary handling. The generation process identifies these integration points and creates behavioral tests that validate interactions while keeping mocking minimal and outcome assertions explicit.

How do I review existing pytest tests to ensure they validate behavior instead of implementation?

Reviewing existing pytest tests for behavior validation involves running an iterative quality review loop. This process catches overly coupled tests, unnecessary mocks, weak naming, and missing outcome-based assertions, ensuring tests validate domain behavior rather than internal implementation details.

Why do my generated Python tests fail during execution, and how can I fix weak assertions?

Generated Python tests failing during execution are addressed through verification with bounded retry limits. The process explicitly avoids weakening assertions to make tests pass, instead using iterative reviewer feedback to fix test quality and ensure meaningful outcome-based assertions.

Does test-forge work without external dependencies for generating Python behavioral tests?

Generating Python behavioral tests with test-forge requires no external dependencies. It operates by understanding source code structure, creating tests with outcome-focused assertions, and verifying execution through a structured review loop with bounded retry limits.