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 kabudu/engineering-agent-skills --skill php-best-practicesgit clone --depth 1 https://github.com/kabudu/engineering-agent-skillsWrote 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/kabudu/engineering-agent-skills/php-best-practices)<a href="https://agentmods.dev/skills/kabudu/engineering-agent-skills/php-best-practices"><img src="https://agentmods.dev/badge/skills/kabudu/engineering-agent-skills/php-best-practices/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/kabudu/engineering-agent-skills/php-best-practices"><img src="https://agentmods.dev/badge/skills/kabudu/engineering-agent-skills/php-best-practices.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.00045 | $0.01096 |
| Opus 5.5 | $0.00018 | $0.00438 |
| Sonnet 5.5 | $0.00009 | $0.00219 |
| Haiku 4.5 | $0.00005 | $0.00110 |
Grade A, and why
php-best-practices 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 28d 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 — 42 lines — stays where its author put it; the contents beside it link to each section on GitHub.
BeautifulPHP
Produce clear, idiomatic PHP that satisfies the requested behaviour on the project's supported runtimes. Follow repository instructions and established framework conventions. Keep changes scoped; introduce dependencies and abstractions only when they solve a concrete problem.
Establish the target and contract
Read affected code, tests, Composer manifests, analysis configuration, and any existing CI, container, or deployment settings. Establish the supported PHP range, required extensions, framework version, and actual execution environment. Distinguish a library's consumer compatibility promise from an application's deployment target. A local interpreter or lockfile alone does not establish either.
Reconcile conflicting version evidence before compatibility-sensitive edits. If the target is unresolved, state the uncertainty and ask for the missing decision while continuing independent work. Do not silently raise the minimum version, narrow the supported range, or bypass platform requirements. Check syntax, built-in APIs, dependencies, and deprecations against the full promised range. Read compatibility when establishing a target, upgrading PHP, or using version-sensitive features.
Before refactoring, identify observable contracts: return values, exceptions, side effects, ordering, serialization, and public signatures. Preserve them unless the request authorises changes. Documenting a difference does not authorise it. Add focused regression coverage for demonstrated bugs and fragile boundaries.
Implement deliberately
- Prefer cohesive functions and objects with clear names and explicit dependencies. Use interfaces for real substitution or public contracts, not one per class. Avoid speculative layers, service locators, global mutable state, and unmeasured optimisation; respect established framework mechanisms.
- Express meaningful constraints with native parameter, return, and property types supported by the target. Use PHPDoc for additional information such as generics and array shapes. Validate external data before treating it as a domain value; casts and type annotations are not validation.
- Distinguish missing keys, null, false, zero, and empty strings. Choose comparisons and presence checks by semantics. Consider array-key coercion, list versus map shape, byte versus character operations, and JSON representation. Read types and contracts when these boundaries or public APIs change.
- Apply strict typing deliberately. Scalar argument strictness depends on the calling file; adding declarations or narrower types can change accepted inputs. Do not present strict typing as sanitisation or apply it mechanically during compatibility-preserving refactors.
- Use exceptions for failures according to project contracts, preserving useful context and previous causes. Distinguish normal absence from failure. Catch at a recovery or translation boundary; do not swallow Throwable, suppress diagnostics, or return a success-shaped fallback after failure. Release resources with appropriate cleanup and transactions.
- Treat final, readonly, constructor promotion, enums, and property hooks as design choices with version and compatibility costs. Check inheritance, named arguments, reflection, serialization, and framework hydration before changing exposed structures.
- Keep untrusted data separate from executable commands and queries. Enforce authorisation at the operation boundary, encode output for its destination, and bound resource use. Read security and boundaries for HTTP, persistence, filesystem, process, or external-service changes.
- Document contracts types cannot convey: failure modes, units, encoding, side effects, and meaningful ordering or lifecycle constraints. Prefer examples that exercise realistic failure handling over comments that repeat the code.
What ships with it
4 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.
- 28d ago First seen · 42 lines · 45 tokens per session scan A d041926c829b
php-best-practices is a skill published in the GitHub repository kabudu/engineering-agent-skills (3 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 1,096 once invoked, about $0.0002 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-11-01.
php-best-practices compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| php-best-practiceskabudu/engineering-agent-skills | Skill | 3 | 1mo ago | MIT | A | 45 | Claude Code, Codex |
| mvc-expertroedyrustam/vibes-plug | Skill | 129 | 3d ago | MIT | A | 30 | Cursor |
| wp-phpstan-static-analysisLonsdale201/wp-agent-skills | Skill | 26 | 9d ago | MIT | A | 227 | Claude Code, Codex |
| drupaltools-phpstandrupaltools/skills | Skill | 17 | 1mo ago | none | A | 53 | Claude Code, Codex |
| setup-ts-deep-modulesvinvcn/mattpocock-skills-zh-CN | Skill | 6.2k | 5d ago | MIT | A | 49 | Claude Code, Codex |
| diagnosing-bugsvinvcn/mattpocock-skills-zh-CN | Skill | 6.2k | 5d ago | MIT | A | 50 | Claude Code, Codex |
| kotlin-tooling-native-build-performanceKotlin/kotlin-agent-skills | Skill | 1.2k | 2d ago | Apache-2.0 | A | 96 | Claude Code, Codex |