jyjeanne/ai-setup-forge/advanced-rbac
Claude Code and agent skill by jyjeanne/ai-setup-forge
- community
Checking that the SKILL.md file is still in the repository.
To implement a scalable permission system where users have roles, and roles have granular permissions. Use when: B2B SaaS applications (Admin, Editor, Viewer); Systems with complex access requirements.
Install
npx vskill@latest install jyjeanne/ai-setup-forge/advanced-rbacSKILL.md
The same SKILL.md was published earlier as jyjeanne/ai-setup-forge/advanced-rbac.
Purpose
To implement a scalable permission system where users have roles, and roles have granular permissions.
When to Use
- B2B SaaS applications (Admin, Editor, Viewer).
- Systems with complex access requirements.
Procedure
1. Data Model
- Users:
id,name,role_id(or m:nuser_roles). - Roles:
id,name(e.g., 'admin', 'editor'). - Permissions:
id,action,resource(e.g.,create:post,read:user). - RolePermissions: Join table.
2. Middleware (Enforcement)
Don't check roles (if user.role === 'admin'). Check permissions.
3. Hierarchy (Optional)
Roles can inherit from others.
Adminhas all permissions ofEditor+delete:user.- This logic is handled in the permission resolution function.
4. Frontend Integration
Send permissions list to frontend on login.
Use a <Can permission="create:posts"> component to hide/show UI elements.
Constraints
- Granularity: Balance between too broad (
manage:all) and too specific (update:post:title). - Caching: Fetching permissions on every request is slow. Cache them in the JWT or Redis (invalidate on role change).
Expected Output
A flexible security model allowing admins to configure what users can do without changing code.
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 repositoryCheckingskills/advanced-rbac/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 8
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/jyjeanne/ai-setup-forge/advanced-rbac)