filament-shield
Skill1 starsChanged 5 months agoMITView on GitHub
Use when installing, configuring, generating, or reviewing Filament Shield authorization for Filament v5 panels.
In this repository64 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit-ai-agent-instructionsSkill
- audit-package-versionSkill
- configure-local-environmentSkill
- configure-secure-storageSkill
- create-actionSkill
- create-api-endpointSkill
- create-api-integrationSkill
- create-architecture-testSkill
- create-console-commandSkill
- create-database-migrationSkill
- create-domain-featureSkill
- create-dtoSkill
- create-eloquent-builderSkill
- create-event-listenerSkill
- create-inertia-pageSkill
- create-jobSkill
- create-laravel-boost-guidelinesSkill
- create-laravel-packageSkill
- create-livewire-componentSkill
- create-php-attributeSkill
- create-policySkill
- create-requestSkill
- create-serviceSkill
- debug-composer-conflictsSkill
- debug-failing-testsSkill
- debug-phpstanSkill
- decompose-modelSkill
- deploying-laravel-cloudSkill
- design-blade-componentSkill
- design-multi-tenant-featureSkill
- filament-developmentSkill
- fix-github-actionsSkill
- format-codebase-pintSkill
- implement-api-rate-limitingSkill
- implement-import-exportSkill
- implement-notificationsSkill
- implement-observabilitySkill
- implement-permissionsSkill
- implement-subscription-billingSkill
- implement-webhooksSkill
- laravel-pennant-feature-flagsSkill
- laravel-pulse-monitoringSkill
- laravel-reverb-websocketsSkill
- manage-frontend-stylingSkill
- manage-localizationSkill
- prepare-package-releaseSkill
- refactor-business-logicSkill
- reuse-filament-resourcesSkill
- review-accessibilitySkill
- review-ai-generated-codeSkill
- review-featureSkill
- review-open-source-packageSkill
- review-package-readmeSkill
- review-performanceSkill
- review-securitySkill
- review-static-analysisSkill
- review-tailwind-fluxSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this skill when the app needs Filament panel authorization, permission generation, role seeding, super-admin handling, or policy …
- Very specific: line 22
Ensure the auth provider model uses Spatie\Permission\Traits\HasRoles.
- Distinctive: line 23
Run Shield setup for the panel.
- Distinctive: line 28
Keep resource and page permissions in sync with panel entities.
- Distinctive: line 29
Add tests for authorization, generated policy behavior, and seed content.
- Distinctive: line 52
Prefer generated permissions and seeders over hand-maintained role wiring.
- Distinctive: line 56
Test role assignment, permission generation, policy enforcement, and super-admin access.
- Distinctive: line 57
Test the seeder output or the data it inserts.
- Distinctive: line 58
Test any custom permission key composition or localization behavior.
- Distinctive: line 63
Do not expose protected resources in Filament without Shield or equivalent policy coverage.
- Distinctive: line 64
Keep the auth provider model and permission sync in lockstep.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Filament Shield
When To Use
Use this skill when the app needs Filament panel authorization, permission generation, role seeding, super-admin handling, or policy synchronization for Filament resources, pages, and widgets.
Inputs Needed
- Panel ID, auth provider model, tenant support, permission naming, role strategy, super-admin strategy, seeder strategy, and tests.
Workflow
- Inspect the current Filament panel structure and auth provider model.
- Ensure the auth provider model uses
Spatie\Permission\Traits\HasRoles. - Run Shield setup for the panel.
- Generate permissions and policies for the panel entities.
- Publish and customize Shield config only where needed.
- Generate or update the Shield seeder to capture roles and permissions declaratively.
- Generate translation files for permission labels when localization is needed.
- Keep resource and page permissions in sync with panel entities.
- Add tests for authorization, generated policy behavior, and seed content.
Files That May Be Created
config/filament-shield.phpdatabase/seeders/*Shield*Seeder.phpapp/Policies/*Policy.phplang/*orlang/admin/*translation filesapp/Models/*auth provider model updates- Filament resource/page/widget policy or permission support classes
Files That May Be Modified
app/Models/User.phpapp/Providers/Filament/*PanelProvider.php- Shield config, seeders, policies, tests, and translations
Architecture Rules
- Shield is the default authorization layer for Filament panels in this app.
- Policies and permissions must be generated and kept synchronized.
- Panel resources, pages, and widgets should not bypass the permission model.
- Super-admin or gate interception should be centralized and explicit.
- Prefer generated permissions and seeders over hand-maintained role wiring.
Testing Requirements
- Test role assignment, permission generation, policy enforcement, and super-admin access.
- Test the seeder output or the data it inserts.
- Test any custom permission key composition or localization behavior.
Security Requirements
- Deny by default.
- Do not expose protected resources in Filament without Shield or equivalent policy coverage.
- Keep the auth provider model and permission sync in lockstep.
Review Checklist
- Is Shield configured for the active Filament panel?
- Does the auth provider model use
HasRoles? - Are permissions generated and seeded, not hand-waved?
- Is localization in app-owned translation files?
- Are policy and permission names consistent with panel entities?
Common Mistakes
- Leaving panel resources unprotected.
- Relying on manual policy wiring while Shield is installed.
- Forgetting to regenerate permissions after adding new resources or pages.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

