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 hmj1026/dhpk --skill phpunitgit clone --depth 1 https://github.com/hmj1026/dhpkWrote 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/hmj1026/dhpk/phpunit)<a href="https://agentmods.dev/skills/hmj1026/dhpk/phpunit"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/phpunit/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/hmj1026/dhpk/phpunit"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/phpunit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00086 | $0.00855 |
| Opus 5.5 | $0.00034 | $0.00342 |
| Sonnet 5.5 | $0.00017 | $0.00171 |
| Haiku 4.5 | $0.00009 | $0.00085 |
Grade A, and why
phpunit 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 yesterday.
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 — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHPUnit family — version router
Use this family for PHPUnit 9, 10, and 11 work. Resolve one version first, then read exactly that selector reference; conditional references keep unrelated version guidance out of context.
Resolution contract
- If the caller supplies 9, 10, or 11, use that selector without reading project files or dhpk manifests.
- Otherwise inspect the current project's composer.lock (installed phpunit/phpunit version) and then composer.json (require and require-dev). Select a single resolvable major.
- If no supported major is detected, ask which version applies. Do not guess, default to the newest reference, or use distribution/install manifests.
The family-local resolver and portable CLI implement this contract:
node scripts/resolve-version.js --json [--version 9|10|11]
The JSON result reports status, family, selector, source, reference, loadedReferences, and the selected guidance. An unresolved result reports status "ask", no reference loaded, and an actionable question.
Version branches
- 9 — PHPUnit 8.5/9.x lifecycle signatures, assertions, providers, mocks, hooks, risky-test checks, and the complete API migration catalog: references/9.md.
- 10 — PHP 8.1 floor, attributes preferred while doc-comment metadata still works, runner/configuration changes, hooks, and the 9 → 10 checklist: references/10.md.
- 11 — PHP 8.2 floor, attribute-first migration, deprecated doc-comment metadata, typed overrides, discovery, and the 10 → 11 checklist: references/11.md.
The lifecycle authority is explicit: PHPUnit 10 supports attributes and still reads doc-comment metadata (attributes take precedence); PHPUnit 11 deprecates doc-comment metadata; PHPUnit 12 removes test annotations, while @codeCoverageIgnore, @codeCoverageIgnoreStart, and @codeCoverageIgnoreEnd remain supported.
When NOT to Use
- Use
phpfor Laravel routing and general PHP runtime family selection. - For PHPUnit 5, 6, or 7-only suites, use PHP 5.6-compatible test guidance instead of this modern family.
- For everyday assertion writing without a version decision, use focused test-design guidance rather than loading a version reference.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday Changed · +2 lines d7ae1450b520
- 1mo ago First seen · 81 lines · 86 tokens per session scan A 6f60b9a48ce1
phpunit is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 86 tokens to every session and 855 once invoked, about $0.0003 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-05.
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 +…
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).
Test Scaffold (Laravel/PHPUnit)
Generate PHP/Laravel (PHPUnit) test skeletons from specifications.
php-quality
A PHP quality-check workflow using PHPStan, Pint, PHPUnit, Pest, or Laravel's test command. It checks code behavior, types, style, and formatting.
craft-test-suite
Crafting a test suite. Zero to green in 60 seconds.
craft-test-factory
Crafting Test Factories. Beyond Laravel defaults.