role-permission-table-builder
Generates comprehensive role-based permission matrices in markdown or SQL format for pages, components, and data access patterns. This skill should be used when designing authorization systems, documenting permissions, creating RBAC tables, or planning access control. Use for RBAC, role permissions, access control, authorization matrix, permission mapping, or security policies.
What this skill does
# Role Permission Table Builder
Generate and maintain comprehensive role-based access control (RBAC) permission matrices for worldbuilding applications.
## Overview
To build role permission systems:
1. Define user roles and hierarchies
2. Identify protected resources (pages, components, data, actions)
3. Create permission matrices mapping roles to resources
4. Generate implementation code for middleware and components
5. Document permission policies for team reference
## Role Definitions
### Standard Roles
Define common application roles:
- **Guest**: Unauthenticated users (read-only public content)
- **User**: Basic authenticated users (read own data, limited writes)
- **Creator**: Content creators (create/edit entities, manage own content)
- **Editor**: Content editors (edit any content, moderate submissions)
- **Admin**: System administrators (full access, user management)
- **Super Admin**: Platform owners (all permissions, system configuration)
### Custom Roles
To define worldbuilding-specific roles:
- **World Owner**: Creator of worldbuilding project
- **Collaborator**: Invited contributor to world
- **Viewer**: Read-only access to private world
- **Game Master**: Special permissions for RPG campaigns
- **Publisher**: Can publish worlds publicly
Consult `references/role-hierarchy.md` for role inheritance patterns.
## Permission Matrix
### Page-Level Permissions
To define page access:
| Page Route | Guest | User | Creator | Editor | Admin |
| --------------------- | ----- | ---- | ------- | ------ | ----- |
| / | [OK] | [OK] | [OK] | [OK] | [OK] |
| /login | [OK] | [OK] | [OK] | [OK] | [OK] |
| /dashboard | [ERROR] | [OK] | [OK] | [OK] | [OK] |
| /worlds/create | [ERROR] | [OK] | [OK] | [OK] | [OK] |
| /worlds/[id] | ๐ | ๐ | [OK] | [OK] | [OK] |
| /worlds/[id]/edit | [ERROR] | [ERROR] | [OK] | [OK] | [OK] |
| /admin/users | [ERROR] | [ERROR] | [ERROR] | [ERROR] | [OK] |
| /admin/settings | [ERROR] | [ERROR] | [ERROR] | [ERROR] | [OK] |
Legend:
- [OK] Full access
- ๐ Conditional access (ownership/invitation)
- [ERROR] No access
### Component-Level Permissions
To define component visibility:
| Component | Guest | User | Creator | Editor | Admin |
| ---------------------- | ----- | ---- | ------- | ------ | ----- |
| WorldList | [OK] Public | [OK] All | [OK] All | [OK] All | [OK] All |
| WorldCreateButton | [ERROR] | [OK] | [OK] | [OK] | [OK] |
| EntityEditor | [ERROR] | [ERROR] | [OK] Own | [OK] All | [OK] All |
| DeleteButton | [ERROR] | [ERROR] | [OK] Own | [OK] All | [OK] All |
| ShareWorldButton | [ERROR] | [ERROR] | [OK] Own | [OK] All | [OK] All |
| AdminPanel | [ERROR] | [ERROR] | [ERROR] | [ERROR] | [OK] |
| UserManagement | [ERROR] | [ERROR] | [ERROR] | [ERROR] | [OK] |
### Data Access Permissions
To define data operations:
| Operation | Guest | User | Creator | Editor | Admin |
| --------------------------- | ----- | -------- | -------- | ------ | ----- |
| Read public worlds | [OK] | [OK] | [OK] | [OK] | [OK] |
| Read private worlds | [ERROR] | ๐ Invited | ๐ Own | [OK] | [OK] |
| Create world | [ERROR] | [OK] | [OK] | [OK] | [OK] |
| Update own world | [ERROR] | [OK] | [OK] | [OK] | [OK] |
| Update any world | [ERROR] | [ERROR] | [ERROR] | [OK] | [OK] |
| Delete own world | [ERROR] | [OK] | [OK] | [OK] | [OK] |
| Delete any world | [ERROR] | [ERROR] | [ERROR] | [ERROR] | [OK] |
| Create entity | [ERROR] | [ERROR] | [OK] | [OK] | [OK] |
| Update own entity | [ERROR] | [ERROR] | [OK] | [OK] | [OK] |
| Update any entity | [ERROR] | [ERROR] | [ERROR] | [OK] | [OK] |
| Delete entity | [ERROR] | [ERROR] | [OK] Own | [OK] | [OK] |
| Manage collaborators | [ERROR] | [ERROR] | [OK] Own | [OK] | [OK] |
| Publish world | [ERROR] | [ERROR] | [OK] Own | [OK] | [OK] |
| Moderate content | [ERROR] | [ERROR] | [ERROR] | [OK] | [OK] |
| Manage users | [ERROR] | [ERROR] | [ERROR] | [ERROR] | [OK] |
### Action Permissions
To define Server Action permissions:
| Server Action | Guest | User | Creator | Editor | Admin |
| ---------------------- | ----- | ---- | ------- | ------ | ----- |
| createWorld | [ERROR] | [OK] | [OK] | [OK] | [OK] |
| updateWorld | [ERROR] | ๐ | ๐ | [OK] | [OK] |
| deleteWorld | [ERROR] | ๐ | ๐ | [ERROR] | [OK] |
| createEntity | [ERROR] | [ERROR] | [OK] | [OK] | [OK] |
| updateEntity | [ERROR] | [ERROR] | ๐ | [OK] | [OK] |
| deleteEntity | [ERROR] | [ERROR] | ๐ | [OK] | [OK] |
| inviteCollaborator | [ERROR] | [ERROR] | ๐ | [OK] | [OK] |
| publishWorld | [ERROR] | [ERROR] | ๐ | [OK] | [OK] |
| deleteUser | [ERROR] | [ERROR] | [ERROR] | [ERROR] | [OK] |
Use `scripts/generate_permission_matrix.py` to create customized permission tables.
## SQL Schema
To implement permissions in database:
```sql
-- Roles table
CREATE TABLE roles (
id SERIAL PRIMARY KEY,
name VARCHAR(50) UNIQUE NOT NULL,
description TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Permissions table
CREATE TABLE permissions (
id SERIAL PRIMARY KEY,
resource VARCHAR(100) NOT NULL,
action VARCHAR(50) NOT NULL,
description TEXT,
UNIQUE(resource, action)
);
-- Role permissions mapping
CREATE TABLE role_permissions (
id SERIAL PRIMARY KEY,
role_id INTEGER REFERENCES roles(id) ON DELETE CASCADE,
permission_id INTEGER REFERENCES permissions(id) ON DELETE CASCADE,
UNIQUE(role_id, permission_id)
);
-- User roles
CREATE TABLE user_roles (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
role_id INTEGER REFERENCES roles(id) ON DELETE CASCADE,
assigned_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE(user_id, role_id)
);
-- Resource ownership
CREATE TABLE resource_ownership (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
resource_type VARCHAR(50) NOT NULL,
resource_id INTEGER NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE(resource_type, resource_id)
);
-- Collaborators (for conditional access)
CREATE TABLE collaborators (
id SERIAL PRIMARY KEY,
world_id INTEGER REFERENCES worlds(id) ON DELETE CASCADE,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
role VARCHAR(50) NOT NULL,
invited_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE(world_id, user_id)
);
```
Use `scripts/generate_rbac_schema.py` to generate database schema with seed data.
Reference `assets/rbac-schema.sql` for complete schema with indexes and constraints.
## Implementation
### Middleware Protection
To protect routes with middleware:
```typescript
// middleware.ts
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
import { getSession } from '@/lib/auth';
import { checkPermission } froRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only โ no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.