filament-plugin: Scaffold Filament plugins with Plugin class, ServiceProvider, Resources, and Pest tests
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: filament-plugin description: Scaffold Filament plugins with Plugin class, ServiceProvider, Resources, and Pest tests allowed-tools: Bash(python3:*), Write, Read, Glob
Filament Plugin Scaffold Skill
Creates a complete Filament plugin skeleton (panel or standalone) following Filament's official plugin development guidelines.
Usage
When the user wants to create a Filament plugin, use the scaffold script:
python3 ${SKILL_DIR}/scripts/scaffold_filament_plugin.py <vendor/plugin-name> [options]
Options
--with-resource <name>- Include a sample Resource--with-page- Include a sample custom Page--with-widget- Include a sample Widget--with-livewire- Include Livewire component structure--with-pest- Include PestPHP testing (default: yes)--no-pest- Exclude PestPHP testing
Examples
Basic Filament plugin
python3 ${SKILL_DIR}/scripts/scaffold_filament_plugin.py mwguerra/filament-blog
Plugin with Resource
python3 ${SKILL_DIR}/scripts/scaffold_filament_plugin.py mwguerra/filament-blog --with-resource Post
Full-featured plugin
python3 ${SKILL_DIR}/scripts/scaffold_filament_plugin.py mwguerra/filament-blog --with-resource Post --with-page --with-widget
What Gets Created
Directory Structure
packages/
βββ vendor/
βββ filament-plugin-name/
βββ composer.json
βββ README.md
βββ LICENSE
βββ .gitignore
βββ phpunit.xml
βββ config/
β βββ filament-plugin-name.php
βββ database/
β βββ migrations/
β βββ .gitkeep
βββ resources/
β βββ lang/
β β βββ en/
β β βββ messages.php
β βββ views/
β βββ .gitkeep
βββ src/
β βββ PluginNamePlugin.php
β βββ PluginNameServiceProvider.php
β βββ Facades/
β β βββ PluginName.php
β βββ Resources/
β β βββ .gitkeep (or generated Resource)
β βββ Pages/
β β βββ .gitkeep (or generated Page)
β βββ Widgets/
β β βββ .gitkeep (or generated Widget)
β βββ Livewire/
β β βββ .gitkeep
β βββ Commands/
β βββ .gitkeep
βββ tests/
βββ Pest.php
βββ TestCase.php
βββ Unit/
β βββ ExampleTest.php
βββ Feature/
βββ .gitkeep
Generated Files
-
composer.json
- Filament ^3.3 (latest)
- Livewire ^3.6 (latest)
- Laravel ^11.0|^12.0 support
- Orchestra Testbench ^10.0 (latest)
- PestPHP ^3.8 (latest)
- PSR-4 autoloading
- Laravel auto-discovery
-
Plugin Class (
PluginNamePlugin.php)- Implements
Filament\Contracts\Plugin - Resource, Page, Widget registration
- Panel configuration hooks
- Implements
-
ServiceProvider
- View namespace registration
- Translation loading
- Migration publishing
- Config merging
-
Resource (if
--with-resource)- Form schema
- Table configuration
- Resource pages (List, Create, Edit)
-
Page (if
--with-page)- Custom Filament page
- View and logic
-
Widget (if
--with-widget)- Dashboard widget
- Stats or chart example
-
Testing Setup
- PestPHP configuration
- Orchestra Testbench
- Livewire testing utilities
After Running
-
Install dependencies:
composer update -
Register plugin in Panel Provider:
use Vendor\PluginName\PluginNamePlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ PluginNamePlugin::make(), ]); } -
Publish assets (if needed):
php artisan vendor:publish --tag=filament-plugin-name-config php artisan vendor:publish --tag=filament-plugin-name-migrations -
Run tests:
cd packages/vendor/filament-plugin-name composer install ./vendor/bin/pest
Filament Plugin Best Practices
- Use the Plugin Contract: Always implement
Filament\Contracts\Plugin - Register in boot(): Register resources/pages/widgets in
boot()method - Support Panel Configuration: Allow users to customize via
->plugin() - Translations: Use translation keys for all user-facing strings
- Views: Use namespaced views (
filament-plugin-name::view-name) - Testing: Test Livewire components with
Livewire::test()
More by mwguerra
View allCreate author profiles via questionnaire or transcript analysis for consistent article voice
Context-aware briefings, memory recall, and intelligent recommendations for workflow management
Strategic analysis, work prioritization, and productivity recommendations
Execute complete user flow testing with Playwright MCP, testing end-to-end journeys through the application
