home / skills / yuniorglez / gemini-elite-core / filament-pro

filament-pro skill

/skills/filament-pro

This skill accelerates building advanced Filament v4 admin interfaces with custom data sources and nested resources, delivering rapid, customizable CRUDs.

npx playbooks add skill yuniorglez/gemini-elite-core --skill filament-pro

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
4.1 KB
---
name: filament-pro
id: filament-pro
version: 1.1.0
description: "Master of Filament v4 (2026), specialized in Custom Data Sources, Nested Resources, and AI-Augmented Admin Panels."
last_updated: "2026-01-22"
---

# Skill: Filament Pro (Standard 2026)

**Role:** The Filament Pro is an expert in the TALL stack (Tailwind, Alpine.js, Laravel, Livewire) dedicated to building sophisticated administrative interfaces with extreme speed. In 2026, Filament v4 has evolved into a "Full-App Engine," supporting nested resources, custom non-Eloquent data sources, and native AI assist for form generation.

## 🎯 Primary Objectives
1.  **Rapid Interface Engineering:** Building complex CRUDs in minutes while maintaining 100% customizability.
2.  **Custom Data Integration:** Powering tables and forms with external APIs or JSON-B data using the "Custom Data Source" pattern.
3.  **Complex Relationship Management:** Utilizing Nested Resources and Polymorphic relations seamlessly.
4.  **UX/UI Excellence:** Leveraging the "Swiss Style" design system and Bento Grid layouts within the Filament ecosystem.

---

## 🏗️ The 2026 Filament Toolbelt

### 1. Core Framework
- **Filament v4/v5:** Native support for Livewire 4.
- **TipTap Rich Editor:** Advanced custom blocks and dynamic image handling.
- **Folio & Volt:** For lightweight, single-file administrative components.

### 2. Specialized Components
- **Custom Form Fields:** Creating reusable Alpine.js-powered inputs.
- **Infographics & Dashboards:** Real-time data visualization using Chart.js or D3 integration.

---

## 🛠️ Implementation Patterns

### 1. Custom Data Source Tables (Filament v4)
Rendering data from a non-Eloquent source (e.g., a 3rd party API) as if it were a local table.

```php
// In a ListRecords class
protected function getTableQuery(): ?Builder
{
    // 2026 Pattern: Fetching from a custom service
    return ExternalApiService::getInvoicesQuery(); 
}
```

### 2. Nested Resources
Managing deeply nested hierarchies (e.g., Projects -> Tasks -> Comments) without complex URL management.

```php
// Filament v4 native nesting
public static function getRelations(): array
{
    return [
        TasksRelationManager::class,
    ];
}
```

### 3. Client-Side JS Helpers
Reducing server round-trips for UI state.

```php
TextInput::make('title')
    ->afterStateUpdatedJs('state => state.slug = state.title.toLowerCase()')
```

---

## 🚫 The "Do Not List" (Anti-Patterns)
1.  **NEVER** use standard Controllers for logic that should be in a `Filament Resource`.
2.  **NEVER** perform heavy DB queries inside the `Table` or `Form` definition. Use `getEloquentQuery()` or `computed` properties.
3.  **NEVER** hardcode permissions. Use `Spatie/Laravel-Permission` integrated with Filament Policies.
4.  **NEVER** ignore `Filament Preloading`. Large forms without preloading feel sluggish.

---

## 🛠️ Troubleshooting & UX Optimization

| Issue | Likely Cause | 2026 Corrective Action |
| :--- | :--- | :--- |
| **Sluggish Tables** | Excessive hydration of large datasets | Enable `Table::$isStriped = false` and use `deferred` loading. |
| **Rich Editor Lags** | Too many custom TipTap blocks | Lazy-load heavy TipTap extensions using Dynamic Imports. |
| **Form State Drift** | Livewire/Alpine synchronization lag | Use `entangle()` with the `live` modifier sparingly. |
| **Mobile Layout Broken** | Complex Bento Grid not responsive | Use Filament's native `Grid::make(['default' => 1, 'lg' => 3])`. |

---

## 📚 Reference Library
- **[TALL Stack Mastery](./references/1-tall-stack-mastery.md):** The engine behind Filament.
- **[Advanced Forms & Tables](./references/2-advanced-forms-and-tables.md):** Beyond basic CRUD.
- **[Panel Architecture](./references/3-panel-architecture.md):** Multi-panel and Multi-tenancy setups.

---

## 📊 Quality Metrics
- **Form Submission Latency:** < 200ms.
- **Table Render Time:** < 50ms for 50 rows (Filament v4 speed).
- **A11y Score:** 100% (WCAG 2.2 compliant).

---

## 🔄 Evolution from v2 to v4
- **v3:** Form/Table Builder split, improved UI, Action system overhaul.
- **v4:** Custom sources, nested resources, TipTap as default, JS-helpers for state.

---

**End of Filament Pro Standard (v1.1.0)**

Overview

This skill is Filament Pro, an expert toolkit for building production-grade admin panels with Filament v4 (2026). It focuses on rapid CRUD surface construction, custom data sources, nested resources, and AI-augmented form and panel generation. The skill delivers practical patterns to integrate non-Eloquent data, optimize UI performance, and manage complex relationships consistently.

How this skill works

Filament Pro provides actionable patterns and code snippets to treat external APIs or JSON-B stores as first-class table and form sources using the Custom Data Source pattern. It documents nested resource wiring, Livewire/Alpine.js client helpers, and performance hygiene like deferred loading and preloading. The skill also prescribes UX systems (Swiss Style, Bento Grid) and troubleshooting steps to keep forms fast and accessible.

When to use it

  • When you need tables or forms driven by an external API rather than Eloquent models.
  • When building multi-level admin panels with Projects -> Tasks -> Comments style nesting.
  • When you want to reduce server round-trips using client-side state helpers (Alpine + Livewire).
  • When TipTap-rich editors or heavy UI components cause slowness and need lazy-loading.
  • When you must meet strict performance and accessibility targets in admin UIs.

Best practices

  • Expose external sources via a query-like service (e.g., ExternalApiService::getInvoicesQuery()) to keep Table/Form code clean.
  • Avoid heavy queries inside table/form definitions; use getEloquentQuery(), computed props, or deferred loaders.
  • Use entangle() sparingly and rely on afterStateUpdatedJs or lightweight Alpine inputs for client-only transformations.
  • Lazy-load heavy TipTap extensions and large visualization libs (Chart.js/D3) with dynamic imports.
  • Integrate Spatie permissions and Filament policies—never hardcode permissions in resources.

Example use cases

  • Render a 3rd-party billing provider’s invoices as a Filament Table powered by a Custom Data Source.
  • Create nested Filament resources for Projects with inline Task relation managers and comment threads.
  • Build an AI-assisted form generator that scaffolds form fields and validation using Filament field primitives and TipTap blocks.
  • Optimize a dashboard with live charts, deferred table loading, and responsive Bento Grid layouts for mobile.
  • Replace monolithic controllers by moving CRUD and UI logic into Filament Resources and RelationManagers.

FAQ

Can I use Filament Pro with non-Laravel backends?

Filament Pro patterns assume Laravel + Filament, but the Custom Data Source approach lets you wrap any external API and present it as a queryable source inside Filament resources.

How do I avoid Livewire/Alpine state drift?

Prefer entangle() only where necessary, use the live modifier sparingly, and rely on afterStateUpdatedJs for client-side sync to reduce round-trips.

What fixes sluggish tables at scale?

Use deferred loading, disable unnecessary table features like heavy stripes, paginate or virtualize, and push large aggregations into precomputed services rather than table definitions.