auth-implementation-patterns · sickn33 — Claude Code skill: what it does
auth-implementation-patterns — a skill that walks the agent through auth design and review: token lifecycle, sessions, policy enforcement points.
MIT ★ 50,109 updated 2026-10-29
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a claude-codeWhat auth-implementation-patterns does
The skill turns an auth task into a short plan. Who the users and tenants are, which flows exist, what the threat model rules out. From there the agent picks a strategy (sessions, JWT or OIDC) and sets the token lifetime, then names the places where policy gets enforced. Secrets storage, rotation, logging and audit come last.
Everything ships as SKILL.md plus resources/implementation-playbook.md with worked patterns. The bundled example is an Express app that keeps the pre-login session: regenerate the ID after the password check, store only the fields you need, then prove the old cookie is dead on /api/profile. Failed login, logout and a failing session store are part of the test list.
Expect sketches, not a service. You supply database adapters and request schemas for your stack, plus the framework versions, identity provider, tenant model and credential store. Token validation never proves who owns a record, so tenant and object policy has to sit on reads and writes. Cookie flags don't cover CSRF either. The skill carries a risk: critical tag.
What it helps with
- plan a login flow with a written threat model
- pick between session cookies, JWT and OIDC
- map roles onto enforcement points in the API
- catch the bug where a pre-login session survives sign-in
- confirm an old cookie can't reach
/api/profile
Example prompts for the agent
- Walk through auth for my Express app and tell me what to test around sessions.
- Plan secret storage and rotation for the login service, and keep tokens out of the logs.
- Check that the session ID changes after login and that the previous cookie is rejected on
/api/profile.
How to install auth-implementation-patterns
1Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a claude-code2Manually: put the files in place
~/.claude/skills/auth-implementation-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/auth-implementation-patterns/
1Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a codex2Manually: put the files in place
.agents/skills/auth-implementation-patterns/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a cursor2Manually: put the files in place
.cursor/skills/auth-implementation-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install sickn33/agentic-awesome-skills skills/auth-implementation-patterns2Manually: put the files in place
.github/skills/auth-implementation-patterns/SKILL.md1Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a gemini-cli2Platform CLI
gemini skills install https://github.com/sickn33/agentic-awesome-skills --path skills/auth-implementation-patternsManually: put the files in place
.devin/skills/auth-implementation-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about auth-implementation-patterns
How do I install auth-implementation-patterns in Claude Code?
Run npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a claude-code. The skill file lands at ~/.claude/skills/auth-implementation-patterns/SKILL.md.
What does auth-implementation-patterns do?
It takes auth work step by step: threat model, choice of token strategy, enforcement points, secret storage. Use it while building a login flow or reviewing authorization code someone else wrote.
Does a valid JWT prove the user owns the record?
No. Validation only confirms the token itself. Tenant and object policy still needs enforcing on every read and write.
Source text
SKILL.md · MIT
--- name: auth-implementation-patterns description: "Implement or review authentication and authorization with explicit token, session and resource-access boundaries." risk: critical source: community date_added: "2026-02-27" --- # Authentication & Authorization Implementation Patterns Build secure, scalable authentication and authorization systems using industry-standard patterns and modern best practices. ## Use this skill when - Implementing user authentication systems - Securing REST or GraphQL APIs - Adding OAuth2/social login or SSO - Designing session management or RBAC - Debugging authentication or authorization issues ## Do not use this skill when - You only need UI copy or login page styling - The task is infrastructure-only without identity concerns - You cannot change auth policies or credential storage ## Instructions - Define users, tenants, flows, and threat model constraints. - Choose auth strategy (session, JWT, OIDC) and token lifecycle. - Design authorization model and policy enforcement points. - Plan secrets storage, rotation, logging, and audit requirements. - If detailed examples are required, open `resources/implementation-playbook.md`. ## Safety - Never log secrets, tokens, or credentials. - Enforce least privilege and secure storage for keys. ## Resources - `resources/implementation-playbook.md` for detailed patterns and examples. ## Worked example Input: an Express application accepts a user's login and keeps the pre-login session ID. Read the bundled playbook, regenerate the session after credential verification, save only required identity fields, and verify that the old cookie cannot access `/api/profile`. Also test failed login, logout and store failure. Expected: successful login changes the session ID; failed login grants no access. ## Inputs and prerequisites Record the installed framework/SDK versions, identity provider, tenant model, credential store and test environment. Supply project-specific database adapters and request schemas; examples are integration sketches, not a runnable identity service. ## Limitations - JWT validation does not establish resource ownership; enforce tenant and object policy on reads and writes. - Refresh rotation requires atomic persistence and concurrency tests; the issuance example alone does not provide it. - Cookie flags do not replace CSRF protection, and secure-cookie behavior needs the actual HTTPS/proxy configuration tested. - Provider integrations and password policies must be checked against current primary documentation and the application's threat model.
© sickn33 · MIT · sickn33/agentic-awesome-skills
Similar skills
All skills for Security →auth-implementation-patterns by other authors comes first.