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.
npx agentmods add skills/j4flmao/agent-skills/authorizationnpx skills add j4flmao/agent-skills --skill authorizationgit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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.
[](https://agentmods.dev/skills/j4flmao/agent-skills/authorization)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/authorization"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/authorization.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00173 | $0.06607 |
| Opus 5 | $0.00086 | $0.03304 |
| Sonnet 5 | $0.00035 | $0.01321 |
| Haiku 4.5 | $0.00017 | $0.00661 |
Grade A, and why
backend-authorization 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 709 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Authorization
Purpose
Design and implement authorization that is correct, auditable, and maintainable. Every protected resource must have an explicit access decision. Authorization rules live in code or policy, never in the developer's head.
Architecture Decision Trees
Authorization Model Selection
How many resource types need access control?
├── < 10 → Flat RBAC (simple role-permission map)
└── >= 10 → Do roles map well to resources?
├── Yes → Does every user fit a single role?
│ ├── Yes → Hierarchical RBAC (roles + inheritance)
│ └── No → RBAC + ABAC hybrid (roles for coarse, attributes for exceptions)
└── No → Does access depend on relationships between entities?
├── Yes → ReBAC (Zanzibar-style relationship tuples)
└── No → ABAC (attribute-based policies for maximal flexibility)
Regulatory requirements (SoD, audit)?
├── Yes → Constrained RBAC with SoD enforcement
└── No → Standard RBAC or ABAC
Multi-tenant?
├── Yes → RBAC + scope-based authorization (org/department/team isolation)
└── No → Single-tenant RBAC or ABAC
Policy Engine Decision Tree
Existing policy engine in stack?
├── Yes → Leverage existing engine
└── No → Cloud-native / K8s?
├── Yes → OPA (sidecar deployment, Rego policies, K8s admission control)
└── No → Need GUI for non-devs to manage policies?
├── Yes → Permit.io (SaaS, visual policy editor)
└── No → Multi-language support critical?
├── Yes → Casbin (libraries for 10+ languages, in-app)
└── No → Fine-grained, human-readable policies?
├── Yes → Cerbos (YAML policies, sidecar)
└── No → ReBAC at massive scale?
└── AuthZed / SpiceDB (Zanzibar, gRPC API)
Temporary Access Decision Tree
Emergency scenario (production outage)?
├── Yes → Break-glass protocol: MFA required, 30 min expiry, security team notified
└── No → Need temporary elevated permissions?
├── Yes → JIT elevation: request + approval, time-bound, auto-expire
└── No → Need to delegate permissions?
└── Delegation: delegator-scoped, time-bound, non-cascading
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/authorization-advanced.md 5.6 KB
- references/authorization-audit.md 6.2 KB
- references/authorization-delegation.md 8.9 KB
- references/authorization-fundamentals.md 3.6 KB
- references/authorization-middleware.md 11 KB
- references/authorization-models.md 4.2 KB
- references/authorization-policy-distribution.md 5.7 KB
- references/authorization-testing.md 13 KB
- references/data-level-authorization.md 9.9 KB
- references/fine-grained-policies.md 9.0 KB
- references/permission-architecture.md 5.8 KB
- references/policy-engines-comparison.md 7.5 KB
- references/rbac-hierarchy.md 7.1 KB
- references/temporary-delegated-access.md 9.8 KB
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.
- yesterday First seen · 709 lines · 173 tokens per session scan A cc231c991c20
backend-authorization is a skill published in the GitHub repository j4flmao/agent-skills (20 stars, last pushed 2d ago), licensed MIT. It adds 173 tokens to every session and 6,607 once invoked, about $0.0009 per session on Opus 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-09-03.
Other skills, from other repositories
frontmcp-authorities
Use when implementing authorization and access control for FrontMCP tools, resources, prompts, or skills, deciding who may invoke what. Covers the RBAC, ABAC, and ReBAC models and when to choose each; JWT claims mapping per identity provider (Auth0, Keycloak, Okta, Cognito, Frontegg); reusable named authority…
Authorization Testing Patterns
Role-based and attribute-based access control testing including permission matrices, privilege escalation prevention, and resource-level authorization.
auth-patterns
Use when implementing authentication (JWT, sessions, OAuth), authorization (RBAC, ABAC), password hashing, MFA, or security best practices for backend services.
rbac-design
Guides the design and assessment of RBAC and ABAC authorization models against the NIST RBAC model (Sandhu et al.) and NIST SP 800-162 (ABAC guide). Auto-invoked when designing role hierarchies, evaluating permission boundaries, implementing ABAC policy patterns, performing role mining, or preventing role explosion.…
exploiting-broken-function-level-authorization
Tests APIs for Broken Function Level Authorization (BFLA) vulnerabilities where regular users can invoke administrative functions or access privileged API endpoints by directly calling them. The tester identifies admin and privileged endpoints, then attempts to access them with regular user credentials by manipulating…
implementing-rbac-hardening-for-kubernetes
Harden Kubernetes Role-Based Access Control by implementing least-privilege policies, auditing role bindings, eliminating cluster-admin sprawl, and integrating external identity providers.