rbac-permissions-architect

Generate RBAC permission matrices and CASL integration blueprints for multi-workspace features.

Updated Sep 29, 2025
One-click install
npx skills add https://github.com/fercracix33/poli2-clean-architecture --skill rbac-permissions-architect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rbac-permissions-architect
Source: https://github.com/fercracix33/poli2-clean-architecture/tree/main/.claude/skills/rbac-permissions-architect
Command: npx skills add https://github.com/fercracix33/poli2-clean-architecture --skill rbac-permissions-architect

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers architects to design robust, RBAC-aware features that seamlessly integrate with a modular permissions system. It eliminates the complexity of defining workspaces, features, permissions, and special roles, ensuring consistent access control and multi-tenant isolation without manual oversight.

Core Features & Use Cases

  • Workspace Design: Guides the creation of independent organizational and project workspaces, ensuring no feature or permission inheritance.
  • Permission Matrix Definition: Helps define granular permissions (resource.action format) for new features, including standard CRUD and custom actions.
  • Special Role Integration: Clarifies the unique behaviors and restrictions of Owner and Super Admin roles, ensuring they bypass normal checks while respecting system-level constraints.
  • RLS-Ready Schema Planning: Facilitates the design of database schemas with workspace_id foreign keys and outlines RLS policies for secure data access.
  • Use Case: When architecting a new "Kanban Board" feature, this Skill guides you to define its resources (boards, cards), permissions (e.g., boards.create, cards.move), how Owners and Super Admins interact, and the necessary database schema and RLS policies for multi-tenant isolation.

Quick Start

1. Start by defining your feature's core concepts:

Read: references/CONCEPTS.md

2. Then, outline your feature's scope and resources:

Read: references/WORKSPACES.md

3. Proceed through the 7-phase workflow to design your RBAC-aware feature.

Frequently Asked Questions about rbac-permissions-architect

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

FAQPage Schema
How do I design RBAC permissions for a multi-tenant application?

RBAC permission design for multi-tenant systems requires defining workspace-level architectures, mapping features to granular resources and actions in `resource.action` format, and establishing independent permission matrices per workspace. This Skill guides you through feature-resource-permission mapping, workspace isolation principles, and integration with reference materials to ensure consistent access control without manual oversight.

What's the best way to structure permissions for features with Owner and Super Admin roles?

Structure permissions by clarifying how Owner and Super Admin roles bypass normal checks while respecting system-level constraints. Define their unique behaviors separately from standard user permissions, document special-case interactions, and ensure they align with immutable architectural principles. This Skill walks through special role integration within the broader permission matrix design.

How do I create a permission matrix and map it to CASL integration?

Create a permission matrix by defining granular permissions for each feature's resources, then generate a CASL integration blueprint that translates those permissions into rule definitions. This Skill produces complete permission metadata—slug, category, resource, action, and permission strings—and delivers a CASL-ready output that bridges PRD design to implementation.

What database schema design do I need for RBAC with workspace isolation?

Design schemas with `workspace_id` foreign keys on all data tables and Row-Level Security policies that enforce workspace boundaries. This Skill facilitates RLS-ready schema planning and outlines the policies required to ensure secure, isolated data access across workspaces in a multi-tenant environment.

Can I use RBAC design to plan feature visibility and UI permissions?

Yes. RBAC design directly informs UI visibility by mapping permissions to feature-specific resources and actions, then determining which UI elements or workflows users can access based on their assigned permissions. This Skill covers the complete path from permission definition through UI layer planning and cross-workspace verification.

Do I need to define separate permission matrices for each workspace type?

Yes. This Skill enforces independence between organizational and project workspaces, requiring separate workspace designs with no feature or permission inheritance across levels. Each workspace type gets its own permission matrix, resource definitions, and role-based access rules to maintain isolation and modularity.