← ClaudeAtlas

filament-plugin-developmentlisted

Build and publish custom Filament plugins (Filament is the Laravel admin-panel framework). Use when creating a Filament plugin/package, implementing the Plugin contract, scaffolding from the plugin skeleton, registering assets/resources/pages/render-hooks, making a configurable plugin, testing it, or publishing to Packagist and the filamentphp.com/plugins directory. Targets Filament v4 (v5 shares the same plugin API). For USING Filament (resources/forms/tables), use the laravel-filament skill instead.
majdghithan/agent-skills · ★ 7 · AI & Automation · score 73
Install: claude install-skill majdghithan/agent-skills
# Building & publishing Filament plugins (v4 / v5) A Filament "plugin" is just a **Composer package** that extends a Filament app. Verified against `filamentphp.com/docs/4.x`. v5 shares the same plugin API. ## Two tiers - pick the smaller one **A. Plain package (components only).** Ships resources/pages/widgets/fields/actions and does **not** implement any contract. The installing app wires them in manually (`->resources([...])`, `->widgets([...])`). **If your package is one widget or one field, do this - you do not need the `Plugin` contract.** **B. Panel Plugin.** A class implementing `Filament\Contracts\Plugin`, registered with `->plugin(YourPlugin::make())`. Reach for this only when you bundle **multiple** things behind one registration, need **per-panel configuration**, or need boot-time logic. Rule of thumb: more than one moving part, or configurable -> Plugin contract; otherwise ship it plain. ## The `Plugin` contract Three methods: | Method | Runs | Purpose | |---|---|---| | `getId(): string` | - | Globally-unique, stable singleton key (e.g. `'blog'` - not `'settings'`, which clashes) | | `register(Panel $panel): void` | while the panel is **configured** | register resources/pages/widgets/render hooks/assets on the panel | | `boot(Panel $panel): void` | only for the **active** panel (via middleware) | runtime side effects | ```php namespace Vendor\FilamentBlog; use Filament\Contracts\Plugin; use Filament\Panel; class BlogPlugin implements Plugin { public