What this prompt does
This prompt directs the AI to build a complete Filament 3 admin resource for a model you name, returning working code instead of pseudocode. You supply [model], the [key_columns] to surface, the [import_source] for bulk import, and the [roles] allowed to manage it. The AI then produces a list page, create/edit forms, a custom bulk-import page with a dry-run preview, a dashboard stats widget, RBAC via Filament Shield, and the registration steps.
The six-deliverable structure works because a real admin panel is more than CRUD scaffolding — it needs filters, safe bulk operations, and access control. By making the AI generate a dry-run import and Shield-based RBAC up front, the prompt produces a back office that is usable and safe on day one. [key_columns] shapes the list page columns and which fields are searchable and sortable. [import_source] decides the import UI (a CSV upload behaves differently from an API pull), and [roles] wires which users can reach each action.
When to use it
- You're scaffolding a new Filament resource and want filters, forms, and RBAC in one pass.
- You need a bulk-import page that previews changes before committing them.
- You want a dashboard stats widget summarizing a model without hand-writing it.
- You're enforcing role-based access with Filament Shield and want it wired correctly.
- You keep forgetting the provider wiring and navigation registration steps.
- You're building a client back office and need it to feel real, not like a CRUD demo.
Example output
You get several copy-ready code blocks: the resource file with a searchable, sortable list page including table filters and row actions; create and edit forms with validation, sensible field types, and helper text; a custom page implementing bulk import from [import_source] with a dry-run preview before commit; a dashboard widget showing counts, a trend, and one key metric; Shield RBAC limiting actions to [roles]; and the registration steps covering provider wiring, navigation group, and policy hooks.
Pro tips
- Set
[key_columns]to the fields admins actually scan — these drive the list columns plus what's searchable and sortable, so a thoughtful list saves later edits. - Match
[import_source]to reality; a CSV upload and an external API pull produce different upload and parsing code, and a vague value gives a generic importer. - Keep the dry-run in deliverable 3 — previewing changes before commit is what prevents an accidental bad mass-update from an import file.
- Name
[roles]precisely so Shield gates each action correctly; "admin and support-manager" yields tighter policies than a single broad role. - Run the registration steps exactly as returned, since a missing provider wire or navigation group is the most common reason a resource doesn't appear.
- Ask a follow-up to add a feature test for the import path; verifying the dry-run and commit behaviour separately catches edge cases early.