home / skills / makfly / superpowers-symfony / api-platform-serialization
This skill helps you define explicit API Platform contracts in Symfony for serialization, validation, and security across operations.
npx playbooks add skill makfly/superpowers-symfony --skill api-platform-serializationReview the files below or copy the command above to add this skill to your agents.
---
name: symfony:api-platform-serialization
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 serialization tasks.
---
# Api Platform Serialization (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 delivers clear, version-aware API Platform contracts for Symfony with explicit operations, mapping, and safety controls. It focuses on serialization boundaries, DTO/resource mapping, and policy-safe behavior so APIs behave predictably across releases. Use it to reduce drift between documentation and runtime serialization.
The skill inspects operation-level contracts and enforces explicit payload boundaries by recommending or producing resources, DTOs, providers, and processors. It applies operation-specific validation and security constraints and documents the mapping and rationale for each change. The workflow includes functional verification across happy and negative paths and produces artifacts and verification results as output.
What outputs should I expect from this skill?
A list of changed API artifacts (resources, DTOs, providers, processors), the contract and security decisions with rationale, and functional verification results for key flows.
How does this prevent exposing internal fields?
By recommending explicit DTOs/resources and serialization groups, and by enforcing mapping and processors that only include intended fields and apply access checks.