/auth:security-best-practicefrom auth
Audits and hardens authentication code against modern security best practices. Covers credential storage, session security, OAuth/OIDC, MFA/passkeys, CSRF, rate limiting, and HTTP security headers.
Ships in auth. 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.
Read when SKILL.md points to them.
You are auditing and hardening authentication code against modern (2024-2026) security best practices.
Individual security rules are in the rules/ directory, organized by impact priority. Read rules/_sections.md for the full taxonomy, and read individual rule files for checklists and fix patterns.
Critical Impact:
rules/credential-storage.md — Password hashing (argon2id first), HIBP breach-check, pepper, secret managementrules/error-handling.md — User enumeration, timing attacks, status/size symmetry, stack trace leaksHigh Impact:
rules/session-security.md — Token generation, __Host-/__Secure-/Partitioned cookies, JWT pitfalls, session fixation, freshness (sudo mode), rotation on state changerules/input-validation.md — SQL/NoSQL injection, XSS, SSRF, open redirect, schema validationrules/oauth-oidc.md — Code + PKCE, state/nonce, redirect-URI allow-list, account-linking pre-takeoverrules/mfa-passkeys.md — TOTP replay prevention, WebAuthn verification, step-up, recovery codesrules/token-lifecycle.md — Password reset, email verification, magic link, OTP, 2FA challenges — hashing & atomic one-time useMedium Impact:
rules/rate-limiting.md — Multi-dim throttling (account + IP), SMS pumping, credential stuffingrules/csrf-protection.md — Origin / Fetch-Metadata, double-submit, SameSite caveats, CORS pitfallsLower Priority:
rules/http-security-headers.md — HSTS, nonce-CSP, COOP/COEP/CORP, Clear-Site-Data, Trusted TypesBefore starting, scan the whole repository to understand their stack — even when the user names one directory or one flow. That narrows what you report on, not what you read: the schema, migrations, middleware and config that decide whether a finding is real usually live elsewhere (prisma/, migrations/, db/, the app entry point).
next.config.*, package.json, go.mod, Cargo.toml, pyproject.toml, build.gradle*, pom.xml)If the user already said which areas (or "everything" / "don't ask"), use that and skip the question. Otherwise use the AskUserQuestion tool to ask the user what they want to harden. Use multiSelect: true so they can pick multiple areas at once.
Ask "Which security areas do you want to audit and harden?" with header "Security audit scope".
Read the rule file for every selected area before writing any finding (all of them for a full audit). The checklists hold the non-obvious, auth-specific checks — account linking on an IdP email that was never verified, refresh-token reuse that should revoke the whole family, a sensitive action that needs a fresh sign-in — that a general code review does not think to look for. Then review the user's code against each checklist row. Report findings as:
Many rows only bite under a condition — "if the account can hold a passkey", "if another flow writes this table", "if the proxy trusts X-Forwarded-For". Before you rate a finding, check its condition against the repository:
After the audit, apply fixes directly to the code — unless the user asked for a review only, in which case list the fixes and change nothing. For each fix, explain what was wrong and why the fix is necessary. Link to the relevant rule file for reference.
After applying fixes, produce a summary table:
| Area | Status | Issues Found | Fixed |
|---|---|---|---|
| Credential storage | PASS/FAIL | description | Yes/No |
| Session security | PASS/FAIL | description | Yes/No |
| OAuth / OIDC | PASS/FAIL | description | Yes/No |
| MFA & passkeys | PASS/FAIL | description | Yes/No |
| Token lifecycle | PASS/FAIL | description | Yes/No |
| ... | ... | ... | ... |
For any issues that cannot be auto-fixed (e.g., require infrastructure changes like adding Redis for rate limiting, configuring HSTS preload at the edge, registering OAuth redirect URIs with the IdP), list them as manual action items with clear instructions.
After applying fixes:
SameSite=Strict and the __Host- prefix, do not loosen them.argon2, helmet, @simplewebauthn/server, hibp), ask the user before adding it.helmet middleware in Express, SecurityFilterChain in Spring Boot, middleware in Go/Chi).Content-Security-Policy can break the application. Start in report-only mode, collect violations for 1–2 weeks, then enforce.rules/_sections.md (opens in a new tab)rules/_template.md (opens in a new tab)rules/credential-storage.md (opens in a new tab)rules/csrf-protection.md (opens in a new tab)rules/error-handling.md (opens in a new tab)rules/http-security-headers.md (opens in a new tab)rules/input-validation.md (opens in a new tab)rules/mfa-passkeys.md (opens in a new tab)rules/oauth-oidc.md (opens in a new tab)rules/rate-limiting.md (opens in a new tab)rules/session-security.md (opens in a new tab)rules/token-lifecycle.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (himself65/auth-spec) — no native marketplace selected
npx claudepluginhub p/himself65-auth2 skills in this plugin
Other plugins' skills for the same job