php-agents-boilerplate: Skill for Claude Code

.claude/skills/testing-strategy/SKILL.md

testing-strategy is a skill for Claude Code from velesnitski/php-agents-boilerplate. It costs 18 tokens per session (745 once invoked), scanned A, original, MIT.

A testing guide for PHP applications, especially Laravel projects. PHPUnit is a tool for running PHP tests, and feature tests check a system through HTTP while unit tests check one class in isolation.

In plain words
What is it for?
It defines test folders and conventions for controllers, requests, services, console commands, APIs, and database-backed feature tests.
Why use it?
It helps you decide where tests belong and whether a test should use real application components or mocked dependencies.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

This is velesnitski/php-agents-boilerplate's own configuration. It tells Claude Code how to work on php-agents-boilerplate itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything php-agents-boilerplate configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./vendor/bin/phpunit # all tests.

Reuse

Borrowing it

Nothing to install: this file belongs to velesnitski/php-agents-boilerplate. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/velesnitski/php-agents-boilerplate/main/.claude/skills/testing-strategy/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/velesnitski/php-agents-boilerplate

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-strategy

README.md
[![agentmods](https://agentmods.dev/badge/skills/velesnitski/php-agents-boilerplate/testing-strategy.svg)](https://agentmods.dev/skills/velesnitski/php-agents-boilerplate/testing-strategy)
Your own site
<a href="https://agentmods.dev/skills/velesnitski/php-agents-boilerplate/testing-strategy"><img src="https://agentmods.dev/badge/skills/velesnitski/php-agents-boilerplate/testing-strategy.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 745 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.00745
Opus 5 $0.00009 $0.00373
Sonnet 5 $0.00004 $0.00149
Haiku 4.5 $0.00002 $0.00075

Measured 6d ago against content hash eb9ee8219343, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

testing-strategy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/testing-strategy/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Strategy

Test Structure

tests/
  TestCase.php                          -- base test class
  CreatesApplication.php                -- app bootstrap trait
  Feature/
    Controllers/                        -- endpoint tests (HTTP layer)
      Api/                              -- public API controllers
      Subscription/                     -- subscription controllers
    Http/Requests/                      -- form request validation tests
    Services/                           -- service integration tests
  Unit/
    Services/                           -- service unit tests (mocked deps)
    Console/Commands/                   -- artisan command tests
    Requests/                           -- request rule tests

Feature vs Unit

Feature tests – test through HTTP, hit real database:

class PageControllerTest extends TestCase
{
    use RefreshDatabase;

    public function test_show_returns_200_for_valid_token(): void
    {
        $order = Order::factory()->create();

        $response = $this->get("/{$order->uuid}");

        $response->assertStatus(200);
    }
}

Unit tests – test single class, mock dependencies:

class TokenGeneratorTest extends TestCase
{
    public function test_password_to_uuid_returns_valid_format(): void
    {
        $uuid = TokenGenerator::passwordToUuid('test-password');

        $this->assertMatchesRegularExpression(
            '/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/',
            $uuid,
        );
    }
}

Running Tests

# Via Makefile (recommended – runs inside Docker)
make test                              # all tests
make test-optimize                     # restart + optimize + test

# Via Artisan (inside container)
php artisan test                       # all tests
php artisan test --filter=ClassName    # specific test class
php artisan test --filter=test_method  # specific test method

# Via PHPUnit directly
./vendor/bin/phpunit                   # all tests
./vendor/bin/phpunit --coverage-html storage/coverage  # with coverage

# Coverage (requires Xdebug)
make laravel-test-coverage             # HTML coverage report in storage/coverage/

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 107 lines · 18 tokens per session scan A eb9ee8219343

Subscribe to this mod's changes

testing-strategy is a skill published in the GitHub repository velesnitski/php-agents-boilerplate (2 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 745 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens

laravel-testing

Laravel 13 testing with Pest PHP 4 or PHPUnit 12. Use when writing feature tests, unit tests, or any test code in a Laravel application. Triggers on tasks involving HTTP tests, model factories, database assertions, mocking facades, authentication testing, or test organisation patterns.

AsyrafHussin/agent-skills · 62 tokens

phpunit-unit-test-reviewing

Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.

shopwareLabs/ai-coding-tools · 31 tokens

phpunit-unit-test-writing

Use this skill when the user asks to write, generate, create, or add PHPUnit unit tests for a Shopware 6 source class — phrases like "write unit tests for X", "generate tests for ClassName", "create PHPUnit tests", "add test coverage", "test this class", "cover this with tests", "I need tests for", "unit test this"…

shopwareLabs/ai-coding-tools · 187 tokens

php-testing

Use when writing/configuring tests on a non-Laravel PHP project — PHPUnit vs Pest. Do NOT use for Laravel test helpers or quality tooling (php-quality-tooling).

fusengine/agents · 38 tokens

phpunit-testing

Guide for writing and running PHPUnit unit and integration tests for WP Rig theme components.

wprig/wprig · 16 tokens