framework:make:out

Generate immutable final readonly PHP Output DTO classes with private constructors.

9|2|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/atournayre/claude-marketplace --skill framework-make-out
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: framework:make:out
Source: https://github.com/atournayre/claude-marketplace/tree/main/framework/skills/make-out
Command: npx skills add https://github.com/atournayre/claude-marketplace --skill framework-make-out

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the repetitive manual work of creating immutable Data Transfer Objects (DTOs) for your entities, ensuring type safety and preventing data corruption between your domain and external systems.

Core Features & Use Cases

  • Automated Class Generation: Instantly creates final readonly PHP classes with proper encapsulation.
  • Immutability by Design: Generates classes that cannot be modified after creation, preventing accidental data mutations.
  • Use Case: When building an API, use this Skill to automatically generate ProductOut classes that safely expose your Product entity data without leaking internal implementation details.

Quick Start

Use skill framework:make:out and provide the entity name when prompted.

Frequently Asked Questions about framework:make:out

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

FAQPage Schema
How do I generate immutable DTO classes for my PHP API responses?

Immutable DTO classes enforce read-only data representation after creation. This Skill generates final readonly PHP classes with private constructors and static factory methods, preventing accidental mutations and protecting your domain entities from external modification.

What's the best way to prevent data corruption between my domain layer and API output?

Use immutable output DTOs to create anti-corruption boundaries. This Skill automatically generates encapsulated classes that expose only necessary entity data through a strict, unchangeable interface, blocking unauthorized changes and internal implementation leaks.

Can I automate creating multiple immutable DTO classes for different entities?

Yes. Provide the entity name and this Skill instantly generates a complete immutable DTO with proper encapsulation, eliminating repetitive manual class scaffolding across your codebase and ensuring consistent immutability semantics.

Do I need to write custom getter methods for immutable DTO properties?

No. This Skill generates all accessors and factory logic automatically. The generated class handles property exposure through readonly fields and a static new() factory, so you skip manual boilerplate while maintaining type safety.

When should I use immutable DTOs instead of mutable transfer objects?

Use immutable DTOs whenever data crosses layer boundaries—especially in APIs, inter-service transfers, or external integrations. Immutability prevents accidental state changes, reduces bugs, and documents that the data is meant to be read-only.