Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add AratKruglik/claude-sdlc --skill php-testinggit clone --depth 1 https://github.com/AratKruglik/claude-sdlcWrote 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.
[](https://agentmods.dev/skills/aratkruglik/claude-sdlc/php-testing)<a href="https://agentmods.dev/skills/aratkruglik/claude-sdlc/php-testing"><img src="https://agentmods.dev/badge/skills/aratkruglik/claude-sdlc/php-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/aratkruglik/claude-sdlc/php-testing"><img src="https://agentmods.dev/badge/skills/aratkruglik/claude-sdlc/php-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00189 | $0.01411 |
| Opus 5.5 | $0.00076 | $0.00564 |
| Sonnet 5.5 | $0.00038 | $0.00282 |
| Haiku 4.5 | $0.00019 | $0.00141 |
Grade A, and why
php-testing 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 29d 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.
How it starts
The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP Testing Patterns (stack-agnostic)
Patterns for PHPUnit and Pest that apply to any PHP codebase. Detect which runner the project uses before writing tests: pestphp/pest in require-dev → Pest; otherwise PHPUnit. Both run on top of PHPUnit assertions.
Detection and running
grep -q pestphp/pest composer.json && echo pest || echo phpunit
vendor/bin/phpunit # PHPUnit
vendor/bin/pest # Pest
vendor/bin/phpunit --coverage-text # coverage (needs Xdebug or PCOV)
Prefer a composer test script if one exists.
Test structure — Arrange / Act / Assert
PHPUnit (class-based):
<?php
declare(strict_types=1);
namespace App\Tests\Unit;
use App\Domain\Money;
use App\Domain\Currency;
use PHPUnit\Framework\TestCase;
final class MoneyTest extends TestCase
{
public function test_it_adds_two_amounts_of_the_same_currency(): void
{
// Arrange
$a = new Money(100, Currency::USD);
$b = new Money(250, Currency::USD);
// Act
$sum = $a->add($b);
// Assert
self::assertSame(350, $sum->amount);
}
public function test_it_rejects_a_currency_mismatch(): void
{
$this->expectException(\InvalidArgumentException::class);
(new Money(100, Currency::USD))->add(new Money(100, Currency::EUR));
}
}
Pest (function-based, same engine):
<?php
declare(strict_types=1);
use App\Domain\Money;
use App\Domain\Currency;
it('adds two amounts of the same currency', function () {
$sum = (new Money(100, Currency::USD))->add(new Money(250, Currency::USD));
expect($sum->amount)->toBe(350);
});
it('rejects a currency mismatch', function () {
expect(fn () => (new Money(100, Currency::USD))->add(new Money(100, Currency::EUR)))
->toThrow(InvalidArgumentException::class);
});
Naming and organisation
- Tests live in
tests/, namespaceApp\Tests\...(mapped viaautoload-dev). - Mirror the source tree:
src/Domain/Money.php→tests/Unit/Domain/MoneyTest.php. - Split
tests/Unit(pure, no I/O) fromtests/Integration/tests/Feature(DB, HTTP, filesystem). - PHPUnit method names:
test_it_<behaviour>()or#[Test]attribute. Pest:it('<behaviour>'). Describe behaviour, not implementation.
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.
- 29d ago Changed · +2 lines 87744e962e89
- 1mo ago First seen · 178 lines · 189 tokens per session scan A c7c734824477
php-testing is a skill published in the GitHub repository AratKruglik/claude-sdlc (43 stars, last pushed 4d ago), licensed MIT. It adds 189 tokens to every session and 1,411 once invoked, about $0.0008 per session on Opus 5.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-09-03.
Other skills, from other repositories
integration-fixture
Add a .test integration fixture for one behavior.
behat-skill
Generates Behat BDD tests for PHP with Gherkin feature files and MinkContext for browser testing. Use when user mentions "Behat", "PHP BDD", "Mink", "behat.yml". Triggers on: "Behat", "PHP BDD", "Mink", "behat.yml", "FeatureContext PHP".
Behat BDD Testing
PHP BDD testing with Behat framework using Gherkin feature files, Mink browser extension, context classes, and Symfony integration for behavior-driven acceptance testing.
Codeception Testing
Expert-level Codeception testing skill for PHP applications. Covers acceptance, functional, and unit testing with the Actor pattern, BDD-style syntax, Page Objects, API testing, and database helpers.
Laravel Dusk Testing
Expert-level Laravel Dusk browser testing skill for PHP/Laravel applications. Covers Chrome-based E2E testing, browser assertions, Page Objects, component testing, authentication helpers, and database integration.
phel-lang
Building applications WITH Phel (Lisp that compiles to PHP). Triggers on .phel files, phel-config.php, phel CLI commands (init, run, repl, test, build), or requests to build a Phel app. Skip when working on the Phel compiler itself.