Agent skill
laravel-blade
Create Blade templates with components, slots, layouts, and directives. Use when building views, reusable components, or templating.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/laravel-blade
SKILL.md
Laravel Blade Templates
Documentation
Views & Templates
- blade.md - Blade templating
- views.md - Views
- localization.md - Localization
Frontend
- frontend.md - Frontend scaffolding
- vite.md - Vite asset bundling
Component Class
<?php
declare(strict_types=1);
namespace App\View\Components;
final class Button extends Component
{
public function __construct(
public string $type = 'button',
public string $variant = 'primary',
public bool $disabled = false,
) {}
public function variantClasses(): string
{
return match ($this->variant) {
'primary' => 'bg-blue-500 text-white',
'danger' => 'bg-red-500 text-white',
default => 'bg-gray-200 text-gray-800',
};
}
public function render(): View
{
return view('components.button');
}
}
Component View
<button
type="{{ $type }}"
{{ $disabled ? 'disabled' : '' }}
{{ $attributes->merge(['class' => 'px-4 py-2 rounded ' . $variantClasses()]) }}
>
{{ $slot }}
</button>
Layout
{{-- resources/views/layouts/app.blade.php --}}
<!DOCTYPE html>
<html>
<head>
<title>{{ $title ?? 'My App' }}</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body>
<x-navigation />
<main>{{ $slot }}</main>
<x-footer />
</body>
</html>
Directives
@foreach($items as $item)
{{ $loop->index }} - {{ $loop->first }} - {{ $loop->last }}
@endforeach
@auth
Welcome, {{ auth()->user()->name }}
@endauth
@can('update', $post)
<button>Edit</button>
@endcan
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?