home / skills / makfly / superpowers-symfony / api-platform-state-providers
This skill helps you define explicit API Platform state provider contracts in Symfony, ensuring secure, versioned operations and consistent serialization.
npx playbooks add skill makfly/superpowers-symfony --skill api-platform-state-providersReview the files below or copy the command above to add this skill to your agents.
---
name: symfony:api-platform-state-providers
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
description: Deliver robust API Platform contracts in Symfony with explicit operations, mapping, and policy-safe behavior. Use for api platform state providers tasks.
---
# Api Platform State Providers (Symfony)
## Use when
- Designing or evolving API Platform contracts and operations.
- Aligning serialization, validation, and security behavior.
## Default workflow
1. Define operation-level contract and payload boundaries.
2. Implement resource/DTO/provider/processor changes with explicit mapping.
2. Apply operation-specific validation and security constraints.
2. Validate functional behavior across happy and negative paths.
## Guardrails
- Keep API contract explicit and version-aware.
- Avoid exposing internal entity fields implicitly.
- Prevent drift between docs and actual serialization.
## Progressive disclosure
- Use this file for execution posture and risk controls.
- Open references when deep implementation details are needed.
## Output contract
- API artifacts changed (resource/DTO/provider/processor).
- Contract/security decisions and rationale.
- Functional verification results.
## References
- `reference.md`
- `docs/complexity-tiers.md`
This skill helps design and implement API Platform state providers in Symfony with clear operation contracts, explicit mapping, and policy-safe behavior. It focuses on aligning serialization, validation, and security per operation to prevent contract drift and accidental data exposure. Use it to deliver predictable API behavior and verifiable changes to resources, DTOs, providers, and processors.
The skill inspects each API operation and enforces an operation-level contract that defines payload boundaries, mapping rules, and validation scopes. It guides implementation of resource/DTO changes, provider and processor wiring, and operation-specific security checks. Outputs include the artifacts changed, the contract and security decisions with rationale, and functional verification results for happy and negative paths.
What output should I expect when using this skill?
You get a list of changed artifacts (resources, DTOs, providers, processors), the contract and security decisions with rationale, and functional verification results for both happy and negative paths.
How does this prevent exposing internal entity fields?
By requiring explicit DTOs, mapping rules, and serialization groups per operation, it avoids implicit exposure and enforces version-aware public contracts.