
Auth security
Guides an agent through OAuth 2.1, PKCE and JWT security practices for auth code
Auth security is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- TypeScript
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 303
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Auth security
This skill gives the agent a reference-style playbook for building authentication and API authorization on the OAuth 2.1 and RFC 9700 model. It covers the Authorization Code flow with PKCE, the flows to drop (implicit and password grants), and which JWT signing algorithms to prefer, with ES256 shown as the default example.
The guidance walks through token handling in practice: verifying access tokens with an explicit algorithm allow-list, issuer, audience and clock tolerance checks, storing tokens in HttpOnly cookies for web apps or in memory for single page apps, and rotating single-use refresh tokens with reuse detection. It also outlines defenses against algorithm confusion, CSRF, XSS and token theft, including a DPoP proof-of-possession example and a revocation approach.
The code samples are TypeScript and rely on the jose library and an Express-style response object. The skill ships reference notes on OAuth, JWT and attacks, plus a TypeScript auth service template, and ends with a security checklist for reviewing an implementation.
When your agent uses it
OAuth 2.1 + JWT authentication security best practices. Use when implementing auth, API authorization, token management. Follows RFC 9700 (2025).
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Runs TypeScript scripts(see the files on GitHub)
- No network calls found in its scripts(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 5 files (43 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/auth-security to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/auth-security &&
cp -R "$tmp/skills/auth-security" ~/.claude/skills/auth-security &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/auth-security inside it instead.
Copy the skill folder to ~/.agents/skills/auth-security to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/auth-security &&
cp -R "$tmp/skills/auth-security" ~/.agents/skills/auth-security &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/auth-security inside it instead.
Copy the skill folder to ~/.cursor/skills/auth-security to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/auth-security &&
cp -R "$tmp/skills/auth-security" ~/.cursor/skills/auth-security &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/auth-security inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/majiayu000/spellbook.git --path skills/auth-securityOr copy the folder to ~/.gemini/skills/auth-security yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/auth-security:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/auth-security &&
cp -R "$tmp/skills/auth-security" ~/.copilot/skills/auth-security &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/auth-security inside it instead.
Get the folder:
git clone --depth 1 https://github.com/majiayu000/spellbook.gitThen copy spellbook/skills/auth-security into your agent's skills folder as auth-security. Agents that support SKILL.md read one folder per skill.
What it does
- PKCE authorization code flow
- Shows how to generate a code verifier and S256 challenge and exchange the authorization code.
- JWT signing and verification
- Covers algorithm choice, required claims and strict verification with an explicit allow-list.
- Browser token storage rules
- Explains when to use HttpOnly cookies versus in-memory storage and why localStorage is avoided.
- Refresh token rotation
- Describes single-use refresh tokens, reuse detection and revoking a user's sessions.
- Attack prevention patterns
- Covers algorithm confusion, CSRF, XSS mitigations and DPoP token binding.
- Security review checklist
- Provides a markdown checklist for auditing OAuth, JWT, token and cookie configuration.
Good for
- Add OAuth 2.1 login with PKCE to a web app
- Review JWT verification code for algorithm confusion risks
- Set up refresh token rotation with reuse detection
- Choose where a single page app should store access tokens
- Audit an existing auth implementation against a security checklist
Auth security FAQ
What does Auth security need to run?
Its code samples are TypeScript and use the jose library for JWT signing and verification. The skill itself is instructions and reference material.
Does Auth security change files or run commands?
It provides guidance and code patterns for the agent to follow. The listed files are reference notes, a checklist and a TypeScript auth service template.
Which token lifetimes does Auth security recommend?
It recommends access tokens that expire in 5 to 15 minutes and refresh tokens that are single-use and rotated on each use.
How do I install Auth security in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/auth-security to use it in all your projects, or to .claude/skills/auth-security in one project.
Does Auth security run scripts?
Yes. It runs TypeScript scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Auth security?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Auth security?
The closest alternatives to Auth security are Sh kb auth, API security auth pattern, JWT, Authentication and Auth and rbac.
Where this comes from
- Description: from the skill's own SKILL.md.
More from majiayu000/spellbook

Gives your agent cross-domain analogies and yes-and extensions to spark new ideas
- Open source
- 303 GitHub stars
- Productivity

Stress-tests an idea by hunting hidden assumptions, counterexamples and failure points
- Open source
- 303 GitHub stars
- Productivity

Gathers sourced facts, competitors and 2026 data on an idea without judging it
- Open source
- 303 GitHub stars
- Research workflow

Runs a three-role AI group chat that surfaces blind spots in a one-line idea
- Open source
- 303 GitHub stars
- Productivity

Coaches you from a one-line idea to a PRD and clickable HTML prototype
- Open source
- 303 GitHub stars
- Productivity

Guides an agent through mobile app UI design for iOS and Android
- Open source
- 303 GitHub stars
- Design and media







