api-platform-resources — скилл для Claude Code: настройка API
Скилл api-platform-resources для Claude Code настраивает ресурсы API Platform для REST и GraphQL. Подключается при создании ресурса или настройке операций, пагинации и OpenAPI.
MIT ★ 234 обновлён 2026-10-05
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a claude-codeЧто делает api-platform-resources
Скилл помогает описать ресурс через #[ApiResource], выбрать операции CRUD и настроить пагинацию. Для документации API он использует типизированные объекты OpenAPI вместо массива openapiContext.
Если задана хотя бы одна операция, автоматический CRUD отключается: например, operations: [new Get()] не добавит коллекцию, Post или Delete. Скилл также помогает проверить список маршрутов и результаты тестов для объявленных операций. Для Symfony 6.4 LTS компоненты API Platform нужно закрепить на версии ~4.3.0.
Какие задачи решает
- объявить сущность или класс ресурсом API
- задать точный список операций CRUD
- настроить пагинацию коллекций
- описать операции типизированными объектами OpenAPI
- проверить маршруты и тесты операций
Примеры запросов агенту
- Оформи этот класс как ресурс
#[ApiResource]и перечисли доступные операции. - Настрой пагинацию коллекции через атрибуты ресурса.
- Замени
openapiContextна типизированные объекты OpenAPI и проверь маршруты.
Как установить api-platform-resources
1Через Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a claude-code2Вручную: положить файлы
~/.claude/skills/api-platform-resources/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/api-platform-resources/
1Через Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a codex2Вручную: положить файлы
.agents/skills/api-platform-resources/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a cursor2Вручную: положить файлы
.cursor/skills/api-platform-resources/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install dev-toolings/superpowers-symfony content/skills/api-platform-resources2Вручную: положить файлы
.github/skills/api-platform-resources/SKILL.md1Через Skills CLI (Vercel)
npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a gemini-cli2Командой платформы
gemini skills install https://github.com/dev-toolings/superpowers-symfony --path content/skills/api-platform-resourcesВручную: положить файлы
.devin/skills/api-platform-resources/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об api-platform-resources
Как установить api-platform-resources в Claude Code?
Выполни npx skills add dev-toolings/superpowers-symfony --skill api-platform-resources -a claude-code. Файл скилла находится по пути ~/.claude/skills/api-platform-resources/SKILL.md.
Что делает api-platform-resources?
Помогает настроить ресурсы API Platform: операции, пагинацию и типизированную документацию OpenAPI. Также описывает проверку маршрутов и тестов.
Что происходит с CRUD при явном списке операций?
После объявления хотя бы одной операции автоматический CRUD отключается. Например, operations: [new Get()] не создаёт операции для коллекции, Post или Delete.
Исходный текст
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