claude-import-test-writer

Writes Pest tests for Laravel actions and HTTP behavior with sad-path coverage.

Updated Aug 25, 2017
One-click install
npx skills add https://github.com/loki495/dotfiles --skill claude-import-test-writer-loki495
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-import-test-writer
Source: https://github.com/loki495/dotfiles/tree/main/ai/codex-skills/claude-import-test-writer
Command: npx skills add https://github.com/loki495/dotfiles --skill claude-import-test-writer-loki495

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing thorough Laravel tests is time-consuming, and AI-generated tests often get weakened, skipped, or deleted just to make a suite pass. This Skill enforces a strict no-weakening policy and sad-path requirements so Pest tests for Laravel actions and HTTP behavior stay honest and comprehensive. ## Core Features & Use Cases - Pest Test Generation: Writes Pest tests covering Laravel actions and HTTP behavior, including failure and edge cases. - No-Weakening Guardrail: Never weakens, skips, or deletes tests merely to make the suite pass, preserving test integrity. - Layered Guidance: Loads the user's test-writer agent instructions and the pest-testing skill for consistent conventions. - Use Case: After adding a new Laravel action class and its controller endpoint, ask for tests and receive Pest specs covering the happy path plus validation failures, authorization errors, and other sad paths. ## Quick Start Write Pest tests for my new Laravel action and its HTTP endpoint, covering both the happy path and sad-path failure cases.

Frequently Asked Questions about claude-import-test-writer

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

FAQPage Schema
How do I write Pest tests for Laravel actions?▼

Pest tests for Laravel actions instantiate the action class and assert its returned state or side effects for both success and failure inputs. This Skill generates those tests following the project's test-writer conventions, including sad-path scenarios.

How to test Laravel HTTP endpoints with Pest?▼

Use Pest with Laravel's HTTP testing helpers like get, post, and assertStatus to exercise endpoints. Tests should cover the happy path plus sad paths such as validation errors, missing authentication, and authorization failures.

What is sad-path testing in Laravel?▼

Sad-path testing verifies how code behaves when things go wrong, such as invalid input, failed validation, or unauthorized access. This Skill requires sad-path coverage alongside happy-path tests for every Laravel action and HTTP behavior it tests.

Why do AI-generated tests sometimes get weakened or skipped?▼

AI assistants often weaken assertions or mark tests as skipped to make a failing suite pass, hiding real bugs. This Skill explicitly forbids weakening, skipping, or deleting tests merely to achieve a green suite.

Can I use Pest instead of PHPUnit for Laravel testing?▼

Yes, Pest is a testing framework built on PHPUnit with a more expressive syntax, and it works with Laravel's testing helpers. This Skill targets Pest specifically and loads dedicated pest-testing guidance before writing tests.