/filament-ai-skills:filament-infolist-developmentfrom filament-ai-skills
Creates and maintains Filament v5 Infolists for read-only record views. Covers TextEntry, IconEntry, RepeatableEntry, layout components (Tabs, Section, Grid), and correct namespace usage.
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.
Infolists são a contraparte read-only dos Forms. Usados na ViewRecord page para exibir dados de forma organizada e visual.
// Entries (componentes de dado)
use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Components\IconEntry;
use Filament\Infolists\Components\ImageEntry;
use Filament\Infolists\Components\ColorEntry;
use Filament\Infolists\Components\RepeatableEntry;
use Filament\Infolists\Components\KeyValueEntry;
// Enums de suporte
use Filament\Support\Enums\TextSize; // Para ->size()
// Layout (MESMOS namespaces do Form)
use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab;
use Filament\Schemas\Components\Fieldset;
use Filament\Schemas\Schema;
CRÍTICO: Entries ficam em
Filament\Infolists\Components\. Layout fica emFilament\Schemas\Components\. Nunca useFilament\Forms\Components\TextInputem um infolist.
final class XInfolist
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Tabs::make('tabs')
->columnSpanFull()
->tabs([
Tab::make('general')
->label('Geral')
->icon('heroicon-o-information-circle')
->schema([
Grid::make(2)
->schema([
Section::make('Seção A')->compact()->schema([...]),
Section::make('Seção B')->compact()->schema([...]),
])->columnSpanFull(),
]),
]),
]);
}
}
COMPONENTES INEXISTENTES — NUNCA USE:
Filament\Schemas\Components\Split— não existe, useGrid::make(N)->grow(false)— não existe em Grid, não tem equivalente diretoFilament\Forms\Components\*— são para forms, não infolists
TextEntry::make('name')
->label('Nome')
->weight('bold')
->placeholder('—'),
TextEntry::make('status')
->label('Status')
->badge()
->color(fn (StatusEnum $state): string => $state->getColor()),
use Illuminate\Support\Number;
TextEntry::make('total_value')
->label('Total')
->formatStateUsing(fn ($state) => Number::currency((float) $state, 'BRL'))
->weight('bold')
->size(TextSize::Large)
->color('success'),
TextEntry::make('created_at')->label('Criado em')->dateTime('d/m/Y H:i'),
TextEntry::make('opening_date')->label('Abertura')->date('d/m/Y'),
TextEntry::make('description')->label('Descrição')->html()->placeholder('Não informado.'),
TextEntry::make('number')->label('Número')->copyable(),
TextEntry::make('person.name')
->label('Cliente')
->url(fn ($record) => $record->person_id
? route('filament.app.resources.creates.people.edit', ['record' => $record->person_id, 'tenant' => $record->tenant_id])
: null),
Use
route()com o nome exato da rota. Verifique rotas disponíveis comphp artisan route:list --name=<resource>. Muitos resources não têm rotaview, apenasedit.
TextEntry::make('vehicle_info')
->label('Modelo')
->state(fn ($record) => $record->vehicle
? "{$record->vehicle->brand} {$record->vehicle->model}"
: null)
->placeholder('—'),
TextEntry::make('document')
->label('CPF / CNPJ')
->formatStateUsing(fn ($state) => $state ? formatCpfCnpj($state) : '—'), // implement with your app's formatter
TextEntry::make('mileage')
->label('Km')
->formatStateUsing(fn ($state) => $state ? number_format($state, 0, ',', '.') . ' km' : '—'),
// use Filament\Support\Enums\TextSize;
->size(TextSize::Small) // small
->size(TextSize::Medium) // default
->size(TextSize::Large) // large
->weight('thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black')
NUNCA use
TextEntry\TextEntrySize::*— não existe. UseFilament\Support\Enums\TextSize.
IconEntry::make('appointment_confirmed')
->label('Confirmado')
->boolean()
->trueIcon('heroicon-o-check-circle')
->falseIcon('heroicon-o-x-circle')
->trueColor('success')
->falseColor('danger'),
RepeatableEntry::make('serviceOrderServices')
->hiddenLabel()
->schema([
TextEntry::make('service_name')->label('Serviço')->weight('semibold'),
TextEntry::make('quantity')->label('Qtd')->alignCenter(),
TextEntry::make('total')
->label('Total')
->formatStateUsing(fn ($state) => Number::currency((float) $state, 'BRL'))
->color('success'),
])
->columns(3)
->columnSpanFull(),
Split não existe em Filament\Schemas\Components. Use Grid para colocar sections lado a lado:
// 2 sections lado a lado
Grid::make(2)
->schema([
Section::make('Identificação')->compact()->schema([...]),
Section::make('Detalhes')->compact()->schema([...]),
])->columnSpanFull(),
// 3 sections lado a lado
Grid::make(3)
->schema([
Section::make('Cliente')->compact()->schema([...]),
Section::make('Veículo')->compact()->schema([...]),
Section::make('Responsáveis')->compact()->schema([...]),
])->columnSpanFull(),
Section::make('Título da Seção')
->icon('heroicon-o-information-circle')
->description('Texto de apoio')
->compact() // menos padding
->collapsed() // começa colapsado
->collapsible() // permite colapsar
->schema([...])
->columns(2) // grid interno
->columnSpanFull(), // ocupa toda a largura
Grid::make(3)
->schema([
TextEntry::make('a'),
TextEntry::make('b'),
TextEntry::make('c'),
]),
Tabs::make('tabs')
->columnSpanFull()
->tabs([
Tab::make('geral')
->label('Geral')
->icon('heroicon-o-clipboard-document-list')
->schema([...]),
Tab::make('financeiro')
->label('Financeiro')
->icon('heroicon-o-banknotes')
->schema([...]),
]),
No Resource, o método infolist() delega para a classe:
public static function infolist(Schema $schema): Schema
{
return XInfolist::configure($schema);
}
Na página ViewRecord, o infolist é renderizado automaticamente.
NUNCA usar ->money('BRL') diretamente (não formata em pt-BR). Usar sempre:
use Illuminate\Support\Number;
->formatStateUsing(fn ($state) => Number::currency((float) $state, 'BRL'))
Para exibir sem símbolo R$:
->formatStateUsing(fn ($state) => number_format((float) $state, 2, ',', '.') . '%')
final->placeholder('—') em campos nullable->compact() nas sections para layout mais densoGrid::make(N) para colocar sections lado a lado (ex: Grid::make(2) para Cliente + Veículo)Tabs para organizar muitos dados em seções temáticas->html() nos campos vindos de RichEditor->badge() + ->color() para Enums com HasColor->state() para campos calculados (não persistidos)->money('BRL') — sempre Number::currency()Split — não existe em Filament\Schemas\Components\, use Grid::make(N)What SKILL.md sets; muted values are Claude Code's defaults
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