access-control-rbac

aj-geddes/useful-ai-prompts · updated Apr 8, 2026

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill access-control-rbac
0 commentsdiscussion
summary

Implement comprehensive Role-Based Access Control systems with permissions management, attribute-based policies, and least privilege principles.

skill.md

Access Control & RBAC

Table of Contents

Overview

Implement comprehensive Role-Based Access Control systems with permissions management, attribute-based policies, and least privilege principles.

When to Use

  • Multi-tenant applications
  • Enterprise access management
  • API authorization
  • Admin dashboards
  • Data access controls
  • Compliance requirements

Quick Start

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)

Reference Guides

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

Best Practices

✅ DO

  • Implement least privilege
  • Use role hierarchies
  • Audit access changes
  • Regular access reviews
  • Separate duties
  • Document permissions
  • Test access controls
  • Use attribute-based policies

❌ DON'T

  • Grant excessive permissions
  • Share accounts
  • Skip access reviews
  • Hardcode permissions
  • Ignore audit logs
  • Use role explosion

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.427 reviews
  • Layla Gupta· Dec 20, 2024

    We added access-control-rbac from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Pratham Ware· Dec 8, 2024

    access-control-rbac is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Sophia Ramirez· Dec 8, 2024

    access-control-rbac reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Aisha Chawla· Nov 27, 2024

    Registry listing for access-control-rbac matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Sophia Menon· Nov 19, 2024

    access-control-rbac is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Chinedu Martin· Nov 11, 2024

    Keeps context tight: access-control-rbac is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Zaid White· Oct 18, 2024

    access-control-rbac fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Sophia Bansal· Oct 10, 2024

    Useful defaults in access-control-rbac — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Yuki Flores· Oct 2, 2024

    access-control-rbac has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Sakshi Patil· Sep 25, 2024

    access-control-rbac fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 27

1 / 3