rbac-management
Usar cuando se gestionan roles, permisos o se audita el acceso de usuarios.
by gonzalezpazmonica★ 52 GitHub stars
Install rbac-management in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Skill: RBAC Management
Orquestación de flujos de gestión de roles y permisos Regla: @docs/rules/domain/rbac-model.md
Flujo 1: Grant role
Asignar un rol a un usuario con auditoría.
Entradas:
user_handle: nombre del usuariorole: Admin | PM | Contributor | Viewerscope: "global" o JSON list ["proj-a", "proj-b"]granter_handle: quién asigna (debe ser Admin)
Pasos:
- Validar que
grantertiene rol Admin - Verificar que el usuario existe en
.claude/profiles/{user} - Escribir
.claude/profiles/{user}/role.mdcon los datos - Registrar la acción en
output/rbac-audit.jsonl - Confirmar: "✅ {user} ahora es {role} (scope: {scope})"
Ejemplo output:
✅ carlos-mendoza asignado como PM (scope: global)
Rol anterior: Contributor
Cambio: 2026-03-05T10:15:00Z por monica-gonzalez
Flujo 2: Revoke role
Revocar rol (degradar a Viewer).
Entradas:
user_handle: nombre del usuarioreason: motivo de revocación
Pasos:
- Leer rol actual de
.claude/profiles/{user}/role.md - Guardar rol actual como
previous_role - Escribir nuevo rol:
Viewerconrevoked_attimestamp - Registrar en audit con
reason - Confirmar: "✅ {user} revocado de {previous_role} → Viewer. Motivo: {reason}"
Restricción: No se puede revocar a Admin (requiere eliminación manual de perfil).
Flujo 3: Audit
Consultar el log de auditoría con filtros.
Parámetros:
--user {handle}: acciones del usuario--date-from {YYYY-MM-DD}: desde fecha--date-to {YYYY-MM-DD}: hasta fecha--action grant|revoke|execute: tipo de acción
Salida:
Tabla con resultados:
| Timestamp | User | Command | Allowed | Role | Reason |
|-----------|------|---------|---------|------|--------|
| 2026-03-05T10:00 | monica | sprint-plan | true | PM | — |
| 2026-03-05T10:30 | carlos | infra-create | false | Contributor | Admin only |
Estadísticas:
- Total acciones auditadas: 1.247
- Acciones denegadas: 23 (1.8%)
- Usuario con + denegaciones: carlos-mendoza (8)
Flujo 4: Check
Verificar si un usuario puede ejecutar un comando.
Parámetros:
user: handle del usuariocommand: nombre del comandoproject: (opcional) si es scope-limited
Salida:
✅ monica-gonzalez CAN sprint-plan
Rol: PM | Scope: global | Permiso: PM+
❌ carlos-mendoza CANNOT infra-create
Rol: Contributor | Requerido: Admin | Motivo: Deploy only
Sugerencia: Solicitar permiso a admin
Sección Errors
Errores manejados:
- User not found → "❌ Usuario {handle} no existe en perfiles"
- Invalid role → "❌ Rol {role} no válido (Admin|PM|Contributor|Viewer)"
- Permission denied → "❌ Solo Admin puede asignar roles"
- Role.md malformed → "❌ Fichero {path} corrompido, contactar admin"
- Audit.jsonl no accesible → "❌ Permiso insuficiente en output/rbac-audit.jsonl"
Sección Security
- NUNCA escribir rol.md sin validar granter es Admin
- NUNCA loguear datos sensibles en audit (solo handles y comandos)
- Audit trail es append-only: NUNCA modificar líneas existentes
- Si se detecta modificación manual de role.md → alerta al humano
- Rotación de audit: cuando audit.jsonl > 10MB → mover a histórico
Restricción: Este skill se ejecuta en contexto fork aislado, no contamina
el contexto principal. El output se resume en <100 tokens para el PM.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- DOMAIN.md
FAQ
What does the rbac-management skill do?
Usar cuando se gestionan roles, permisos o se audita el acceso de usuarios.
How do I install the rbac-management skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the rbac-management skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…