forms
БесплатноБез исполняемых скриптовНе проверенCreate FilamentPHP v4 forms with fields, validation, sections, tabs, and relationships
от mwguerra★ 35 звёзд на GitHubОб этом скилле
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/docs/references/forms//home/mwguerra/projects/mwguerra/claude-code-plugins/filament-specialist/skills/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:
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
- Always use Sections or Fieldsets - Every form must have at least one Section or Fieldset wrapping its fields
- Group related fields - Fields that belong together logically should be in the same Section/Fieldset
- Use descriptive labels - Sections and Fieldsets should have meaningful titles
- Consider collapsibility - Make sections collapsible when forms are long
Recommended Hierarchy
Form Schema
├── Section: "Primary Information"
│ ├── Fieldset: "Basic Details" (optional grouping)
│ │ ├── TextInput: name
│ │ └── TextInput: email
│ └── Fieldset: "Contact" (optional grouping)
│ ├── TextInput: phone
│ └── TextInput: address
├── Section: "Settings"
│ ├── Toggle: is_active
│ └── Select: status
└── Section: "Media" (collapsible)
└── FileUpload: avatar
Bad Example (DO NOT DO THIS)
// ❌ WRONG: Fields at root level without organization
public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name'),
TextInput::make('email'),
TextInput::make('phone'),
Toggle::make('is_active'),
FileUpload::make('avatar'),
]);
}
Good Example (ALWAYS DO THIS)
// ✅ CORRECT: Fields organized in sections
public static function form(Form $form): Form
{
return $form
->schema([
Section::make('Personal Information')
->description('Basic user details')
->schema([
TextInput::make('name')
->required()
->maxLength(255),
TextInput::make('email')
->email()
->required(),
TextInput::make('phone')
->tel(),
]),
Section::make('Settings')
->schema([
Toggle::make('is_active')
->label('Active')
->default(true),
]),
Section::make('Profile Image')
->collapsible()
->schema([
FileUpload::make('avatar')
->image()
->disk('public')
->directory('avatars'),
]),
]);
}
When to Use Section vs Fieldset
| Component | Use Case |
|---|---|
| Section | Major logical groupings, can have description, icon, collapsible |
| Fieldset | Smaller sub-groupings within a section, lighter visual weight |
| Tabs | When sections are numerous and would cause scrolling |
| Grid | Column layout within sections (not a replacement for sections) |
Complex Form Example
public static function form(Form $form): Form
{
return $form
->schema([
Section::make('Product Details')
->icon('heroicon-o-cube')
->schema([
Fieldset::make('Basic Information')
->schema([
TextInput::make('name')
->required()
->maxLength(255),
TextInput::make('sku')
->required()
->unique(ignoreRecord: true),
Установить forms в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл forms?
Create FilamentPHP v4 forms with fields, validation, sections, tabs, and relationships
Как установить скилл forms?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл forms запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic