api-platform:make-resource

Generates complete API Platform resources with CRUD, serialization, and validation.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/atournayre/claude-personas --skill api-platform-make-resource
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-platform:make-resource
Source: https://github.com/atournayre/claude-personas/tree/main/api-platform/skills/make-resource
Command: npx skills add https://github.com/atournayre/claude-personas --skill api-platform-make-resource

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of complete API resources for API Platform, including entities, DTOs, operations, serialization groups, and validation, significantly speeding up backend development.

Core Features & Use Cases

  • Resource Generation: Creates new entities or exposes existing ones as API resources.
  • Operation Configuration: Sets up standard CRUD operations (GET, POST, PUT, PATCH, DELETE) or custom ones.
  • Serialization & Validation: Configures #[Groups] and #[Assert] attributes for controlled data exposure and input validation.
  • Use Case: Quickly scaffold a new Product resource for an e-commerce API, defining its properties, read/write operations, and validation rules.

Quick Start

Use the api-platform:make-resource skill to generate a new API resource named 'Order'.

Frequently Asked Questions about api-platform:make-resource

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an API Platform resource with entity classes and CRUD operations?

Generating a complete API Platform resource involves creating entity or DTO classes, adding #[ApiResource] attributes, and defining CRUD operations with serialization groups and validation constraints to fully expose your data as a REST API.

What is the best way to expose existing Symfony entities as API Platform resources?

The best way to expose existing Symfony entities is to apply the #[ApiResource] attribute and configure serialization groups directly on the class. This allows API Platform to automatically wire CRUD operations without needing a separate Data Transfer Object layer.

Should I use a DTO or a direct entity strategy when building an API Platform resource?

Choosing a DTO strategy separates your data transfer objects from your database entities, while direct entity exposure maps API endpoints straight to your database schema. A resource generator can scaffold both approaches, applying appropriate serialization groups and validation constraints for either method.

How do I add validation constraints and serialization groups to API Platform resources?

Adding validation constraints and serialization groups to API Platform resources involves applying #[Assert] attributes for input validation and #[Groups] attributes for controlled data exposure. A resource generation tool scaffolds these annotations automatically alongside your CRUD operations.

Does API Platform resource generation detect my Symfony project namespace automatically?

Yes, automated API Platform resource generation can detect your project namespace and API Platform installation status automatically. This ensures that newly generated entities, DTOs, and attributes align correctly with your existing Symfony architecture.

Can I configure custom operations instead of standard CRUD when generating API Platform resources?

Configuring custom operations instead of standard CRUD is fully supported during API Platform resource generation. You can define specific endpoints beyond the default GET, POST, PUT, PATCH, and DELETE operations while applying the necessary serialization groups.