php

php is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 97 tokens per session (4,181 once invoked), scanned A, original, MIT.

A guide to writing and modernising framework-independent PHP 8 code, including its type system, Composer packages, coding standards, and quality tools.

In plain words
What is it for?
Use it for PHP classes, enums, value objects, Composer setup, PSR-4 autoloading, namespaces, static analysis, formatting, and modernising older PHP code.
Why use it?
It helps developers replace outdated PHP patterns with current language features and consistent checks for code quality.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for PHP classes, enums, value objects, Composer setup, PSR-4 autoloading, namespaces, static analysis, formatting, and modernising older PHP code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ericrisco/rsc-harness/php
Install

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.

Any agent
npx skills add ericrisco/rsc-harness --skill php
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for php

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/php/github.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/php)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/php"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/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.

agentmods 80×15 button for php

Your own site · 80×15
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/php"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/php.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,181 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00097 $0.04181
Opus 5.5 $0.00039 $0.01672
Sonnet 5.5 $0.00019 $0.00836
Haiku 4.5 $0.00010 $0.00418

Measured 1mo ago against content hash ac309696b5f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/php/SKILL.md · 398 lines

How it starts

The opening of the file, as written. The whole thing — 398 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Modern PHP (8.x)

Write PHP the way the 2025-2026 ecosystem does: declare(strict_types=1) at the top of every file, typed everything, Composer-first, statically analyzed at the top level — not the way a 2015 WordPress plugin did. This skill owns the language and its framework-agnostic ecosystem: the type system, Composer + PSR-4, PER-CS style, the PSR interop interfaces, and the quality toolchain.

Version targeting. Floor is 8.3 (security-only, the lowest you should support). Default new code to 8.4 (property hooks, asymmetric visibility). Use 8.5 features (|>, clone with, array_first/array_last, #[\NoDiscard]) only when the deploy runtime is confirmed 8.5+ — 8.5 released 2025-11-20. 7.x and 8.0-8.2 are EOL; never target them.

When to use

  • Authoring/reviewing/refactoring any .php file or a composer.json.
  • Designing classes: enums, DTOs, value objects, readonly classes, interfaces, traits.
  • Standing up a vanilla-PHP project: Composer, PSR-4 autoload, namespaces, entrypoint.
  • Wiring quality gates: PHPStan/Psalm, Pint/PHP-CS-Fixer, Rector, CI.
  • Modernizing legacy 5.x/7.x patterns to 8.x idioms.
  • Picking framework-agnostic libs (Symfony components, Guzzle, Monolog, Doctrine DBAL, league/*) and PSR-compatible interop.

When NOT to use (delegate)

The ask is about Route to This skill keeps
Eloquent, Blade, Artisan, container bindings, queues laravel the PHP underneath Laravel only
WP hooks, the loop, wp_*, $wpdb wordpress nothing WP-specific
Shopify app/theme SDK work shopify nothing Shopify-specific
OWASP threat modeling, authz/abuse review secure-coding PHP-native controls (PDO, password_hash, escaping)
REST resource naming, status-code contract as a discipline api-design PHP request/response code only
DB schema/index tuning mysql / postgresdb PDO usage from the PHP side

The type system, Composer, PSR, and the static-analysis toolchain are canonical here and nowhere else in the catalog.

Read the full file on GitHub · 398 lines

Files

What ships with it

5 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.

Changes

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.

  1. 1mo ago First seen · 398 lines · 97 tokens per session scan A ac309696b5f3

Subscribe to this mod's changes

php is a skill published in the GitHub repository ericrisco/rsc-harness (237 stars, last pushed yesterday), licensed MIT. It adds 97 tokens to every session and 4,181 once invoked, about $0.0004 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-03.

Related

Other skills, from other repositories

php-expert

Expert-level PHP development with PHP 8+, Laravel, Composer, and modern best practices. Use when the user mentions Laravel, Composer, Symfony, PHPUnit, or PSR standards, or when the task involves PHP 8+ Features, Object-Oriented PHP, Modern PHP, or Constructor Property Promotion.

personamanagmentlayer/pcl · 64 tokens

neuron-symfony-integration

Integrate Neuron AI agents into a Symfony 8 app, from packages, env keys, a Doctrine migration for the Neuron tables and services.yaml wiring to a shared agent bound per request with for(), a thread voter, JSON and AG-UI (CopilotKit) or useChat streaming with StreamedResponse, reload with pending approvals, Messenger…

neuron-core/neuron-ai · 221 tokens

laravel-patterns

Laravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps.

hashgraph-online/awesome-codex-plugins · 32 tokens

laravel-security

Laravel security best practices for authn/authz, validation, CSRF, mass assignment, file uploads, secrets, rate limiting, and secure deployment.

hashgraph-online/awesome-codex-plugins · 34 tokens

laravel-plugin-discovery

Discover and evaluate Laravel packages via LaraPlugins.io MCP. Use when the user wants to find plugins, check package health, or assess Laravel/PHP compatibility.

hashgraph-online/awesome-codex-plugins · 37 tokens

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…

marko-php/marko · 120 tokens