/laravel-ddd:craft-guard-clausefrom laravel-ddd
Crafting Guard Clauses. Early returns for preconditions.
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.
"Handle the bad cases first. Let the happy path breathe."
| ❌ Don't | ✅ Do | Why |
|---|---|---|
| Nested if/else trees | Guard clauses | Readability, maintainability |
| Check then continue | Check then exit | Happy path stays clear |
| 10+ guards in one method | Split the method | Too many guards = too much responsibility |
| Silent return on failure | Return Result or throw | Caller needs to know |
See examples.md.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub attac-t/the-foundry --plugin laravel-ddd47 skills in this plugin
/craft-contextCrafting Context Objects. Parameter encapsulation for complex operations.