create-dto
Skill1 starsChanged 5 months agoMITView on GitHub
Use when creating or changing DTOs, data objects, value objects, or input/output contracts for Laravel features.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- NarekManukyan/flutter-mobx-kittheir own version, first seen Sep 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- NarekManukyan/flutter-mobx-kit★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository64 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit-ai-agent-instructionsSkill
- audit-package-versionSkill
- configure-local-environmentSkill
- configure-secure-storageSkill
- create-actionSkill
- create-api-endpointSkill
- create-api-integrationSkill
- create-architecture-testSkill
- create-console-commandSkill
- create-database-migrationSkill
- create-domain-featureSkill
- create-eloquent-builderSkill
- create-event-listenerSkill
- create-inertia-pageSkill
- create-jobSkill
- create-laravel-boost-guidelinesSkill
- create-laravel-packageSkill
- create-livewire-componentSkill
- create-php-attributeSkill
- create-policySkill
- create-requestSkill
- create-serviceSkill
- debug-composer-conflictsSkill
- debug-failing-testsSkill
- debug-phpstanSkill
- decompose-modelSkill
- deploying-laravel-cloudSkill
- design-blade-componentSkill
- design-multi-tenant-featureSkill
- filament-developmentSkill
- filament-shieldSkill
- fix-github-actionsSkill
- format-codebase-pintSkill
- implement-api-rate-limitingSkill
- implement-import-exportSkill
- implement-notificationsSkill
- implement-observabilitySkill
- implement-permissionsSkill
- implement-subscription-billingSkill
- implement-webhooksSkill
- laravel-pennant-feature-flagsSkill
- laravel-pulse-monitoringSkill
- laravel-reverb-websocketsSkill
- manage-frontend-stylingSkill
- manage-localizationSkill
- prepare-package-releaseSkill
- refactor-business-logicSkill
- reuse-filament-resourcesSkill
- review-accessibilitySkill
- review-ai-generated-codeSkill
- review-featureSkill
- review-open-source-packageSkill
- review-package-readmeSkill
- review-performanceSkill
- review-securitySkill
- review-static-analysisSkill
- review-tailwind-fluxSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this skill when data crosses a boundary or must be reused by web, API, Livewire, jobs, commands, or integrations.
- Distinctive: line 22
Use Spatie Laravel Data by default now that it is installed.
- Very specific: line 23
Prefer final readonly class with constructor property promotion for immutable DTOs.
- Distinctive: line 24
Use Spatie Data attributes where they fit the property:
- Distinctive: line 36
Use enums for closed sets and typed class constants for reusable scalar contracts.
- Very specific: line 38
Add named constructors such as fromArray, fromRequest, or fromModel only when useful.
- Distinctive: line 39
Place validation rules near DTOs when the project convention supports it.
- Distinctive: line 40
Avoid persistence, authorization, or workflow logic.
- Distinctive: line 41
Add tests for construction, validation rules, serialization, and edge cases.
- Distinctive: line 58
Use Spatie Data collections/resources when a feature needs nested, transformed, or reusable data shapes.
- Distinctive: line 59
Prefer Spatie Data validation attributes before ad hoc array validation inside reusable code.
- Distinctive: line 63
Test required fields, type conversion, defaults, invalid data, and serialization if exposed.
- Distinctive: line 67
Do not trust DTO construction as authorization.
- Distinctive: line 68
Avoid including sensitive fields in output DTOs unless explicitly intended.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create DTO Or Data Object
When To Use
Use this skill when data crosses a boundary or must be reused by web, API, Livewire, jobs, commands, or integrations.
Inputs Needed
- Fields, types, validation rules, source boundaries, output consumers, defaults, and serialization needs.
Workflow
- Inspect existing data object conventions.
- Use Spatie Laravel Data by default now that it is installed. If a different data style already exists in a nearby module, follow the local convention.
- Prefer
final readonly classwith constructor property promotion for immutable DTOs. - Use Spatie Data attributes where they fit the property:
#[MapInputName]#[MapOutputName]#[WithCast]#[WithTransformer]#[Computed]#[ValidationAttribute]or package validation attributes#[DataCollectionOf]#[Lazy]#[Hidden]#[LoadRelation]and#[LoadMissing]#[Inject]or property injection attributes when the package or project convention uses them
- Use enums for closed sets and typed class constants for reusable scalar contracts.
- Keep DTOs client-agnostic.
- Add named constructors such as
fromArray,fromRequest, orfromModelonly when useful. - Place validation rules near DTOs when the project convention supports it.
- Avoid persistence, authorization, or workflow logic.
- Add tests for construction, validation rules, serialization, and edge cases.
Files That May Be Created
app/Data/*.php,app/DTOs/*.php, or the existing local equivalent.- DTO tests.
Files That May Be Modified
- Form Requests, Actions, Resources, Livewire components, controllers, jobs, and tests.
Architecture Rules
- DTOs represent input or output contracts.
- DTOs support API and UI reuse.
- DTOs must not depend on Livewire, Blade, controllers, or responses.
- DTOs should use modern PHP typing instead of unstructured arrays whenever practical.
- Use Spatie Data collections/resources when a feature needs nested, transformed, or reusable data shapes.
- Prefer Spatie Data validation attributes before ad hoc array validation inside reusable code.
Testing Requirements
- Test required fields, type conversion, defaults, invalid data, and serialization if exposed.
Security Requirements
- Do not trust DTO construction as authorization.
- Avoid including sensitive fields in output DTOs unless explicitly intended.
Review Checklist
- Is the DTO stable and client-agnostic?
- Are fields typed?
- Are validation rules close enough to stay synchronized?
Examples
Good Example
namespace App\Data;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Attributes\Validation\Email;
use Spatie\LaravelData\Attributes\Validation\Required;
use Spatie\LaravelData\Attributes\Validation\Max;
final readonly class RegisterUserData extends Data
{
public function __construct(
#[Required, Max(255)]
public string $name,
#[Required, Email]
public string $email,
) {}
}Bad Example
// ❌ Poor type safety, no validation context, difficult to reuse in background jobs.
class RegisterController extends Controller
{
public function store(Request $request)
{
$this->action->handle($request->all());
}
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

