api-platform-resources — Claude Code skill: API setup
api-platform-resources is a Claude Code skill for configuring API Platform resources for REST and GraphQL. It activates for resource creation and changes to operations, pagination, or OpenAPI docs.
MIT ★ 234 updated 2026-10-05
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a claude-codeWhat api-platform-resources does
The skill helps define a class with #[ApiResource], choose its CRUD operations, and configure collection pagination. For API documentation, it uses typed OpenAPI objects rather than an openapiContext array.
Once an operation is declared, API Platform stops adding the automatic CRUD set. For example, operations: [new Get()] does not add a collection operation, Post, or Delete. The skill also guides checks of generated routes and tests for declared operations. On Symfony 6.4 LTS, pin the API Platform components to ~4.3.0.
What it helps with
- expose a class as an API resource
- choose the exact CRUD operations
- configure collection pagination
- document operations with typed OpenAPI objects
- check routes and tests for declared operations
Example prompts for the agent
- Expose this class with
#[ApiResource]and list the operations it should support. - Configure pagination for this collection through the resource attributes.
- Replace
openapiContextwith typed OpenAPI objects, then check the routes.
How to install api-platform-resources
1Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a claude-code2Manually: put the files in place
~/.claude/skills/api-platform-resources/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/api-platform-resources/
1Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a codex2Manually: put the files in place
.agents/skills/api-platform-resources/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a cursor2Manually: put the files in place
.cursor/skills/api-platform-resources/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dev-toolings/superpowers-symfony content/skills/api-platform-resources2Manually: put the files in place
.github/skills/api-platform-resources/SKILL.md1Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a gemini-cli2Platform CLI
gemini skills install https://github.com/dev-toolings/superpowers-symfony --path content/skills/api-platform-resourcesManually: put the files in place
.devin/skills/api-platform-resources/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about api-platform-resources
How do I install api-platform-resources in Claude Code?
Run npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a claude-code. The skill file is at ~/.claude/skills/api-platform-resources/SKILL.md.
What does api-platform-resources do?
It guides API Platform resource setup, including operations, pagination, and typed OpenAPI documentation. It also covers checking generated routes and tests.
What happens when I declare an explicit operation list?
Declaring any operation disables automatic CRUD generation. For instance, operations: [new Get()] does not add collection, Post, or Delete operations.
Source text
SKILL.md · MIT
--- name: api-platform-resources description: Configure API Platform resources (v5, 4.4, 4.3) with explicit operations, pagination, and typed OpenAPI for clean, versioned REST/GraphQL APIs capabilities: [read, search, edit, shell] tags: [api-platform] # projected by `bun run build` — do not edit by hand allowed-tools: - Read - Glob - Grep - Write - Edit - Bash --- # Api Platform Resources (Symfony) ## Use when - Exposing a new entity or class as an `#[ApiResource]`. - Choosing exactly which of `Get`, `GetCollection`, `Post`, `Put`, `Patch`, and `Delete` the API offers. - Tuning collection pagination (items per page, partial pagination, client control). - Documenting operations with typed OpenAPI objects instead of `openapiContext` arrays. ## Default workflow 1. Install only the components you need: `api-platform/symfony`, `api-platform/doctrine-orm`, and optionally `api-platform/graphql`; on Symfony 6.4 LTS, pin them to `~4.3.0`. 2. List every operation in `operations:`, since declaring any one stops the automatic CRUD, and `Put` is never automatic. 3. Set `uriTemplate`, `requirements`, `status`, or `routePrefix` only where the defaults do not fit. 4. Configure pagination through resource attributes or `api_platform.defaults` in `config/packages/api_platform.yaml`. 5. Describe operations with `openapi:` model objects, set `validationContext` groups, then check the routes and the OpenAPI export. ## Guardrails - Declaring one operation removes the default CRUD: an `operations: [new Get()]` resource has no collection, `Post`, or `Delete`. - `openapiContext` arrays are deprecated in v4: use the typed `openapi:` option. - `collectionOperations` and `itemOperations` no longer exist. - `paginationClientEnabled` lets clients disable pagination: keep `paginationMaximumItemsPerPage` set. ## Progressive disclosure - Use this file for execution posture and risk controls. - Open references when deep implementation details are needed. ## Output contract - The resource class with its explicit operation list and the routes it produces. - Pagination and OpenAPI settings, with the reason for each override. - Route listing and test results for each declared operation. ## References - `reference.md`
© dev-toolings · MIT · dev-toolings/superpowers-symfony