api-platform-tests

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

A guide for writing functional tests for API Platform 4.3 endpoints. Functional tests send requests to the API and check complete responses, permissions, errors, pagination, and data changes.

In plain words
What is it for?
Use it to test new or changed API operations, protected endpoints, ownership rules, filters, pagination, validation errors, and parallel test runs.
Why use it?
It helps catch broken endpoints and outdated API response assumptions while keeping database setup, authentication, password hashing, and test execution manageable.

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-tests
Any agent
npx skills add gerard-labs/superpowers-api-platform --skill api-platform-tests
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-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/gerard-labs/superpowers-api-platform/api-platform-tests.svg)](https://agentmods.dev/skills/gerard-labs/superpowers-api-platform/api-platform-tests)
Your own site
<a href="https://agentmods.dev/skills/gerard-labs/superpowers-api-platform/api-platform-tests"><img src="https://agentmods.dev/badge/skills/gerard-labs/superpowers-api-platform/api-platform-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 257 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 788 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.00257 $0.00788
Opus 5 $0.00129 $0.00394
Sonnet 5 $0.00051 $0.00158
Haiku 4.5 $0.00026 $0.00079

Measured 3d ago against content hash a53dda17721c, 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-tests 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 3d 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-tests/SKILL.md · 48 lines

What it actually says

API Platform 4.3 — Functional tests

Use when

  • Writing API tests for a new resource / operation.
  • Updating older tests still using hydra:member / hydra:totalItems (broken in 4.x).
  • Speeding up a slow suite (Foundry → DAMA → ParaTest progression).
  • Authenticating clients with JWT for protected endpoints.
  • Asserting the JSON-LD schema strictly.

Default workflow

  1. Install the dev stack — symfony/test-pack, http-client, browser-kit, justinrainbow/json-schema, dama/doctrine-test-bundle, zenstruck/foundry, brianium/paratest.
  2. Wire DAMA via the PHPUnit extension; configure md5 hashing in config/packages/test/security.yaml.
  3. Write tests extending ApiTestCase with Factories + ResetDatabase traits.
  4. Cover happy path, 401, 403, 404, 422, ownership, filters, pagination on every operation.
  5. Run with ./vendor/bin/paratest -p8 in CI for parallel execution.

Guardrails

  • No hydra: prefix anywhere in assertions in 4.x. Use member, totalItems, view, next.
  • Default page size is 30 in 4.x (not 20 like 3.x). Adapt counts.
  • Hash algorithm md5 is for tests only. Never in any other env.
  • One assertion per scenario. No conditional logic in tests.
  • Tests are independent — DAMA transaction rollback or Foundry ResetDatabase ensures it; never rely on order.

Progressive disclosure

  • SKILL.md lists posture and rules.
  • reference.md carries the full stack setup, the reusable authenticated client, JWT auth tests, schema assertions, filters + pagination + auth + ownership coverage matrix, scenario-based naming, CI patterns.

Output contract

  • Tests in tests/Functional/Api/ extending ApiTestCase (or a project-specific AbstractApiTest).
  • Each operation covered with happy path + at least one negative case (401/403/404/422).
  • Schema assertions on collection and item responses.
  • CI invokes ./vendor/bin/paratest -p8.

References

  • reference.md
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. 3d ago First seen · 48 lines · 257 tokens per session scan A a53dda17721c

Subscribe to this mod's changes

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