php-modernization

A guide for updating PHP code to newer PHP 8.1–8.5 features and common PHP coding standards.

In plain words
What is it for?
Use it when adding types, enums, data-transfer objects, read-only properties, or newer PHP syntax, or when checking PSR and PHP-FIG standards.
Why use it?
It helps make older PHP code safer, more consistent, and easier to check with tools such as PHPStan and PHP-CS-Fixer.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/netresearch/php-modernization-skill/php-modernization
Any agent
npx skills add netresearch/php-modernization-skill --skill php-modernization
Clone the repo
git clone --depth 1 https://github.com/netresearch/php-modernization-skill

Made for: Claude Code, Codex.

Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,185 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin unknown 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 $0.00102 $0.01185
Opus 5 $0.00051 $0.00593
Sonnet 5 $0.00020 $0.00237
Haiku 4.5 $0.00010 $0.00119

Measured yesterday against content hash 0e281d27053e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

php-modernization scanned grade C with 1 finding 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.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/_common.py, scripts/introspect.py, scripts/modernize_loop.py, …), 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Never trust a warm PHPStan cache after vendor change: `rm -rf /tmp/phpstan-* var/cache/phpstan` first.
skills/php-modernization/SKILL.md · 81 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Files

What ships with it

32 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. yesterday First seen · 81 lines · 102 tokens per session scan C 0e281d27053e

Subscribe to this mod's changes

php-modernization is a skill published in the GitHub repository netresearch/php-modernization-skill (43 stars, last pushed 3d ago), with no licence file. It adds 102 tokens to every session and 1,185 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sanctuary

Security, custody, and privacy infrastructure for AI agents. Use when the agent needs encrypted state storage, self-custodied identity, selective disclosure, zero-knowledge proofs, portable reputation, sovereignty health reporting, handshakes, MCP-to-MCP federation, protection-posture auditing, or principal dashboard…

eriknewton/sanctuary-framework · 120 tokens

git-workflow

Use when establishing branching strategies, implementing Conventional Commits, creating or reviewing PRs, resolving PR review comments, merging PRs (including CI verification, auto-merge queues, and post-merge cleanup), managing PR review threads, merging PRs with signed commits, handling merge conflicts, verifying a…

netresearch/git-workflow-skill · 183 tokens

security-audit

Use when conducting security assessments — OWASP Top 10 / API / LLM, CWE Top 25, CVSS scoring — auditing PHP/TYPO3, APIs, frontend, Terraform/K8s/Docker IaC, AWS cloud, AI agent configs, or scanning dependencies.

netresearch/security-audit-skill · 61 tokens

skill-repo

Use when creating skill repositories, standardizing or validating skill repo structure, setting up composer/release workflows, configuring split licensing (MIT + CC-BY-SA-4.0), fixing plugin.json / SKILL.md validation or version-parity errors, or releasing a skill version (version bump, tagging).

netresearch/skill-repo-skill · 65 tokens

go-development

Use when developing Go applications, implementing job schedulers or cron (netresearch/go-cron, ofelia), Docker API integrations, LDAP/AD clients, building resilient services with retry logic, setting up Go test suites (unit/integration/fuzz/mutation), or running golangci-lint.

netresearch/go-development-skill · 63 tokens

typo3-extension-upgrade

Use when upgrading TYPO3 extensions to newer LTS versions (v11->v12, v12->v13, v13->v14 - v14.3 LTS is the current target), running Extension Scanner, Rector, Fractor, PHPStan, fixing deprecated APIs, or resolving compatibility issues. Also triggers on: migration, version upgrade, deprecated API, dual-version…

netresearch/typo3-extension-upgrade-skill · 101 tokens