auth-design
Skill0 starsChanged 5 months agoApache-2.0View on GitHub
Design authentication and authorization — sessions, OAuth/OIDC,
1 other project uses a version of this.
Adopted by
Most recently taken up by
- arjunprabhulal/agent-skillstheir own version, first seen Aug 3, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- arjunprabhulal/agent-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository128 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-implementationSkill
- accessibility-reviewSkill
- api-changelogSkill
- api-designSkill
- caching-strategiesSkill
- chaos-experiment-designSkill
- ci-cd-pipelinesSkill
- cli-designSkill
- cloudformation-reviewSkill
- codebase-orientationSkill
- code-commentsSkill
- code-reviewSkill
- commit-messagesSkill
- container-reviewSkill
- database-indexingSkill
- database-migrationsSkill
- debuggingSkill
- dependency-upgradesSkill
- design-system-contributionSkill
- design-tokensSkill
- desktop-releaseSkill
- error-handlingSkill
- feature-flagsSkill
- finops-reviewSkill
- frontend-performanceSkill
- git-conflict-resolutionSkill
- graphql-schema-designSkill
- helm-chart-scaffoldingSkill
- i18n-reviewSkill
- kubernetes-reviewSkill
- load-test-planningSkill
- logging-observabilitySkill
- message-queue-designSkill
- migration-playbooksSkill
- mobile-releaseSkill
- multi-region-active-activeSkill
- observability-alertsSkill
- openapi-spec-designSkill
- partner-api-integrationSkill
- performance-reviewSkill
- pr-descriptionsSkill
- prompt-injection-hardeningSkill
- pulumi-reviewSkill
- rate-limitingSkill
- refactor-planningSkill
- secrets-managementSkill
- security-reviewSkill
- sql-query-reviewSkill
- terraform-reviewSkill
- test-generationSkill
- threat-modelingSkill
- webhook-designSkill
- websocket-designSkill
- ab-test-analysisSkill
- anomaly-detectionSkill
- cost-anomaly-investigationSkill
- csv-analysisSkill
- data-cleaningSkill
- data-contract-designSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 64
Do not put long-lived JWTs in localStorage for a first-party browser app without stating the XSS tradeoff.
- Distinctive: line 66
Every resource handler checks *this* object and *this* tenant, not only "is logged in".
- Distinctive: line 76
Never invent a custom crypto protocol.
- Distinctive: line 81
"Just use JWT so we can scale": ask whether a shared session store or split auth service is actually the constraint.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Auth Design
Separate who they are (authn) from what they may do to this object (authz). Default to boring, revocable server sessions unless the constraint set forces something else.
For a vulnerability hunt on existing code, use security-review. For a
system-wide STRIDE pass, use threat-modeling.
Workflow
- Actors, clients (browser, mobile, machine), and what is being protected (accounts, money, PII, admin).
- Identity: first-party password, magic link, SSO (OIDC), or passkeys. Password storage is argon2/bcrypt — never reversible or MD5/SHA1.
- Session: server-side session id in an
HttpOnly; Secure; SameSitecookie is the default. Say why before choosing JWT in localStorage. - Token lifetimes: access short; refresh rotating and reuse-detected; logout revokes the family.
- Authz model: RBAC roles plus object/tenant checks on every mutate and read of another user's record (no IDOR).
- Recovery: email change, password reset, MFA reset — treat as account-takeover paths.
- Threats: CSRF, session fixation, open redirects after login, token leak in URLs/logs, confused-deputy OAuth redirects.
Output format
## Auth design: <product>
**Clients:** …
**Identity:** …
**Session / tokens:** …
**Authz model:** …
**Recovery:** …
### Decisions
| Decision | Choice | Why |
### Abuse paths still open
…
### Do not
…Rules
- Do not put long-lived JWTs in
localStoragefor a first-party browser app without stating the XSS tradeoff. - Every resource handler checks this object and this tenant, not only "is logged in".
- OAuth: exact redirect URI allowlist,
state/nonce, PKCE for public clients, minimal scopes. - MFA is phishing-resistant (passkey / WebAuthn) when the account is high value; TOTP is a step up from nothing, not the ceiling.
- API keys are secrets: hashed at rest, scoped, rotatable, never in query strings or frontend bundles.
- Clock-skew and "alg=none" / key-confusion are findings if JWT is chosen; name the library and validation steps.
- Never invent a custom crypto protocol. Use the platform or a well-known library and say which.
Edge cases
- "Just use JWT so we can scale": ask whether a shared session store or split auth service is actually the constraint.
- Machine-to-machine: client credentials or signed requests; no user refresh-token pattern.
- Impersonation / support login: audit log, time-box, and distinct actor vs subject.
- Multi-tenant: tenant id from the session, never from an unchecked client header.
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.

