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 skills add filipebraida/adonisjs-starter-kit --skill authorizationgit clone --depth 1 https://github.com/filipebraida/adonisjs-starter-kitWrote 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/filipebraida/adonisjs-starter-kit/authorization)<a href="https://agentmods.dev/skills/filipebraida/adonisjs-starter-kit/authorization"><img src="https://agentmods.dev/badge/skills/filipebraida/adonisjs-starter-kit/authorization/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.
<a href="https://agentmods.dev/skills/filipebraida/adonisjs-starter-kit/authorization"><img src="https://agentmods.dev/badge/skills/filipebraida/adonisjs-starter-kit/authorization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00173 | $0.02555 |
| Opus 5.5 | $0.00069 | $0.01022 |
| Sonnet 5.5 | $0.00035 | $0.00511 |
| Haiku 4.5 | $0.00017 | $0.00255 |
Grade A, and why
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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Authorization
Role-based access control with @adonis-agora/authz (DB-backed RBAC, wildcard matching) under AdonisJS Bouncer. Two kinds of role, and five moving parts:
- Capabilities — each module declares its own in
app/<mod>/enums/capability.tsas aCAPABILITIES_<MOD>const of<domain>.<action>slugs. - Role grants —
config/capabilities.tsmaps every structural role inROLESto the capabilities it grants (users.*wildcards allowed). Read at check time from code: no seed, no screen can strip a capability the app depends on. Institutional roles are created on the roles page (/roles) and their capabilities, ticked fromvocabularyin the same file, are stored in the authz tables; the library adds them to the code grants. - Assignments —
user.assignRole(role)writes a row in the authz tables (auth/database/migrations/*_create_authz_tables.ts). The user forms offer the structural roles and the institutional ones; actions callrequireExistingRolefirst, becauseassignRolewould create an unknown role. Authorizer(#core/authz/authorizer) —can(user, capability)with the request's permission cache. Policies and actions inject it.- Bouncer policies —
BasePolicysubclasses that combine a capability with ownership/state and gate the controller.
On the frontend the shared authz prop ({ roles, permissions }, built by buildAuthzShare in InertiaMiddleware) is read with useCan(capability) or <Can permission="..."> from @adonis-agora/authz-react, wildcard-aware.
Rules
- Capabilities live with their module:
app/<mod>/enums/capability.ts, naming<domain>.<action>(users.create,tokens.view_list). Typed asCapability(#core/authz/capability) at the check site, so a typo is a compile error at the constant. - Grants live in one place:
config/capabilities.ts→roleGrants. Adding a capability without granting it means nobody has it (except via wildcards such asusers.*). - Role slugs live in
ROLES(app/auth/enums/role.ts) withROLE_WEIGHTSformainRole()display ordering.roleGrantsis typedRecord<Role, string[]>, so a new role must be granted. - Checks go through
Authorizer.canin policies and actions — notuser.can()from the mixin — so every check in a request shares one cached read. - Policies subclass
BasePolicy, use@inject()withAuthorizer, live atapp/<mod>/policies/<entity>_policy.ts. One method per gated action;currentUserfirst, resource second. - Gate at the controller before validating:
await bouncer.with(EntityPolicy).authorize('method', resource?). Every mutation route must be gated by a policy. - Reading roles in lists:
User.rolesis a read-onlymanyToManytoAuthzRoleviaauthzRolesRelation()—preload('roles')/whereHas('roles', …)work. Writes always go through the store (assignRole,SyncUserRoles), neverAuthzRole. - Escalation guards are defense in depth on top of validators:
requireManageRoles(executor)— throwsManageRolesUnauthorizedExceptionwithoutusers.manage_roles.requireManageRolesIfEscalating(executor, roles)— enforces it on create/invite when a non-default role is requested.AdminLockoutException—SyncUserRolesrefuses to remove the executor's ownadmin.SyncUserRolesremoves before granting, inside one transaction: a failure halfway leaves less privilege, never more.
- Permission cache: the library caches role and permission reads per request on its own (AsyncLocalStorage is on in
config/app.ts), so every check in a request costs one read; outside a request each check reads the store. Don't pass acacheof your own. Grants changed mid-request apply from the next request.
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.
- 5d ago Changed 882349323093
- 20d ago Changed · +12 lines · +28 tokens per session a3e31887f6d9
- 3mo ago First seen · 136 lines · 145 tokens per session scan A c4b265729541
authorization is a skill published in the GitHub repository filipebraida/adonisjs-starter-kit (99 stars, last pushed 6d ago), licensed MIT. It adds 173 tokens to every session and 2,555 once invoked, about $0.0007 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-30.
authorization compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| authorizationfilipebraida/adonisjs-starter-kit | Skill | 99 | 6d ago | MIT | A | 173 | Claude Code |
| calendarcnvmnog/calendarcn | Skill | 168 | 5d ago | MIT | A | 76 | Claude Code, Codex |
| ui-beatsnikhils4/ui-beats | Skill | 236 | 3mo ago | MIT | A | 62 | Claude Code, Codex |
| declare-typesone-ie/one | Skill | 135 | 3d ago | none | A | 49 | Claude Code, Codex |
| sdkone-ie/one | Skill | 135 | 3d ago | none | A | 34 | Claude Code |
| react-doctorshipkit-io/bones | Skill | 21 | 3d ago | none | A | 31 | Claude Code, Codex |
| auth-setupfirtoz/cf-multiworker-starter-kit | Skill | 12 | 1mo ago | none | A | 39 | Claude Code, Codex |