api-platform-upgrade

api-platform-upgrade is a skill for Claude Code, Codex from gerard-labs/superpowers-api-platform. It costs 49 tokens per session (963 once invoked), scanned A, original, MIT.

A migration guide for moving an API Platform project from version 3.x or earlier 4.x releases to 4.3. API Platform is a PHP framework for building APIs.

In plain words
What is it for?
Use it when upgrading API Platform, replacing legacy namespaces and filters, updating OpenAPI settings, preparing for version 5, and checking the migration with tests and static analysis.
Why use it?
It helps identify renamed classes, changed defaults, removed interfaces, filter updates, and other breaking changes before they cause failures.

Skill for Claude CodeCodex

Part of the gerard plugin — 25 skills, 25 commands, 7 agents, 1 hook shipped together

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/gerard-labs/superpowers-api-platform/api-platform-upgrade
Any agent
npx skills add gerard-labs/superpowers-api-platform --skill api-platform-upgrade
Clone the repo
git clone --depth 1 https://github.com/gerard-labs/superpowers-api-platform

Made for: Claude Code, Codex.

Or install gerard, the plugin that ships this one along with the rest of its 25 skills, 25 commands, 7 agents, 1 hook.

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 api-platform-upgrade

README.md
[![agentmods](https://agentmods.dev/badge/skills/gerard-labs/superpowers-api-platform/api-platform-upgrade.svg)](https://agentmods.dev/skills/gerard-labs/superpowers-api-platform/api-platform-upgrade)
Your own site
<a href="https://agentmods.dev/skills/gerard-labs/superpowers-api-platform/api-platform-upgrade"><img src="https://agentmods.dev/badge/skills/gerard-labs/superpowers-api-platform/api-platform-upgrade.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 963 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00049 $0.00963
Opus 5 $0.00024 $0.00481
Sonnet 5 $0.00010 $0.00193
Haiku 4.5 $0.00005 $0.00096

Measured 4d ago against content hash de7dd6dc67a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-platform-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 4d 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.

skills/api-platform-upgrade/SKILL.md · 51 lines

How it starts

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

API Platform — Upgrade Guide (3.x → 4.x → v5 prep)

Use when

  • A composer.lock analysis (session hook) shows API Platform < 4.3.
  • Reviewing or migrating code that still imports ApiPlatform\Core\, uses #[ApiFilter], openapiContext, or implements SerializerAwareProviderInterface / SerializableProvider.
  • Bulk-renaming filters from the legacy classes to the modern 4.3 equivalents.
  • Planning the v5 cut-over (preventing regressions via PHPStan / Deptrac).

Default workflow

  1. Determine the starting version from composer.lock. Hard-stop on 3.x without explicit planning.
  2. Apply the 3.x → 4.0 macro-changes (namespaces, package split, Providers/Processors, defaults).
  3. Apply the 4.0 → 4.2 changes (modern filter pattern using parameters: [QueryParameter]).
  4. Apply the 4.2 → 4.3 breaks (explicit property on Exact/Iri/Partial/Uuid filters; review readonly entities; check @type consumers).
  5. Run the Rector script for openapiContext and inspect for any remaining legacy references.
  6. Enable v5-prep guards (PHPStan rule, Deptrac layer) to prevent regressions.

Guardrails

  • Do not migrate without a passing test suite. Re-baseline tests if they assert hydra:member (replace by member).
  • Default flips in 4.x can break consumers: hydra_prefix:false, standard_put:true, rfc_7807_compliant_errors:true, pagination_items_per_page:30. Audit clients before flipping.
  • eager_loading.force_eager: true is the 4.x default but often counter-productive — set it to false and use targeted join fetches.
  • Only this skill is allowed to mention #[ApiFilter], openapiContext, hydra:member, extends AbstractFilter, etc. The lint script rejects them elsewhere.

Progressive disclosure

  • SKILL.md summarizes the migration path.
  • reference.md carries the full tables: 3.x → 4.0 macro changes, 4.0 → 4.2 filter shift, 4.2 → 4.3 breaks, behavioral changes (isGranted pre-provider, Hydra #ShortName, LDP headers), 4.3 novelties, removed-in-v5 list, full legacy → modern mapping, tooling (Rector, PHPStan rule, Deptrac), composer outdated audit.

Read the full file on GitHub · 51 lines

Files

What ships with it

1 file 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. 4d ago First seen · 51 lines · 49 tokens per session scan A de7dd6dc67a1

Subscribe to this mod's changes

api-platform-upgrade is a skill published in the GitHub repository gerard-labs/superpowers-api-platform (2 stars, last pushed 3mo ago), licensed MIT. It adds 49 tokens to every session and 963 once invoked, about $0.0002 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-31.