binary-cats/laravel-rbac/laravel-rbac-development
Claude Code and agent skill by binary-cats/laravel-rbac
- community
Checking that the SKILL.md file is still in the repository.
Build and maintain enum-backed abilities and code-defined roles with binary-cats/laravel-rbac. Use when creating abilities, defining roles, configuring guards, registering roles, or synchronizing RBAC with rbac:reset.
Install
npx vskill@latest install binary-cats/laravel-rbac/laravel-rbac-developmentSKILL.md
Laravel RBAC Development
When to use this skill
Use this skill when working with binary-cats/laravel-rbac abilities, DefinedRole classes, the rbac configuration, guards, or the rbac:reset command.
This skill covers this package's declarative RBAC workflow. For runtime authorization checks, policies, middleware, Blade directives, teams, and user-role assignment, use the spatie/laravel-permission guidance.
Prerequisites
- Install and migrate
spatie/laravel-permissionbefore runningrbac:reset. - Publish the Laravel RBAC configuration when it has not already been published:
Define abilities
Store abilities as string-backed PHP enums in config('rbac.path'), which defaults to app/Abilities. All discovered enum case values must be unique, including values in different ability enums.
Generate an ability enum:
Define permissions as enum cases and use their cases in role definitions instead of repeating string values:
Define roles
Create each role by extending BinaryCats\LaravelRbac\DefinedRole. List its guards in $guards, then implement one public method per guard. Each guard method returns the permissions for that role and guard.
Generate a role:
Role names are derived from the class name by removing the Role suffix. Set the protected $name property when a role requires an explicit name.
For each configured guard, the role must provide a same-named public method. That method may return backed-enum cases or permission strings.
Register and synchronize
Register every defined-role class in config/rbac.php:
Run the synchronization command after changing ability enums, role definitions, or registered roles:
The default sequence flushes Spatie's permission cache, creates permissions for discovered abilities using Laravel's default authentication guard, and synchronizes all configured defined roles. A role can use custom guards by listing them in $guards and implementing matching methods; synchronization creates permissions assigned to that custom-guard role as needed.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingresources/boost/skills/laravel-rbac-development/SKILL.md
Popularity
- Repository stars
- 79
- Repository forks
- 2
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/binary-cats/laravel-rbac/laravel-rbac-development)