test-writer

Automate behavior-focused unit and integration test writing with Arrange-Act-Assert.

9|Updated Aug 15, 2025
One-click install
npx skills add https://github.com/wpfleger96/ai-rules --skill test-writer-wpfleger96
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-writer
Source: https://github.com/wpfleger96/ai-rules/tree/main/src/ai_rules/config/skills/test-writer
Command: npx skills add https://github.com/wpfleger96/ai-rules --skill test-writer-wpfleger96

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing reliable tests is hard; this skill helps you focus on verifying behavior rather than implementation, reducing flaky tests and speeding up QA.

Core Features & Use Cases

  • Guided test design with the Test Value Framework to decide what to test (CRITICAL, VALUABLE, QUESTIONABLE, TRIVIAL).
  • Structured test construction: one behavior per test, named with the convention test_<unit><scenario><expected>.
  • Workflow guidance for new tests: choose between unit, integration, and E2E tests; follow Arrange-Act-Assert; ensure clear failure messages.
  • Documentation of intent and coverage: tests explain the expected behavior and surface edge cases for future maintenance.

Quick Start

Create a simple unit test that verifies a function's behavior using Arrange-Act-Assert and the standard test naming pattern.

Frequently Asked Questions about test-writer

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

FAQPage Schema
How do I write behavior-focused unit tests that avoid flaky failures?▼

Behavior-focused unit tests verify observable outcomes rather than implementation details, reducing flakiness. Apply the Arrange-Act-Assert pattern and isolate one behavior per test to ensure failures clearly indicate which expectation was unmet.

What is the best way to structure integration test design for new features?▼

Integration test design for new features should follow a structured workflow: choose the appropriate test type, apply Arrange-Act-Assert, and name tests using the test_<unit>_<scenario>_<expected> convention to document intent and surface edge cases.

How do I decide what scenarios to cover when writing unit and integration tests?▼

Decide what to test by categorizing scenarios using the Test Value Framework, which classifies cases as CRITICAL, VALUABLE, QUESTIONABLE, or TRIVIAL to prioritize test coverage and focus on verifying high-value behavior.

Can I use this test writing workflow across different programming languages and frameworks?▼

Yes, this test writing workflow applies to unit and integration tests across languages and frameworks. It guides test design for new features, bug fixes, and refactors without relying on language-specific libraries.

Why should my test naming convention include the scenario and expected result?▼

A test naming convention like test_<unit>_<scenario>_<expected> documents the expected behavior directly in the test name. This makes test failures easier to diagnose and surfaces edge cases for future maintenance.