/laravel-ddd:decide-dto-vs-arrayfrom laravel-ddd
When to use DTO vs array. Type safety threshold.
Ships in laravel-ddd. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
"Arrays are bags of anything. DTOs are contracts."
Use Array when:
Use DTO when:
Ask: "Will another developer need to know what's in this?"
| Ask | Answer | Use |
|---|---|---|
| Does it cross a class boundary? | Yes | DTO |
| Is it reused elsewhere? | Yes | DTO |
| Does it need validation? | Yes | DTO |
| Is it a quick local variable? | Yes | Array |
See examples.md.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub attac-t/the-foundry --plugin laravel-ddd47 skills in this plugin
/craft-contextCrafting Context Objects. Parameter encapsulation for complex operations.Other plugins' skills for the same job