auth-rbac
Skill2 starsChanged 6 months agoMITView on GitHub
Use when routes or actions must be gated by user role: gate routes and actions behind roles so only authorised users can perform them.
In this repository77 other files it gives its agents.
- analytics-eventsSkill
- analytics-plausibleSkill
- analytics-web-vitalsSkill
- auth-oauthSkill
- auth-password-resetSkill
- auth-sessionSkill
- backend-error-handlingSkill
- backend-hono-apiSkill
- backend-openapiSkill
- backend-rate-limitSkill
- backend-zod-validationSkill
- cloudflare-d1Skill
- cloudflare-kvSkill
- cloudflare-pagesSkill
- cloudflare-r2Skill
- cloudflare-secretsSkill
- cloudflare-workerSkill
- brainstorm-specSkill
- compact-and-offloadSkill
- context-budgetSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-branchSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- scoped-readSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- think-before-codingSkill
- using-git-worktreesSkill
- using-slipstreamSkill
- verification-before-completionSkill
- write-planSkill
- writing-skillsSkill
- frontend-component-librarySkill
- frontend-dark-modeSkill
- frontend-design-systemSkill
- frontend-formsSkill
- frontend-hero-sectionSkill
- frontend-marketing-sectionsSkill
- frontend-motionSkill
- frontend-responsive-layoutSkill
- frontend-routerSkill
- frontend-tailwindSkill
- frontend-vite-reactSkill
- git-conventional-commitSkill
- git-feature-branchSkill
- git-init-repoSkill
- git-pull-requestSkill
- git-release-tagSkill
- memory-captureSkill
- memory-pruneSkill
- memory-recallSkill
- payments-checkoutSkill
- payments-stripe-setupSkill
- payments-subscriptionsSkill
- payments-webhooksSkill
- resend-domainSkill
- resend-setupSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Add middleware that checks the required role for protected routes.
- Distinctive: line 31
Run the tests and confirm a user without the required role receives a 403 on a protected route.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Gate routes and actions behind roles so only authorised users can perform them.
Steps
- Attach a role claim to the session at sign in.
- Add middleware that checks the required role for protected routes.
- Return 403 rather than 404 for an authenticated but unauthorised user.
Verify
Run the tests and confirm a user without the required role receives a 403 on a protected route.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

