Agent skill

Pest Testing

by mnapoli in mnapoli/vibephp

A skill your agent uses for Pest PHP testing in Laravel projects only.

MITAuto-check passedTesting & QA

Install Pest Testing

skills CLI
$ npx skills add mnapoli/vibephp --skill pest-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mnapoli/vibephp pest-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mnapoli/vibephp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pest-testing .claude/skills/pest-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pest-testing
GitHub stars
158
Token cost
~1.4k tokens
SKILL.md length
408 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses for Pest PHP testing in Laravel projects only.

  • Pest PHP testing in Laravel projects only
  • SKILL.md covers Documentation, Basic Usage, Assertions and Mocking, plus 3 more sections
  • Calls php
  • Ever any test is being written

What it does

Pest Testing is an agent skill from mnapoli/vibephp. Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests…

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Unit testing, Browser testing and Backend development. It works with PHP and Laravel. The repository describes itself as: A PHP engine that runs on vibes, not code. The licence is MIT.

When your agent uses it

  • Pest PHP testing in Laravel projects only
  • Ever any test is being written
  • Refactored — including fixing tests that broke after a code change
  • Adding assertions

Example prompts

  • “/pest-testing”

What it can do on your machine

Read from SKILL.md and the folder at commit 7fb5ad3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • php

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pest Testing loads about 1.4k tokens when it runs. Until then it costs about 200 tokens; SKILL.md has 408 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~200
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mnapoli/vibephp at commit 7fb5ad3, republished under its MIT licence (© mnapoli). 408 words, ~1,438 tokens.

Download SKILL.mdSave it as .claude/skills/pest-testing/SKILL.md (or your agent's skills folder).
name
pest-testing
description
Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: test()/it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code.
license
MIT
metadata.author
laravel

Pest Testing 4

Documentation

Use search-docs for detailed Pest 4 patterns and documentation.

Basic Usage

Creating Tests

All tests must be written using Pest. Use php artisan make:test --pest {name}.

The {name} argument should include only the path and test name, but should not include the test suite.

  • Incorrect: php artisan make:test --pest Feature/SomeFeatureTest will generate tests/Feature/Feature/SomeFeatureTest.php
  • Correct: php artisan make:test --pest SomeControllerTest will generate tests/Feature/SomeControllerTest.php
  • Incorrect: php artisan make:test --pest --unit Unit/SomeServiceTest will generate tests/Unit/Unit/SomeServiceTest.php
  • Correct: php artisan make:test --pest --unit SomeServiceTest will generate tests/Unit/SomeServiceTest.php
Test Organization
  • Unit/Feature tests: tests/Feature and tests/Unit directories.
  • Browser tests: tests/Browser/ directory.
  • Do NOT remove tests without approval - these are core application code.
Basic Test Structure

Pest supports both test() and it() functions. Before writing new tests, check existing test files in the same directory to match the project's convention. Use test() if existing tests use test(), or it() if they use it().

<!-- Basic Pest Test Example -->
php
it('is true', function () {
    expect(true)->toBeTrue();
});
Running Tests
  • Run minimal tests with filter before finalizing: php artisan test --compact --filter=testName.
  • Run all tests: php artisan test --compact.
  • Run file: php artisan test --compact tests/Feature/ExampleTest.php.

Assertions

Use specific assertions (assertSuccessful(), assertNotFound()) instead of assertStatus():

<!-- Pest Response Assertion -->
php
it('returns all', function () {
    $this->postJson('/api/docs', [])->assertSuccessful();
});
UseInstead of
assertSuccessful()assertStatus(200)
assertNotFound()assertStatus(404)
assertForbidden()assertStatus(403)

Mocking

Import mock function before use: use function Pest\Laravel\mock;

Datasets

Use datasets for repetitive tests (validation rules, etc.):

<!-- Pest Dataset Example -->
php
it('has emails', function (string $email) {
    expect($email)->not->toBeEmpty();
})->with([
    'james' => 'james@laravel.com',
    'taylor' => 'taylor@laravel.com',
]);

Pest 4 Features

FeaturePurpose
Browser TestingFull integration tests in real browsers
Smoke TestingValidate multiple pages quickly
Visual RegressionCompare screenshots for visual changes
Test ShardingParallel CI runs
Architecture TestingEnforce code conventions
Show full SKILL.md (170 more words)Show less
Browser Test Example

Browser tests run in real browsers for full integration testing:

  • Browser tests live in tests/Browser/.
  • Use Laravel features like Event::fake(), assertAuthenticated(), and model factories.
  • Use RefreshDatabase for clean state per test.
  • Interact with page: click, type, scroll, select, submit, drag-and-drop, touch gestures.
  • Test on multiple browsers (Chrome, Firefox, Safari) if requested.
  • Test on different devices/viewports (iPhone 14 Pro, tablets) if requested.
  • Switch color schemes (light/dark mode) when appropriate.
  • Take screenshots or pause tests for debugging.
<!-- Pest Browser Test Example -->
php
it('may reset the password', function () {
    Notification::fake();

    $this->actingAs(User::factory()->create());

    $page = visit('/sign-in');

    $page->assertSee('Sign In')
        ->assertNoJavaScriptErrors()
        ->click('Forgot Password?')
        ->fill('email', 'nuno@laravel.com')
        ->click('Send Reset Link')
        ->assertSee('We have emailed your password reset link!');

    Notification::assertSent(ResetPassword::class);
});
Smoke Testing

Quickly validate multiple pages have no JavaScript errors:

<!-- Pest Smoke Testing Example -->
php
$pages = visit(['/', '/about', '/contact']);

$pages->assertNoJavaScriptErrors()->assertNoConsoleLogs();
Visual Regression Testing

Capture and compare screenshots to detect visual changes.

Test Sharding

Split tests across parallel processes for faster CI runs.

Architecture Testing

Pest 4 includes architecture testing (from Pest 3):

<!-- Architecture Test Example -->
php
arch('controllers')
    ->expect('App\Http\Controllers')
    ->toExtendNothing()
    ->toHaveSuffix('Controller');

Common Pitfalls

  • Not importing use function Pest\Laravel\mock; before using mock
  • Using assertStatus(200) instead of assertSuccessful()
  • Forgetting datasets for repetitive validation tests
  • Deleting tests without approval
  • Forgetting assertNoJavaScriptErrors() in browser tests
  • Prefixing Feature/ or Unit/ in {name} when using make:test

© mnapoli, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/pest-testing of mnapoli/vibephp.

Open the folder on GitHubat commit 7fb5ad3

Compare with similar skills

Pest Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pest Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pest Testing this skillmnapoli/vibephp158—~1.4kAutomated safety check: PassMIT
Pest Testingluadotsh/lua3421 repos~1.2kAutomated safety check: PassMIT
Pest Testingliberusoftware/real-estate-laravel1121 repos~1.8kAutomated safety check: PassMIT
Pest TestingMineTrax/minetrax115—~787Automated safety check: PassMIT
Pest Testingslimani-dev/muraqib128—~1.2kAutomated safety check: PassMIT
Pest TestingAratKruglik/claude-laravel155—~1.6kAutomated safety check: PassNone

Similar skills

  • Pest Testing

    luadotsh/lua

    A skill your agent uses for Pest PHP testing in Laravel projects only.

    342 GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed
  • Pest Testing

    liberusoftware/real-estate-laravel

    A skill your agent uses for Pest PHP testing in Laravel projects only.

    112 GitHub starsUsed in 1 repo~1.8k tokens
    Testing & QAAuto-check passed
  • Pest Testing

    MineTrax/minetrax

    A skill your agent uses for Pest PHP testing in Laravel projects only.

    115 GitHub stars~787 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Pest Testing

    slimani-dev/muraqib

    Tests applications using the Pest 4 PHP framework. An agent skill from slimani-dev/muraqib.

    128 GitHub stars~1.2k tokensUpdated 7 days ago
    Testing & QAAuto-check passed
  • Pest Testing

    AratKruglik/claude-laravel

    Tests applications using the Pest 4 PHP framework. An agent skill from AratKruglik/claude-laravel.

    155 GitHub stars~1.6k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • PHP Pro

    Jeffallan/claude-skills

    Writes strictly typed modern PHP 8.3+ for Laravel, Symfony and plain projects, with PHPStan level 9, PHPUnit or Pest tests, typed DTOs and secure defaults.

    12k GitHub stars~1.6k tokensUpdated 4 days ago
    Backend & APIsAuto-check: notes

Works with

Categories

Questions about Pest Testing

What does Pest Testing do?

A skill your agent uses for Pest PHP testing in Laravel projects only. Pest Testing is an agent skill from mnapoli/vibephp. Use this skill for Pest PHP testing in Laravel projects only.

When should I use Pest Testing?

Pest Testing fits situations like: pest PHP testing in Laravel projects only; ever any test is being written; refactored — including fixing tests that broke after a code change; adding assertions.

How do I install Pest Testing in Claude Code?

Run `npx skills add mnapoli/vibephp --skill pest-testing -a claude-code`. Or copy the skill folder (.claude/skills/pest-testing in mnapoli/vibephp) into .claude/skills/pest-testing in your project. Claude Code loads it when a task matches its description.

How do I install Pest Testing in Codex?

Run `npx skills add mnapoli/vibephp --skill pest-testing -a codex`. Or copy the skill folder (.claude/skills/pest-testing in mnapoli/vibephp) into .agents/skills/pest-testing in your project. Codex loads it when a task matches its description.

Can I use Pest Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mnapoli/vibephp --skill pest-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pest-testing, .gemini/skills/pest-testing, .github/skills/pest-testing and .opencode/skills/pest-testing in your project.

What does Pest Testing need to run?

Going by SKILL.md and its folder, Pest Testing needs the command-line tools its instructions call (php).

Does Pest Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pest Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pest Testing use?

Pest Testing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pest Testing use?

About 1.4k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pest Testing?

Skills that share tags, products or a category with Pest Testing: Pest Testing (luadotsh/lua, 342 stars), Pest Testing (liberusoftware/real-estate-laravel, 112 stars), Pest Testing (MineTrax/minetrax, 115 stars) and Pest Testing (slimani-dev/muraqib, 128 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pest Testing?

mnapoli (a GitHub user) maintains it in mnapoli/vibephp, which has 158 GitHub stars. The repository was last updated on June 25, 2026.

Source: mnapoli/vibephp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.