Create FilamentPHP v4 forms with fields, validation, sections, tabs, and relationships
View on GitHubmwguerra/claude-code-plugins
filament-specialist
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/mwguerra/claude-code-plugins/blob/main/filament-specialist/skills/filament-forms/SKILL.md -a claude-code --skill filament-formsInstallation paths:
.claude/skills/filament-forms/# FilamentPHP Forms Generation Skill
## Overview
This skill generates FilamentPHP v4 form schemas with proper field configurations, validation rules, relationships, and layout components.
## Documentation Reference
**CRITICAL:** Before generating forms, read:
- `/home/mwguerra/projects/mwguerra/claude-code-plugins/filament-specialist/skills/filament-docs/references/forms/`
- `/home/mwguerra/projects/mwguerra/claude-code-plugins/filament-specialist/skills/filament-docs/references/schemas/`
## Workflow
### Step 1: Analyze Requirements
Identify:
- Field types needed
- Validation rules
- Relationships (belongsTo, hasMany, etc.)
- Layout preferences (sections, tabs, columns)
- Conditional visibility
- Custom formatting
### Step 2: Read Documentation
Navigate to forms documentation and extract:
- Exact field class names
- Available methods and options
- Validation integration patterns
- Relationship handling
### Step 3: Generate Schema
Build the form schema with proper structure:
```php
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Fieldset;
use Filament\Forms\Components\Grid;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Select;
public static function form(Form $form): Form
{
return $form
->schema([
// Fields organized in sections/fieldsets
]);
}
```
## Schema Organization Requirement
**CRITICAL:** All form schemas MUST be organized using layout components. Never place fields directly at the root level of a form schema.
### Minimum Organization Rules
1. **Always use Sections or Fieldsets** - Every form must have at least one Section or Fieldset wrapping its fields
2. **Group related fields** - Fields that belong together logically should be in the same Section/Fieldset
3. **Use descriptive labels** - Sections and Fieldsets should have meaningful titles
4. **Consider collapsibility** - Make sections collapsible when forms are long