actions-and-services
Skill4 starsChanged 5 months agoMITView on GitHub
Use Actions and Services as deliberate Laravel application boundaries for use cases, integrations, and reusable workflows.
In this repository75 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- ai-sdkSkill
- api-resources-and-paginationSkill
- api-surface-evolutionSkill
- architectureSkill
- blade-components-and-layoutsSkill
- brainstormingSkill
- code-review-requestsSkill
- complexity-guardrailsSkill
- config-env-storageSkill
- constants-and-configurationSkill
- controller-cleanupSkill
- controller-testsSkill
- custom-helpersSkill
- daily-workflowSkill
- database-transactionsSkill
- data-chunking-large-datasetsSkill
- debugging-promptsSkill
- dependencies-trim-packagesSkill
- documentation-best-practicesSkill
- e2e-playwrightSkill
- effective-contextSkill
- eloquent-patternsSkill
- eloquent-relationshipsSkill
- exception-handling-and-loggingSkill
- executing-plansSkill
- extract-laravel-standardsSkill
- filesystem-uploadsSkill
- form-requestsSkill
- horizon-metrics-and-dashboardsSkill
- http-client-resilienceSkill
- integrate-whatsapp-baileys-laravelSkill
- interfaces-and-diSkill
- internationalization-and-translationSkill
- iterating-on-codeSkill
- laravel-11-12-app-guidelinesSkill
- laravel-database-optimizationSkill
- laravel-prompting-patternsSkill
- laravel-specialistSkill
- least-codeSkill
- livewire-developmentSkill
- memory-managementSkill
- migrations-and-factoriesSkill
- module-per-menuSkill
- nova-resource-patternsSkill
- performance-cachingSkill
- performance-eager-loadingSkill
- performance-select-columnsSkill
- php-attributesSkill
- policies-and-authorizationSkill
- ports-and-adaptersSkill
- prompt-structureSkill
- quality-checksSkill
- queues-and-jobsSkill
- rate-limitingSkill
- request-forgery-protectionSkill
- responsive-ui-testingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use an Action for one named use case:
- Distinctive: line 41
Use a Service when a component owns a broader capability:
- Distinctive: line 71
Keep provider calls in focused services or adapters.
- Distinctive: line 81
Do not globalize provider endpoints, payload quirks, status maps, or customer copy.
- Distinctive: line 85
Do not create an interface for every service.
- Distinctive: line 87
Add an interface only when:
- Distinctive: line 95
Do not require Repository Pattern for normal Eloquent CRUD.
≈ “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
Actions And Services
Actions and Services create application boundaries. Use them based on need, not because every controller method needs another layer.
When To Use An Action
Use an Action for one named use case:
CreateRecordApproveRecordCancelRecordGenerateRecordDocument
Actions fit workflows with clear input and output.
final class CreateRecord
{
public function handle(User $actor, array $data): Record
{
return DB::transaction(function () use ($actor, $data) {
return Record::create([
'owner_id' => $actor->id,
'name' => $data['name'],
]);
});
}
}When To Use A Service
Use a Service when a component owns a broader capability:
- integration client;
- document generation;
- pricing/calculation policy;
- import/export workflow;
- reusable application workflow.
final class GatewayService
{
public function createLink(Record $record): string
{
$response = Http::baseUrl(config('services.gateway.url'))
->timeout(5)
->retry(2, 200, throw: false)
->post('/links', [
'reference' => $record->public_reference,
'amount' => $record->total,
]);
throw_unless($response->successful(), RuntimeException::class);
return $response->json('url');
}
}Integration Boundaries
Keep provider calls in focused services or adapters. The boundary should own:
- request mapping;
- authentication/signing details;
- timeouts and retries;
- response parsing;
- provider error translation;
- sanitized structured logging;
- fake-driven tests.
Do not globalize provider endpoints, payload quirks, status maps, or customer copy.
Interfaces And Repositories
Do not create an interface for every service.
Add an interface only when:
- multiple implementations exist;
- provider swapping is likely;
- configuration selects implementations;
- the contract is shared across modules;
- the boundary protects domain code from infrastructure.
Do not require Repository Pattern for normal Eloquent CRUD. Add a repository only for real data-access complexity or storage-provider variation.
Context Efficiency
Layer: 3 (Implementation)
Load this skill only when application boundaries need design. Do not load with unrelated skills. Keep the diff minimal: one Action per use case, one Service per integration or workflow, no interface until a second implementation exists.
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.

