From aj-geddes-useful-ai-prompts-4
Implements Role-Based Access Control (RBAC) with permissions management, role hierarchies, and attribute-based policies. Use for multi-tenant apps, enterprise access management, and API authorization.
How this skill is triggered — by the user, by Claude, or both
Slash command
/aj-geddes-useful-ai-prompts-4:access-control-rbacThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Implement comprehensive Role-Based Access Control systems with permissions management, attribute-based policies, and least privilege principles.
Minimal working example:
// rbac-system.js
class Permission {
constructor(resource, action) {
this.resource = resource;
this.action = action;
}
toString() {
return `${this.resource}:${this.action}`;
}
}
class Role {
constructor(name, description) {
this.name = name;
this.description = description;
this.permissions = new Set();
this.inherits = new Set();
}
addPermission(permission) {
this.permissions.add(permission.toString());
}
removePermission(permission) {
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Node.js RBAC System | Node.js RBAC System |
| Python ABAC (Attribute-Based Access Control) | Python ABAC (Attribute-Based Access Control) |
| Java Spring Security RBAC | Java Spring Security RBAC |
npx claudepluginhub aj-geddes/useful-ai-promptsImplements Node.js RBAC with permissions, role inheritance, Express middleware; Python ABAC patterns and access control models. For admin dashboards, multi-tenant apps, authorization.
Guides designing role-based access control (RBAC) systems with permission modeling, role definitions, and resource-level checks to prevent authorization failures.