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/gerard-labs/superpowers-api-platform/api-platform-mutatorsnpx skills add gerard-labs/superpowers-api-platform --skill api-platform-mutatorsgit clone --depth 1 https://github.com/gerard-labs/superpowers-api-platformWhat 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.00175 | $0.00663 |
| Opus 5 | $0.00088 | $0.00331 |
| Sonnet 5 | $0.00035 | $0.00133 |
| Haiku 4.5 | $0.00017 | $0.00066 |
Grade A, and why
api-platform-mutators 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 2d 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.
What it actually says
API Platform 4.3 — Resource & Operation Mutators (NEW 4.3)
Use when
- You want to apply a uniform metadata change to a resource (prefix routes, inject a group) without touching every operation by hand.
- The change is decidable at build time (no runtime dependency on the request).
- You're tempted to write a Context Builder for something that does not depend on the request — Mutator is cheaper.
Default workflow
- Decide: build-time (Mutator) or runtime (Context Builder)?
- For a resource-wide change, implement
ResourceMutatorInterfaceand annotate with#[AsResourceMutator(resourceClass: Book::class)]. - For a single-operation change, implement
OperationMutatorInterfaceand annotate with#[AsOperationMutator(operationName: '_api_Book_get_collection')]. - Return the modified
ApiResource/Operation(these objects are immutable — usewith*()mutators).
Guardrails
- Mutator = build time, no access to the request / user / locale. If you need any of those, use a Context Builder.
OperationandApiResourceare immutable. Always usewithOperations(),withNormalizationContext(),withRoutePrefix(), etc.- Operation names are stable (
_api_<ShortName>_<operation>by convention). Pin them in a constant if you reference them in multiple mutators.
Progressive disclosure
SKILL.mdcovers posture and decision tree.reference.mdcarries the fullAsResourceMutatorandAsOperationMutatorrecipes + the Context Builder vs Mutator comparison table.
Output contract
- Mutators in
src/ApiPlatform/Mutator/with explicit#[AsResourceMutator]/#[AsOperationMutator]annotations. - Build-time metadata changes verified via
php bin/console debug:router | grep apiandphp bin/console api:openapi:export --yaml. - A short comment in each mutator explaining what it changes and why.
References
reference.md
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.
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.
- 2d ago First seen · 42 lines · 0 tokens per session scan A 7e774ab4dd3e
api-platform-mutators is a skill published in the GitHub repository gerard-labs/superpowers-api-platform (2 stars, last pushed 3mo ago), licensed MIT. It adds 175 tokens to every session and 663 once invoked, about $0.0009 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.
Other skills, from other repositories
nextjs-pages-router
Set up tRPC in Next.js Pages Router with createNextApiHandler, createTRPCNext, withTRPC HOC, SSR via ssr option and ssrPrepass, SSG via createServerSideHelpers with getStaticProps, and server-side helpers for getServerSideProps prefetching.
react-query-setup
Set up @trpc/tanstack-react-query with createTRPCContext(), TRPCProvider, useTRPC() hook, queryOptions/mutationOptions factories, query invalidation via queryClient.invalidateQueries with queryFilter, and type inference with inferInput/inferOutput.
non-json-content-types
Handle FormData, file uploads, Blob, Uint8Array, and ReadableStream inputs in tRPC mutations. Use octetInputParser from @trpc/server/http for binary data. Route non-JSON requests with splitLink and isNonJsonSerializable() from @trpc/client. FormData and binary inputs only work with mutations (POST).
openapi-glossary
Use consistent OpenAPI terminology and definitions when writing documentation, educational material, and tooling guidance.
scalar-docs
Skill for writing and updating scalar.config.json — Scalar Docs configuration reference for users and LLMs.
create-tutorial
Scaffold a new Membrane API Gateway tutorial in the api-gateway repo — the numbered self-teaching YAML under distribution/tutorials/ /, its support files and README links, and the matching auto-discovered integration test. Use whenever the user asks to create, add, write, or scaffold a tutorial (or a tutorial step)…