/syarif-laravel-ai-skills:actions-and-servicesfrom syarif-laravel-ai-skills
Guides structuring Laravel applications with Actions for single use cases and Services for broader capabilities like integrations and workflows.
Ships in syarif-laravel-ai-skills. 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.
None: SKILL.md is the whole skill.
Actions and Services create application boundaries. Use them based on need, not because every controller method needs another layer.
Use an Action for one named use case:
CreateRecordApproveRecordCancelRecordGenerateRecordDocumentActions 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'],
]);
});
}
}
Use a Service when a component owns a broader capability:
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');
}
}
Keep provider calls in focused services or adapters. The boundary should own:
Do not globalize provider endpoints, payload quirks, status maps, or customer copy.
Do not create an interface for every service.
Add an interface only when:
Do not require Repository Pattern for normal Eloquent CRUD. Add a repository only for real data-access complexity or storage-provider variation.
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.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (soden46/syarif-laravel-ai-skills) — no native marketplace selected
npx claudepluginhub p/soden46-syarif-laravel-ai-skills72 skills in this plugin
/ai-sdkBuild AI features with the first-party Laravel AI SDK (Laravel 13+); agents, embeddings, images, audio, and tool calling with provider-agnostic APIs/api-resources-and-paginationLaravel guidance to use API Resources with pagination and conditional fields; keep response shapes stable and cache-friendly/api-surface-evolutionLaravel guidance to evolve APIs safely using versioned DTOs/transformers, deprecations, and compatibility tests/architectureApply Laravel-native architecture decisions without forcing unnecessary repositories, interfaces, DTOs, or custom layers./blade-components-and-layoutsLaravel guidance to compose UIs with Blade components, slots, and layouts; keep templates pure and testable/brainstormingInteractive design refinement tailored to Laravel projects; clarify domain, data, interfaces, testing, and quality gates while accounting for Sail/non‑Sail environments