skill-auth-rbac

Implement RBAC and PBAC with role hierarchies, guards, and JWT-embedded permissions.

4|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/ryan-nguyen-01/agent-platform --skill skill-auth-rbac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skill-auth-rbac
Source: https://github.com/ryan-nguyen-01/agent-platform/tree/main/.claude/skills/skill-auth-rbac
Command: npx skills add https://github.com/ryan-nguyen-01/agent-platform --skill skill-auth-rbac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Implementing scalable and precise access control across applications can be error-prone and hard to maintain. This skill provides a robust model for role-based and permission-based access control, including role hierarchies, resource permissions, guards, and policy patterns to standardize authorization decisions.

Core Features & Use Cases

  • Role-based access control (RBAC) with hierarchical roles and inherited permissions
  • Permission-based access control (PBAC) with granular action-resource scopes
  • Guards for NestJS and middleware for Express to enforce authorization
  • Database-backed permission modeling with migrations and clear policy patterns
  • JWT-embedded roles with server-side permission resolution to keep tokens lean

Quick Start

Configure roles and permissions in your app and attach guards or middleware to enforce policy-based access control.

Frequently Asked Questions about skill-auth-rbac

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement role-based access control with hierarchical permissions in NestJS?

You can implement RBAC in Express using middleware that intercepts requests and validates permissions against database-backed policy rules. This skill provides middleware patterns to enforce granular action-resource scopes and role hierarchies.

What is the difference between RBAC and PBAC for backend authorization?

JWT-embedded authorization keeps tokens lean by storing only roles in the token while resolving actual permissions server-side against the database. This approach prevents token bloat and allows permission updates without reissuing JWTs.

Can I use policy-based access control guards with an existing Express middleware setup?

Database-backed permission modeling requires defining roles, permissions, and resource scopes in your database with corresponding migrations. This skill provides clear policy patterns and migration structures to establish the schema needed for server-side permission resolution.

How do I keep JWT tokens lean when embedding role and permission data for authentication?

Scalable authorization is supported through hierarchical role inheritance, database-backed permission resolution, and policy-based guards that standardize access decisions. This architecture handles growing user bases and complex permission trees without hardcoded checks.