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 agentmods add skills/personamanagmentlayer/pcl/php-expertnpx skills add personamanagmentlayer/pcl --skill php-expertgit clone --depth 1 https://github.com/personamanagmentlayer/pclWrote 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/personamanagmentlayer/pcl/php-expert)<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/php-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/php-expert.svg" alt="Measured on agentmods" 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 | $0.00021 | $0.05167 |
| Opus 5 | $0.00010 | $0.02583 |
| Sonnet 5 | $0.00004 | $0.01033 |
| Haiku 4.5 | $0.00002 | $0.00517 |
Grade A, and why
php-expert 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 — 955 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP Expert
Expert guidance for modern PHP development including PHP 8+ features, Laravel framework, Composer dependency management, and PHP best practices.
Core Concepts
PHP 8+ Features
- Union types and mixed type
- Named arguments
- Attributes (annotations)
- Constructor property promotion
- Match expressions
- Nullsafe operator
- JIT compiler
- Fibers (PHP 8.1+)
- Readonly properties and classes
Object-Oriented PHP
- Classes and objects
- Interfaces and abstract classes
- Traits
- Namespaces
- Autoloading (PSR-4)
- Type declarations
- Visibility modifiers
Modern PHP
- Strict types
- Return type declarations
- Property type declarations
- Enums (PHP 8.1+)
- First-class callable syntax
Modern PHP 8+ Syntax
Constructor Property Promotion
<?php
// Before PHP 8
class User {
private string $name;
private string $email;
private int $age;
public function __construct(string $name, string $email, int $age) {
$this->name = $name;
$this->email = $email;
$this->age = $age;
}
}
// PHP 8+ (constructor property promotion)
class User {
public function __construct(
private string $name,
private string $email,
private int $age,
) {}
public function getName(): string {
return $this->name;
}
}
$user = new User('Alice', '[email protected]', 30);
Named Arguments
<?php
function createUser(
string $name,
string $email,
int $age = 18,
bool $admin = false,
): User {
return new User($name, $email, $age, $admin);
}
// Named arguments (PHP 8+)
$user = createUser(
name: 'Alice',
email: '[email protected]',
age: 30,
admin: true,
);
// Skip optional parameters
$user = createUser(
name: 'Bob',
email: '[email protected]',
);
Union Types and Mixed
<?php
// Union types (PHP 8+)
function processValue(int|float $number): int|float {
return $number * 2;
}
function findUser(int|string $identifier): ?User {
if (is_int($identifier)) {
return User::find($identifier);
}
return User::where('email', $identifier)->first();
}
// Mixed type (accepts any type)
function debugValue(mixed $value): void {
var_dump($value);
}
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 First seen · 955 lines · 21 tokens per session scan A 128f1ef4b0ac
php-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (41 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 21 tokens to every session and 5,167 once invoked, about $0.0001 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-03.
Other skills, from other repositories
request
Generate form request validation for CatchAdmin module.
routes
Generate route configuration for CatchAdmin module.
php
Use when writing, reviewing or modernizing PHP (8.3-8.5) outside Laravel — strict types, union and intersection types, readonly classes, backed enums, property hooks and asymmetric visibility, the pipe operator and clone-with, Composer with PSR-4, PER-CS style, PSR interop, and the quality toolchain (PHPStan, Pint…
Test Scaffold (Laravel/PHPUnit)
Generate PHP/Laravel (PHPUnit) test skeletons from specifications.
PHP Patterns
Use this skill when working in modern PHP (8+) codebases and you want predictable structure, safe IO boundaries, and maintainable application/service design.
php
Modern PHP programming patterns.