php:make-out

Generate immutable output DTOs with readonly properties and static factory methods.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of immutable Data Transfer Objects (DTOs) for representing output data in PHP applications, ensuring data integrity and simplifying data handling.

Core Features & Use Cases

  • Immutable Output DTOs: Generates final readonly classes to prevent modification after creation.
  • Standardized Output: Enforces a consistent structure for data returned from entities or services.
  • Use Case: After creating a new Product entity, use this Skill to generate a ProductOut.php DTO that cleanly exposes the necessary product details to an API response.

Quick Start

Use the php:make-out skill to generate a DTO for the Product entity within the App namespace.

Frequently Asked Questions about php:make-out

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

FAQPage Schema
How do I generate immutable DTOs for PHP entities?

To generate immutable DTOs for PHP entities, this Skill reads your entity definition and creates a final readonly class with a private constructor and static factory method. It outputs the DTO to a dedicated Out directory.

What is the best way to structure output data for PHP API responses?

The best way to structure output data for PHP API responses is using immutable Data Transfer Objects. This Skill generates readonly DTO classes that establish a clear, unchangeable contract for outgoing API data.

How do I create readonly PHP classes with a static factory method?

You can create readonly PHP classes with a static factory method by defining your entity in the src/Entity directory. This Skill automatically generates a corresponding immutable DTO featuring readonly properties and a private constructor.

Do I need an existing entity definition to generate PHP output DTOs?

Yes, you need an existing entity definition in src/Entity/{EntityName}.php. This Skill requires that source entity to accurately map and generate the corresponding immutable output DTO.

Can I use this approach to enforce data integrity in my PHP service layer?

Yes, you can use this approach to enforce data integrity in your PHP service layer. The generated immutable DTOs prevent data modification after creation, ensuring standardized and secure data handling.

Why generate immutable Data Transfer Objects for PHP applications?

You generate immutable Data Transfer Objects for PHP applications to prevent modification of output data after creation. This ensures data integrity and simplifies data handling across API development and service layer design.