/filament-ai-skills:filament-resource-developmentfrom filament-ai-skills
Creates and maintains Filament v5 Resources including Resource classes, Form Schemas, Tables, Pages, RelationManagers, Widgets, and Infolists. Covers Filament v5 with Livewire 4 and Tailwind 4, including modular structure, namespaces, and centralized Actions.
Ships in filament-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.
Skill for Filament v5 (Livewire 4 + Tailwind 4). Verify before applying:
composer show filament/filament | grep versionsIf
5.x.x→ ok. If^4.0or^3.0→ activatefilament-upgradefirst.
| Dep | Version |
|---|---|
| PHP | 8.2+ |
| Laravel | 11.28+ |
| Livewire | 4.x |
| Tailwind | 4.x |
app/Filament/Resources/
└── Posts/
├── PostResource.php # delegates form/table
├── Pages/ # Create/Edit/List
├── Schemas/PostForm.php # extracted form
└── Tables/PostsTable.php # extracted table
Convention: {Model}Form (singular, Schemas/), {Model}sTable (plural, Tables/).
| Item | Namespace |
|---|---|
| Schema base | Filament\Schemas\Schema |
| Layout (Section, Grid, Tabs, Wizard…) | Filament\Schemas\Components\* |
| Form fields (TextInput, Select…) | Filament\Forms\Components\* |
| Tables | Filament\Tables\* |
| Actions (all) | Filament\Actions\* |
| Login | Filament\Auth\Pages\Login |
| Set/Get | Filament\Schemas\Components\Utilities\{Set,Get} |
| Heroicons | Filament\Support\Icons\Heroicon (enum) |
| Width | Filament\Support\Enums\Width (enum) |
Critical:
Form → Schema in form() and infolist().Schemas\Components, not Forms\Components.Filament\Actions\* (centralized). Do not use Filament\Tables\Actions\*.Filament\Auth\Pages\Login (v3/v4 was Filament\Pages\Auth\Login).$view on Page: protected string (NOT static).<?php
declare(strict_types=1);
namespace App\Filament\Resources\Posts;
use App\Filament\Resources\Posts\Pages;
use App\Filament\Resources\Posts\Schemas\PostForm;
use App\Filament\Resources\Posts\Tables\PostsTable;
use App\Models\Post;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
final class PostResource extends Resource
{
protected static ?string $model = Post::class;
protected static string|\BackedEnum|null $navigationIcon = Heroicon::OutlinedDocumentText;
protected static string|\UnitEnum|null $navigationGroup = 'Content';
public static function form(Schema $schema): Schema
{
return PostForm::configure($schema);
}
public static function table(Table $table): Table
{
return PostsTable::configure($table);
}
public static function getPages(): array
{
return [
'index' => Pages\ListPosts::route('/'),
'create' => Pages\CreatePost::route('/create'),
'edit' => Pages\EditPost::route('/{record}/edit'),
];
}
}
<?php
declare(strict_types=1);
namespace App\Filament\Resources\Posts\Schemas;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
final class PostForm
{
public static function configure(Schema $schema): Schema
{
return $schema->components([
Section::make('Content')
->schema([
TextInput::make('title')
->label('Title')
->required()
->maxLength(255),
])->columns(2),
]);
}
}
Rules:
declare(strict_types=1); alwaysfinal class always->label('...') on all fields->required() — NEVER ->rules(['required'])use Filament\Forms;)php artisan make:filament-resource Post # modular structure
php artisan make:filament-resource Post --generate # auto-generate from DB
php artisan make:filament-resource Post --simple # modal
php artisan make:filament-resource Post --soft-deletes # with soft-deletes
Write/update tests before creating/modifying a resource.
php artisan make:test --pest Feature/Posts/PostResourceTest
php artisan test --compact --filter=PostResourceTest
Filament\Tables\Actions\ instead of Filament\Actions\Form instead of Schema in method signature$view on Page (must be non-static protected string)Forms\Components (must be Schemas\Components)declare(strict_types=1); or final classWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub felipearnold/filament-ai-skills --plugin filament-ai-skills18 skills in this plugin
/deep-code-reviewAnálise técnica profunda de código PHP/Laravel já implementado (não staged). 3 dimensões: segurança (OWASP), qualidade (SOLID, CC, DRY), padrões (PHP 8.4, Laravel 12, Filament v5). Foco em "como melhorar" — refactor, design, arquitetura. Gera relatório com scores e plano de ação. **Use pre-commit-review pra checklist rápido antes de commit.** Ativa: analisar implementação em profundidade, revisar feature pronta, audit de segurança, refatorar código existente, melhorar arquitetura, review profundo, análise completa, avaliar qualidade de feature, scoring de código./eloquent-query-checkVerifies and fixes direct static calls on Eloquent models, ensuring they always go through ::query() before methods like find, where, create, all, etc. Activate when: query(), Model::find, Model::create, Model::where, Model::all, eloquent query, static model call, model without query, fix model./error-detective