create-action
Skill1 starsChanged 5 months agoMITView on GitHub
Use when creating or changing an Action class for a Laravel business operation. Applies to reusable operations called from controllers, Livewire, jobs, commands, APIs, MCP handlers, or services.
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-api-endpointSkill
- create-api-integrationSkill
- create-architecture-testSkill
- create-console-commandSkill
- create-database-migrationSkill
- create-domain-featureSkill
- create-dtoSkill
- 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
13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this skill for one reusable business operation.
- Very specific: line 23
Create the class under app/Actions unless the project already uses a narrower namespace.
- Very specific: line 26
Add one public handle() method with typed input and typed output.
- Very specific: line 27
Use enums, DTOs, value objects, typed class constants, match, and named arguments where they clarify the operation.
- Distinctive: line 28
Use Laravel container contextual attributes on constructor parameters when they replace simple service-provider boilerplate.
- Very specific: line 29
Add #[\Override] to any method that intentionally overrides a parent or interface method.
- Distinctive: line 30
Keep request, response, Livewire, and Blade concepts out of the Action.
- Very specific: line 32
Use DB::transaction() for complex multi-model writes.
- Distinctive: line 34
Add or update tests.
- Distinctive: line 50
No UI logic, request objects, response objects, or route-specific behavior.
- Distinctive: line 51
Prefer DTOs or typed values over unstructured arrays for meaningful inputs.
- Distinctive: line 52
Prefer modern PHP 8.3+ type-safety features whenever they reduce ambiguity.
- Distinctive: line 57
Test success, authorization denial, validation or invalid input paths, side effects, and regression cases.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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 Action
When To Use
Use this skill for one reusable business operation.
Inputs Needed
- Operation name, actor, inputs, output, authorization rule, transaction needs, events or jobs, and expected tests.
Workflow
- Inspect sibling Actions and tests.
- Identify collaborators and inject them through the constructor instead of calling
app()or using service locators. - Create the class under
app/Actionsunless the project already uses a narrower namespace. - Name the class as an imperative operation with no suffix.
- Make the class
final readonlywhen dependencies are constructor-injected and mutable state is not required. - Add one public
handle()method with typed input and typed output. - Use enums, DTOs, value objects, typed class constants,
match, and named arguments where they clarify the operation. - Use Laravel container contextual attributes on constructor parameters when they replace simple service-provider boilerplate.
- Add
#[\Override]to any method that intentionally overrides a parent or interface method. - Keep request, response, Livewire, and Blade concepts out of the Action.
- Authorize before sensitive reads, writes, dispatches, or external calls.
- Use
DB::transaction()for complex multi-model writes. - Dispatch events only after the state change succeeds.
- Add or update tests.
Files That May Be Created
app/Actions/<Operation>.phptests/Feature/*Test.phptests/Unit/*Test.php
Files That May Be Modified
- Controllers, Livewire components, jobs, commands, services, policies, events, and tests that call the Action.
Architecture Rules
- One business operation per Action.
- Public
handle()method unless a framework contract requires otherwise. - No UI logic, request objects, response objects, or route-specific behavior.
- Prefer DTOs or typed values over unstructured arrays for meaningful inputs.
- Prefer modern PHP 8.3+ type-safety features whenever they reduce ambiguity.
- Dependencies must be injected unless there is a clear framework-boundary reason not to.
Testing Requirements
- Test success, authorization denial, validation or invalid input paths, side effects, and regression cases.
Security Requirements
- Authorize protected behavior and avoid mass assignment from unvalidated input.
Review Checklist
- Is the Action reusable by web, API, Livewire, jobs, commands, and MCP?
- Are inputs and outputs typed?
- Is authorization explicit?
- Are transactions and side effects correctly placed?
Common Mistakes
- Creating a catch-all Action.
- Passing
Requestor Livewire state intohandle(). - Hiding authorization in the caller only when the Action can be called elsewhere.
- Calling
app()or facades for collaborators that should be injected.
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.

