amey-thakur/ai-skills/authn-design

Claude Code and agent skill by amey-thakur/ai-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Design sign-in so credentials are hashed with a slow algorithm, guessing is rate limited, and sessions rotate on login to defeat fixation. Use when building or reviewing registration, login, or password-reset flows.

Install

npx vskill@latest install amey-thakur/ai-skills/authn-design

SKILL.md

The same SKILL.md was published earlier as amey-thakur/ai-skills/authn-design.

Authentication design

Authentication is where an attacker meets your front door, so the failures are expensive: a leaked password database, a brute-forced account, a hijacked session. The safe path is well-known and boring, and the danger is in the shortcuts: home-rolled hashing, no throttling, a session ID that survives login.

Method

  1. Hash passwords with a slow, salted algorithm. Use bcrypt, scrypt, or

Argon2id with a per-user salt (the library adds it) and a work factor tuned to roughly 250 ms per hash. Never use MD5, SHA-1, or a bare SHA-256: they are built for speed, which is exactly what an offline cracker wants.

  1. Rate limit and lock out credential guessing. Cap login attempts per

account and per IP: exponential backoff after 5 failures, a temporary lock after 10. Apply the same throttle to password-reset and MFA endpoints. Without it, weak passwords fall to a script overnight.

  1. Rotate the session ID on login. Issue a fresh session identifier the

moment authentication succeeds and invalidate the pre-login one. Reusing the anonymous session's ID lets an attacker who planted that ID ride into the authenticated session (session fixation).

  1. Return identical responses for unknown user and wrong password. "No

such user" versus "wrong password" hands an attacker a roster of valid accounts. Use one generic message and a constant-time comparison so timing does not leak the difference either.

  1. Enforce strength by length and a breach check. Require 12+

characters, allow long passphrases and pasting, and screen new passwords against a known-breach list (the Have I Been Pwned k-anonymity API). Drop forced rotation and composition rules that only push users toward Password1!.

  1. Treat reset tokens like credentials. Make password-reset tokens long,

random, single-use, and short-lived (under an hour), and store only their hash. A reset link that never expires is a permanent backdoor sitting in an old inbox.

Litmus tests

  • If the database leaked today, how long would offline cracking take against

your hashes?

  • Does login rotate the session ID, confirmed by watching the cookie change

before and after?

  • Do wrong-password and unknown-user attempts return the same message and

similar timing?

Boundaries

This skill covers password-based sign-in. Multi-factor authentication, OAuth/OIDC federation, and passkeys are adjacent designs with their own trade-offs; add them, but get the password path right first. Authorization (what an authenticated user may do) is handled in authz-design, and ongoing session handling lives in session-management.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
10
Repository forks
2
7-day trend score
17

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/amey-thakur/ai-skills/authn-design/badge)](https://verified-skill.com/skills/amey-thakur/ai-skills/authn-design)

Something wrong with this skill or its page? Tell us.