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/krzysztofsurdy/code-virtuoso/php-upgradenpx skills add krzysztofsurdy/code-virtuoso --skill php-upgradegit clone --depth 1 https://github.com/krzysztofsurdy/code-virtuosoWrote 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/krzysztofsurdy/code-virtuoso/php-upgrade)<a href="https://agentmods.dev/skills/krzysztofsurdy/code-virtuoso/php-upgrade"><img src="https://agentmods.dev/badge/skills/krzysztofsurdy/code-virtuoso/php-upgrade.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.1 | $0.00099 | $0.01827 |
| Opus 5 | $0.00049 | $0.00914 |
| Sonnet 5 | $0.00020 | $0.00365 |
| Haiku 4.5 | $0.00010 | $0.00183 |
Grade A, and why
php-upgrade 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 6d 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 — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP Version Upgrade
Upgrade one minor version at a time. Never skip versions - each step surfaces deprecations that become errors in the next release. Every upgrade follows the same cycle: audit, automate, test, deploy.
Core Principles
| Principle | Meaning |
|---|---|
| Changelog first | Before any upgrade, search the web for the official PHP migration guide (php.net/migration) or ask the user for the changelog - never rely on static knowledge alone |
| One version at a time | Upgrade 8.1 -> 8.2 -> 8.3 -> 8.4 sequentially - skipping versions makes it impossible to isolate breakage |
| Fix deprecations before upgrading | Deprecations in version N become errors in version N+1 - treat them as mandatory fixes |
| Automate first, manual second | Run Rector and PHPCompatibility before touching code by hand - they catch 80%+ of required changes |
| Prove it with tests | Never consider an upgrade complete without a passing test suite on the target version |
| Pin your platform | Set config.platform.php in composer.json to match your lowest deployment target |
Upgrade Process Overview
Phase 0: Read the Changelog
Before touching any code, obtain the actual changelog for the target PHP version:
- Search the web for
PHP X.Y migration guide(e.g.,PHP 8.4 migration guide php.net) - Or ask the user to provide the changelog / release notes
- Read the official migration page at
https://www.php.net/manual/en/migrationXY.php
This is non-negotiable. Each version has unique changes that static skill knowledge cannot fully capture.
Phase 1: Audit
Before changing any code, understand the scope of the upgrade.
- Run PHPCompatibility against the target version to identify incompatible code
- Run php-parallel-lint with the target PHP binary to catch syntax errors
- Run
composer outdatedto check if all dependencies support the target version - Review the official migration guide at php.net for the target version
- Check PHP extensions for compatibility (
ext-intl,ext-mbstring, etc.)
What ships with it
2 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.
- 6d ago First seen · 165 lines · 99 tokens per session scan A 0d554b514677
php-upgrade is a skill published in the GitHub repository krzysztofsurdy/code-virtuoso (20 stars, last pushed 3mo ago), licensed MIT. It adds 99 tokens to every session and 1,827 once invoked, about $0.0005 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-08-30.
Other skills, from other repositories
auditing-php-applications
Audit PHP web application source for critical vulnerabilities using PHP's specific sink and footgun catalog — object injection via unserialize and phar:// POP chains, type-juggling and magic-hash auth bypass, LFI/RFI through php:// and phar:// wrappers, dynamic includes and extract()/superglobal trust, SQL injection…
xml-config-migrating
Use this skill when a Shopware plugin or app-server extension needs its XML configuration migrated to PHP — phrases like "migrate services.xml", "convert my plugin config to PHP", "xml to php migration", "fix the XML deprecation", "prepare my plugin for Shopware 6.8 / Symfony 8", or when a deprecation like "The XML…
phpunit-unit-test-reviewing
Internal sub-skill. Do not auto-activate. Use only when explicitly invoked by name by another skill or agent.
mvc-expert
Expert guidelines to refactor legacy PHP codebases into clean, modern, and scalable MVC-structured projects / Pedoman ahli untuk merefaktor codebase PHP lama menjadi proyek terstruktur MVC yang bersih, modern, dan skalabel.
phpunit-integration-test-generation
Use this skill when the user asks to generate, write, or create integration tests for a Shopware 6 source class whose contract requires wired-up code — phrases like "generate integration tests for X", "write an integration test for this controller", "test this indexer", "create an integration test for the message…
phpunit-unit-test-writing
Use this skill when the user asks to write, generate, create, or add PHPUnit unit tests for a Shopware 6 source class — phrases like "write unit tests for X", "generate tests for ClassName", "create PHPUnit tests", "add test coverage", "test this class", "cover this with tests", "I need tests for", "unit test this"…