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 dhpk-php-modern-progit 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/dhpk-php-modern-pro)<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-php-modern-pro"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-php-modern-pro/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/dhpk-php-modern-pro"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-php-modern-pro.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.00058 | $0.02342 |
| Opus 5 | $0.00029 | $0.01171 |
| Sonnet 5 | $0.00012 | $0.00468 |
| Haiku 4.5 | $0.00006 | $0.00234 |
Grade A, and why
dhpk-php-modern-pro 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 4d 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 — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP modern pro — 7.4 baseline + dual-floor library design
This skill is the counterpart to dhpk-php-runtime-router (which assumes PHP 5.6 and
forbids ≥7.0 syntax). Load it when working on code that targets PHP 7.4
or a library that intentionally spans 7.x→8.x.
modules/php-7.4/references/static-checks.md is the always-loaded index
into the tooling tier (php-cs-fixer + phpstan/psalm). This skill is the
language & packaging companion — load when designing API shape, picking
idioms, or reviewing composer constraints.
Rule of thumb:
dhpk-php-runtime-routeris for legacy monoliths frozen at 5.6.dhpk-php-modern-prois for greenfield 7.4+ code and any composer package that ships against a version range.
7.4 baseline — prefer these idioms
Typed properties
final class UserId
{
private int $value;
public function __construct(int $value)
{
$this->value = $value;
}
}
- Always type properties. Drop PHPDoc
@varonce the property is typed unless the type is a narrowed version of the declared type (e.g.array<string, User>on top ofarray). - Prefer
finalon value objects and on classes that aren't designed for inheritance. Subclasses you can't anticipate are subclasses you'll regret.
Arrow functions
$ids = array_map(fn(User $u): int => $u->id(), $users);
- Use for one-expression callbacks. They auto-capture by value.
- Don't reach for
function (…) use (…) {}unless you need a multi-line body. Arrow fns makearray_*andCollection::map/filtercallsites read top-to-bottom.
Null-coalesce assignment
$config['timeout'] ??= 30;
- Replaces
$config['timeout'] = $config['timeout'] ?? 30;. - Works on array offsets, object properties, and plain variables.
Spread in arrays
$base = ['a', 'b'];
$all = [...$base, 'c', 'd'];
- Replaces
array_mergefor plain numeric arrays. Not safe for string-keyed arrays in 7.4 —stringkeys throw; only numeric keys spread. (PHP 8.1+ lifts this restriction.)
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.
- 4d ago First seen · 237 lines · 58 tokens per session scan A 1fe349af2da4
dhpk-php-modern-pro is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 58 tokens to every session and 2,342 once invoked, about $0.0003 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-09-05.
Other skills, from other repositories
craftcms
Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…
craft-php-guidelines
Craft CMS 5 PHP coding standards and conventions. ALWAYS load when writing, editing, reviewing, or discussing any PHP in a Craft plugin or module — even small edits. Also when running ECS, PHPStan, or scaffolding with ddev craft make. Covers: PHPDoc blocks (@author, @since, @throws chains), section headers…
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 +…
symfony:daily-workflow
Daily development workflow for Symfony projects including common tasks, debugging, and productivity tips.
solid-php
Use when applying SOLID principles to Laravel 13 / PHP 8.3+ code — file size limits, interface placement, or PHPDoc enforcement.
laravel-migrations
Use when designing a database schema or managing Laravel 13 migrations — Schema Builder, columns, indexes, foreign keys, or seeders.