/agent-skills:auth-designfrom agent-skills
Guides authentication and authorization design: login, sessions vs JWTs, roles, permissions, OAuth/SSO, and endpoint protection. Use when building auth from scratch or choosing an approach.
Ships in agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Two separate problems, constantly conflated, with different failure modes:
Teams spend most of their effort on the first because it is visible, and most of their vulnerabilities live in the second. Object-level authorization is the one to get right.
Password handling, session fixation, timing attacks, reset flows, and MFA are all solved and all easy to get subtly wrong.
Use the platform's framework, or an identity provider. If you are storing passwords yourself, use argon2id or bcrypt with the current cost parameters, never a general-purpose hash, never with a hand-rolled salt.
The flows people forget to secure, which are attacked precisely because they are afterthoughts: password reset, email change, account recovery, and MFA enrolment. A reset flow is a login bypass if the token is guessable, does not expire, or is reusable.
Done when: every path that can establish a session has been enumerated and secured.
| Server sessions | JWTs | |
|---|---|---|
| Revocation | Immediate | Not possible before expiry |
| State | Server-side store | Stateless |
| Best for | Browser apps, anything needing instant logout | Short-lived service-to-service |
The revocation problem is the deciding factor and it is usually underweighted. A JWT valid for 24 hours is valid for 24 hours after you fire someone, after you detect a compromise, after the user clicks "log out everywhere". The usual workaround — a revocation list checked on every request — reintroduces the state JWTs were chosen to avoid.
Default to server sessions for browser applications. Use short-lived tokens with refresh where statelessness genuinely matters, and keep access token lifetime in minutes.
Done when: you can answer "how fast can we revoke this?" with a number you are happy with.
HttpOnly: JavaScript must not read the session cookieSecure: HTTPS onlySameSite=Lax or stricter — this is the primary CSRF defence nowNever store a token in localStorage if you can avoid it — any XSS reads it. A cookie the script
cannot read is meaningfully safer.
Done when: the session cannot be read by script or sent cross-site.
Roles answer "is this person an editor?" Almost every real breach turns on "may this person edit this object?"
Order.where(id: params[:id], user: session.user). This makes the whole class of bug
structurally impossible rather than dependent on remembering a checkChoose the model deliberately: RBAC (roles) is simple and fits most systems; ABAC (attributes) fits when access depends on context; ReBAC (relationships) fits sharing and hierarchies. Starting with RBAC and bolting on exceptions is how permission logic becomes unmaintainable.
Done when: no endpoint trusts a client-supplied identifier for an authorization decision.
Authorization scattered across controllers will have gaps — a new endpoint added without the check is the standard way this fails.
Centralise it: middleware, a policy layer, or a query scope applied by default. Make the secure path the default and require an explicit opt-out, so a forgotten check fails closed rather than open.
Deny by default. A new route with no rule must reject, not allow.
Done when: adding an endpoint without an authorization rule causes a failure, not a hole.
Done when: a user could detect and end an unauthorised session themselves.
State the authentication method, session or token choice with its revocation time, the authorization model, where enforcement lives, and what a compromised session would grant. Then list the endpoints exempt from authorization — that list should be short, deliberate, and reviewed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
auth-design, authentication, authorization, session-management, jwt, oauth
60 skills in this plugin
/accessibility-reviewReviews an interface for barriers that stop people using it — keyboard operation, screen reader support, contrast, focus management, and form semantics. Use this whenever the user is building or reviewing UI, mentions accessibility, a11y, WCAG, screen readers, or keyboard navigation, and proactively when a change adds a modal, a custom control, a form, or anything interactive. For general code correctness, use code-review./agent-deploymentShips an agent to production — packaging, config and secrets, staged rollout, and the rollback plan — for a system whose failures are usually silent rather than loud. Use this whenever the user is deploying an agent or LLM feature, planning a rollout or canary, moving an agent from prototype to production, or asking how to release a prompt or model change safely. For monitoring it once live, use agent-observability./agent-designDesigns an agent's architecture — the tool surface, context strategy, control flow, and model choice — from a scoped set of jobs. Use this whenever the user is deciding how an agent should be built rather than what it should do — choosing tools, wiring up an agent loop, deciding single-agent vs multi-agent, picking a model, or planning what goes in the context window. Also use when an existing agent is unreliable and the cause looks structural rather than a prompt problem. For deciding what the agent is for, use agent-scoping first./agent-evaluationBuilds an eval set for an agent or LLM feature, writes graders, establishes a baseline, and reads the results honestly. Use this whenever the user wants to measure whether an agent works, asks if a prompt or model change was an improvement, mentions evals, LLM-as-judge, regression testing for AI, or is about to ship an agent on the strength of a few manual tries. Also use before any prompt or model change, since without a baseline no change can be judged./agent-hardeningMakes an agent safe to run with real permissions on real data — scoping what it can do, handling prompt injection, adding confirmation and dry-run for irreversible actions, and bounding cost. Use this whenever an agent is about to touch production, act autonomously, handle untrusted input, or use credentials, and whenever the user asks about agent safety, guardrails, permissions, or prompt injection. Also use when an agent has broad API access that nothing in code restricts./agent-implementationBuilds an agent from a design — the loop, the tools, the prompts, the schema validation, and the traces you will need later. Use this whenever the user is writing agent code — implementing tool calling, wiring an agent loop, building an MCP server or tool layer, writing system prompts for an agent, or turning a prototype agent into something maintainable. For deciding the architecture first, use agent-design; for measuring whether it works, use agent-evaluation.npx claudepluginhub arjunprabhulal/agent-skills --plugin agent-skillsOther plugins' skills for the same job