SkillVaultskills Browse all 500 skills

Security · Version 1.6.0 · Reviewed 2026-08-02

Authentication Design Agent

Find and prioritize exploitable risk in token design and session strategy with evidence, explicit trade-offs, and a verification plan.

4 method steps 6 documented failure modes 5 diagnostic checks 7 quality gates

Designs authentication and session strategies including token lifetimes, refresh, and revocation.

₹99 one-time

Get this skill archive

What this skill helps you do

  • Token design
  • Session strategy
  • Revocation

How Authentication Design Agent works

You provide

Flow diagram, token config, and authorization code

It inspects

Claim validation and enforcement point for token design

It decides

A session strategy design that fails closed

You verify

Cross-tenant request with a valid token is rejected

What it checks first

Authentication Design Skill designs authentication and session strategies including token lifetimes, refresh, and revocation. Use it when the work involves Token design, Session strategy, Revocation.

  1. Where the token is validated and whether the signature, issuer, audience, and expiry are all checked.
  2. Token lifetime relative to the revocation requirement, since a long-lived token cannot be revoked without a check.
  3. Whether authorization is evaluated at the data layer or only at the route.
  4. Token storage location, which determines exposure to XSS versus CSRF.
  5. Whether the flow uses PKCE and validates `state`, which decides interception and CSRF resistance.

Failure modes it recognizes

  • Accepting a JWT with `alg: none` or verifying with the wrong key type, allowing forged tokens.
  • Validating signature but not `aud`, allowing a token minted for another service to be replayed.
  • Refresh tokens without rotation or reuse detection, so a stolen token remains valid indefinitely.
  • Session fixation from not regenerating the session identifier after privilege change.
  • Role checks in the UI only, with the API trusting a client-supplied role claim.
  • Redirect URI matched by prefix rather than exact value, enabling token exfiltration.

Answers it will reject

  • Building a custom authentication protocol instead of using a reviewed standard implementation.
  • Storing access tokens in `localStorage` while claiming XSS is out of scope.
  • Using long-lived API keys where short-lived scoped credentials are available.
  • Treating authentication as sufficient for authorization, which is the most common access-control defect.

Decision rules it applies

  • Authorize at the point of data access, because every route eventually gets a second caller.
  • Prefer short-lived access tokens with rotating refresh tokens and reuse detection.
  • Match redirect URIs exactly and require PKCE for every public client.
  • Fail closed: an unparseable or unverifiable token is a rejection, never a fallback to anonymous.

Evidence it asks for

  • Decode a real token and verify each claim check exists in code: signature, issuer, audience, expiry, and not-before.
  • Test horizontal access by requesting another tenant's resource with a valid token.
  • Confirm revocation actually terminates access within the documented window.

The method inside

  1. Turn token design into explicit functional requirements and quality-attribute constraints.
  2. Model the critical path, state, trust, and failure boundaries that govern session strategy.
  3. Compare viable designs for revocation against weighted constraints and operational ownership.
  4. Select a design with consequences, rollout stages, observability, and a reversible adoption path.

Deliverables

  • Token design assessment
  • Session strategy decision and action plan
  • Revocation verification checklist

Evidence requirements

  • Code, configuration, data flows, and trust boundaries
  • Identity, authorization, and deployment context
  • Threat model, controls, and known assumptions

Quality gates

  • Every material claim traces to supplied evidence or is labeled as a hypothesis.
  • The response follows the declared deliverable contract.
  • No execution, access, measurement, or verification is invented.
  • Secrets and personal data are redacted rather than repeated.
  • The user receives a concrete independent verification step.
  • The relevant failure modes in this domain were considered rather than only the reported symptom.
  • No listed anti-pattern was recommended as a solution.

Example task

Input

Should we use JWTs or server sessions for our web app? We need to support forced logout for compromised accounts.

Expected output

That requirement decides it. JWTs cannot be revoked before expiry without shared state, which reintroduces the lookup you wanted to avoid, so a short-lived access token plus a rotating refresh token with reuse detection gives you revocation at the refresh boundary rather than never...

Boundaries and compatibility

Ideal for

  • Token design: produce a decision or artifact grounded in supplied evidence.
  • Session strategy: produce a decision or artifact grounded in supplied evidence.
  • Revocation: produce a decision or artifact grounded in supplied evidence.

Out of scope

  • Authorizing offensive actions against systems without permission
  • Reporting theoretical issues as exploitable without a path

Agent compatibility

  • GitHub Copilot custom agents
  • Claude Agent Skills / SKILL.md
  • Any instruction-following chat model

Tool policy: Advisory by default. No tools are assumed. If the host provides tools, use read-only evidence gathering unless the user explicitly approves a scoped write or execution action.