Laravel Dtos
This skill generates Laravel Data Transfer Objects (DTOs) to cleanly map data between models and APIs, improving code organization and reducing boilerplate.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add laravel-dtos npx -- -y @trustedskills/laravel-dtos
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"laravel-dtos": {
"command": "npx",
"args": [
"-y",
"@trustedskills/laravel-dtos"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The laravel-dtos skill provides a streamlined approach to generating Data Transfer Objects (DTOs) within Laravel applications. It automates repetitive tasks associated with DTO creation, including defining properties, type hinting, and casting data during object construction. This significantly reduces boilerplate code and improves development efficiency when working with complex data structures in Laravel projects.
When to use it
- Rapid API Development: Quickly generate DTOs for request bodies or response objects in your Laravel APIs.
- Data Transformation: Simplify the process of transforming data between different formats within your application.
- Form Handling: Efficiently create DTOs from form submissions, ensuring consistent data structure and validation.
- Service Layer Integration: Use it to map data received from external services into a standardized DTO format for processing.
Key capabilities
- Automated DTO generation
- Property definition with type hinting
- Data casting during object construction
Example prompts
- "Generate a DTO named
UserRegistrationRequestwith properties:name(string),email(string), andpassword(string)." - "Create a DTO called
ProductDetailsResponseincluding fields forid(integer),name(string), andprice(float)." - "Generate a DTO from this JSON:
{ "firstName": "John", "lastName": "Doe", "age": 30 }."
Tips & gotchas
The skill requires a working Laravel environment to function correctly. Ensure you have a Laravel project set up before attempting to use the laravel-dtos skill, as it leverages Laravel's conventions and features.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.