manage-permissions

manage-permissions is a skill for Claude Code, Codex from anoopsg/agent_rules. It costs 47 tokens per session (1,070 once invoked), scanned A, original, MIT.

A workflow for changing role-based access control, the system that decides which users may perform which actions. It keeps capabilities in a permission model and maps those permissions to user roles.

In plain words
What is it for?
Use it when adding a permission, granting it to a role, or restricting a route or widget by user capability.
Why use it?
It prevents access rules from being scattered or tied directly to role names in individual screens. A single role-to-permission map remains the source for routes and widgets.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding a permission, granting it to a role, or restricting a route or widget by user capability.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anoopsg/agent_rules/manage-permissions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add anoopsg/agent_rules --skill manage-permissions
Clone the repo
git clone --depth 1 https://github.com/anoopsg/agent_rules

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for manage-permissions

README.md
[![agentmods](https://agentmods.dev/badge/skills/anoopsg/agent_rules/manage-permissions/github.svg)](https://agentmods.dev/skills/anoopsg/agent_rules/manage-permissions)
Your own site
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/manage-permissions"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/manage-permissions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for manage-permissions

Your own site · 80×15
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/manage-permissions"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/manage-permissions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01070
Opus 5.5 $0.00019 $0.00428
Sonnet 5.5 $0.00009 $0.00214
Haiku 4.5 $0.00005 $0.00107

Measured 22d ago against content hash 31d7b301ab9c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

manage-permissions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/exclusive/skills/manage-permissions/SKILL.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Permissions & RBAC Management Skill

This skill defines the process for extending the RBAC (role-based access control) model and gating routes or UI by capability. See ADR-0014 (docs/adr/, if present) for the full design rationale — this skill only covers the mechanics.

1. The Model

  • UserRole (lib/src/features/auth/_self/data/models/user_role.dart): an enum of session roles (e.g. guest, standard).
  • Permission (lib/src/features/auth/_self/data/models/permission.dart): an enum of capabilities (e.g. settingsView, postsEdit). Routes and widgets declare a Permission, never a UserRole directly.
  • kRolePermissions (lib/src/features/auth/_self/data/models/role_permissions.dart): a single static Map<UserRole, Set<Permission>> — the one source of truth for what each role can do.
  • AppState.permissions derives the current session's permission set from kRolePermissions; every consumer reads through this, never kRolePermissions directly.

Where the Role Comes From

The backend sends the role as a string. The allowed values are the role enum in contracts/openapi.json, and the API adapter maps it to UserRole by name when it builds the session (grep -rn "asNameMap" lib/src/infrastructure). An unknown wire value falls back to .standard, so a role the app doesn't know yet never breaks login.

To add a new role:

  1. Add it to UserRole and run melos run generate (UserRole is a @MappableEnum).
  2. Give it an entry in kRolePermissions (Step 2).
  3. Add it to the role enum in contracts/openapi.json, so the wire name matches the enum member name.

Stop and ask if the backend spec doesn't define the role, or names it differently from the enum member.

2. Step 1 — Add a New Permission

Add a member to the Permission enum:

enum Permission {
  settingsView,
  postsEdit,
  // ...
  reportsView,
}

3. Step 2 — Grant It to a Role

Update kRolePermissions:

const kRolePermissions = <UserRole, Set<Permission>>{
  .guest: {},
  .standard: {.settingsView, .postsEdit, .reportsView},
};

Read the full file on GitHub · 137 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 22d ago Changed · +34 lines · +6 tokens per session 31d7b301ab9c
  2. 1mo ago Changed f6a476cb7033
  3. 1mo ago Changed · -5 lines 91edc88e016c
  4. 3mo ago First seen · 108 lines · 41 tokens per session scan A d290b0903e59

Subscribe to this mod's changes

manage-permissions is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 23d ago), licensed MIT. It adds 47 tokens to every session and 1,070 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

manage-permissions compared with skills from other repositories

manage-permissions next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
manage-permissionsanoopsg/agent_rulesSkill223d agoMITA47Claude Code, Codex
git-workflowAsyrafHussin/agent-skillsSkill111todayMITA59Claude Code, Codex
laravel-inertia-reactAsyrafHussin/agent-skillsSkill111todayMITA59Claude Code, Codex
laravel-owasp-securityAsyrafHussin/agent-skillsSkill111todayMITA87Claude Code
seo-best-practicesAsyrafHussin/agent-skillsSkill111todayMITA78Claude Code
state-managementAsyrafHussin/agent-skillsSkill111todayMITA47Claude Code, Codex
technical-debtAsyrafHussin/agent-skillsSkill111todayMITA109Claude Code