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 SumonMSelim/agentguard --skill phpgit clone --depth 1 https://github.com/SumonMSelim/agentguardWrote 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/sumonmselim/agentguard/php)<a href="https://agentmods.dev/skills/sumonmselim/agentguard/php"><img src="https://agentmods.dev/badge/skills/sumonmselim/agentguard/php/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/sumonmselim/agentguard/php"><img src="https://agentmods.dev/badge/skills/sumonmselim/agentguard/php.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.00000 | $0.01457 |
| Opus 5.5 | $0.00000 | $0.00583 |
| Sonnet 5.5 | $0.00000 | $0.00291 |
| Haiku 4.5 | $0.00000 | $0.00146 |
Grade A, and why
php 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 1mo 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 — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP
Runtime and versioning
- Run PHP 8.4 (active support) or 8.5 (latest stable). Never run EOL versions — no security patches
declare(strict_types=1)at top of every file- OPcache enabled in production.
opcache.preloadfor warm startup on 8.0+ - JIT enabled for CPU-bound workloads:
opcache.jit=tracing,opcache.jit_buffer_size=128M. Not beneficial for typical I/O-bound web apps — benchmark before enabling
Type system
- Type-hint all parameters, return types, and properties. No
mixed— use union types (int|string) or generics via PHPDoc neverreturn type for functions that always throw or exitreadonlyproperties for value objects and DTOs (8.1+).readonlyclasses (8.2+) for fully immutable objects- Asymmetric visibility (8.4+):
public private(set)for properties readable everywhere but writable only within class - Property hooks (8.4+):
get/sethooks on properties — eliminates getter/setter boilerplate. Incompatible withreadonly - Intersection types (8.1+):
Countable&Iterator. DNF types (8.2+):(A&B)|null - Typed class constants (8.3+):
const string VERSION = '1.0' #[Override]attribute (8.3+) on overriding methods — compiler-checked safety net- Enums over constants for closed value sets (8.1+). Backed enums (
string/int) for serialisation - Named arguments for multi-param functions with non-obvious order. Not for all calls
matchoverswitch— exhaustive, no fall-through, returns value- First-class callable syntax (8.1+):
strlen(...)overClosure::fromCallable('strlen')
Modern syntax (8.4–8.5)
newwithout parentheses for chaining (8.4+):new Collection()->filter()->map()- Pipe operator (8.5+):
$result = $value |> trim(...) |> strtolower(...) |> htmlspecialchars(...). Prefer over nested calls clone with(8.5+):$new = clone $obj with {name: 'updated'}. Preferred over manual clone + property set- Static property asymmetric visibility (8.5+): same syntax as instance properties
- Lazy objects (8.4+): built-in lazy initialisation via
ReflectionClass::newLazyProxy(). Use for expensive dependencies in DI containers - Driver-specific PDO classes (8.4+):
Pdo\Mysql,Pdo\Pgsql,Pdo\Sqlite— type-safe, IDE-friendly alternatives to genericPDO
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.
- 1mo ago First seen · 91 lines · 0 tokens per session scan A 30967c0418b2
php is a skill published in the GitHub repository SumonMSelim/agentguard (54 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,457 tokens. 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-30.
Other skills, from other repositories
laravel-specialist
Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…
laravel-security
Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.
integration-fixture
Add a .test integration fixture for one behavior.
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.
create-module
Scaffold a new Marko module — a self-contained Composer package with composer.json, namespaced src/, and Pest tests. Use this skill whenever the user asks to create, add, or scaffold a new Marko module or package. Concrete triggers: 'create a module named payment', 'scaffold an acme/blog package', 'add a new module…
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.