Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/auth-implementation-patterns/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/auth-implementation-patterns/

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.

auth-implementation-patterns Seth Hobson auth-implementation-patterns — a skill for designing authentication and authorization: JWT, OAuth2, sessions, roles. Useful when you build a login flow or fix an access bug. CX Codex +1 19,388installs auth-sec yaklang auth-sec is a Claude Code skill that routes authentication and authorization testing. It helps select an audit path before examining specific attacks. CX Codex +1 4,100installs better-auth pproenca A TypeScript skill for Better Auth: instance setup, adapter choice, sessions and cookies, plugins, plus migration from another auth library. CX Codex +1 150installs auth-patterns davepoon auth-patterns is a Claude Code skill for Next.js authentication, covering NextAuth.js v5 setup, middleware route guards, RBAC, and session handling in Server Components. CX Codex +1 183installs da-auth adobe da-auth is a Claude Code skill that retrieves an Adobe IMS access token for the admin.da.live API. Runs before pushing page content, listing documents, or triggering content preview in DA. CX Codex +1 1,100installs app-auth Fatih C. Akyon The app-auth skill for Claude Code structures and implements application authentication flows. It activates when handling social login, password recovery, account switching, or sign-in components. CX Codex +1 ★ 1,216repo stars auth-security-reviewer patricio0312rev auth-security-reviewer walks through sessions, CSRF, cookies and login flows in your code, lists the holes and suggests fixes with severity. CX Codex +1 357installs

From the same set187

The whole set →
github-automation github-automation drives GitHub issues, pull requests, branches, workflows and permissions through Rube MCP, and halts when repository policy points elsewhere. CX Codex +1 ★ 50,109repo stars google-calendar-automation google-calendar-automation is a Claude Code skill for managing Google Calendar through an existing authenticated connector. It requires confirmation before scheduling or canceling meetings. CX Codex +1 ★ 50,109repo stars fal-platform fal-platform — a skill for platform APIs: see which models an account can reach, what a run costs and how much has already been spent. CX Codex +1 ★ 50,109repo stars using-neon The using-neon skill guides agents through Neon Serverless Postgres work, from connection choices to APIs and features such as branching, autoscaling, and scale-to-zero. CX Codex +1 ★ 50,109repo stars rclone_serve_ftp rclone_serve_ftp launches Rclone's built-in FTP server for any configured remote storage path. Handy when you need to expose cloud files to legacy FTP clients or scripts. CX Codex +1 ★ 50,109repo stars rclone_serve_nfs The rclone_serve_nfs command exposes an rclone remote through an NFSv3 server. Use it when a remote needs to appear as a mounted filesystem. CX Codex +1 ★ 50,109repo stars rclone_nfsmount rclone_nfsmount mounts cloud storage as an NFS filesystem. Unix only, requires an NFS client and mount permissions. CX Codex +1 ★ 50,109repo stars energy-procurement energy-procurement structures power and gas procurement, demand charge mitigation, and supplier contract evaluation for multi-site operations. CX Codex +1 ★ 50,109repo stars

Project sponsors

Companies that keep this analytics open