test-create

Generate PHP Laravel unit and feature tests following Cursor rules.

5|Updated Aug 22, 2025
One-click install
npx skills add https://github.com/pekral/cursor-rules --skill test-create
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-create
Source: https://github.com/pekral/cursor-rules/tree/main/skills/test-create
Command: npx skills add https://github.com/pekral/cursor-rules --skill test-create

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps PHP Laravel teams create, write, or generate tests that adhere to project conventions, ensure 100% coverage, and avoid touching production code.

Core Features & Use Cases

  • Automatic test generation: Produce clean, Pest-ready tests that follow .cursor/rules/*.mdc guidelines.
  • Test rewriting and optimization: Rewrite existing tests to Pest syntax (if Pest is installed) and improve readability with data providers where appropriate.
  • Quality assurance and cleanup: Remove auxiliary/debug files and run available auto-fixers to align with project scripts.

Quick Start

Use the test-create skill to generate unit and feature tests that comply with the repository's Cursor rules for a given Laravel class.

Frequently Asked Questions about test-create

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

FAQPage Schema
How do I generate Laravel tests that follow Cursor rules and ensure 100% coverage?

Generate Laravel tests adhering to Cursor rules by producing Pest-ready unit and feature tests that enforce mocks, data providers, and full coverage without altering production code.

Can I rewrite existing PHPUnit tests to Pest syntax for my Laravel project?

Rewrite existing tests to Pest syntax automatically if Pest is installed in your Laravel project, improving readability with data providers and aligning with current conventions.

Does this test generation approach modify my production code?

Test generation avoids production code changes entirely, focusing solely on creating or rewriting unit and feature tests while removing auxiliary debug files after generation.

What is the best way to structure Laravel unit tests with mocks and data providers?

Structure Laravel unit tests by enforcing mock usage and data providers, generating clean test architecture that complies with repository guidelines and delivers 100% coverage.

How do I ensure generated Laravel tests align with my project's formatting scripts?

Ensure generated tests align with project scripts by running available auto-fixers after test generation, cleaning up auxiliary files to maintain repository formatting standards.

Do I need Pest installed to use automated Laravel test generation?

Pest installation is optional; test generation produces standard Laravel tests but adapts to Pest syntax specifically if Pest is installed in the project environment.