auth-doctor

auth-doctor is a skill for Claude Code from ShipWithAI/shipwithai-plugins. It costs 42 tokens per session (3,854 once invoked), scanned A, original, MIT.

A diagnostic tool for existing login and user-authentication setups, including Better Auth and Firebase Auth. It checks the application, security settings, middleware, OAuth, database, and risky code patterns.

In plain words
What is it for?
For auditing an existing authentication setup, producing a scored health report, and suggesting fixes.
Why use it?
It helps find why authentication is misconfigured or broken and highlights issues before deployment or after upgrades.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the shipwithai-auth plugin — 2 skills, 2 commands shipped together

Good fit For auditing an existing authentication setup, producing a scored health report, and suggesting fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shipwithai/shipwithai-plugins/auth-doctor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ShipWithAI/shipwithai-plugins --skill auth-doctor
Clone the repo
git clone --depth 1 https://github.com/ShipWithAI/shipwithai-plugins

Made for: Claude Code.

Or install shipwithai-auth, the plugin that ships this one along with the rest of its 2 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for auth-doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/auth-doctor/github.svg)](https://agentmods.dev/skills/shipwithai/shipwithai-plugins/auth-doctor)
Your own site
<a href="https://agentmods.dev/skills/shipwithai/shipwithai-plugins/auth-doctor"><img src="https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/auth-doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for auth-doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/shipwithai/shipwithai-plugins/auth-doctor"><img src="https://agentmods.dev/badge/skills/shipwithai/shipwithai-plugins/auth-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,854 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.03854
Opus 5 $0.00021 $0.01927
Sonnet 5 $0.00008 $0.00771
Haiku 4.5 $0.00004 $0.00385

Measured 9d ago against content hash 3243aa0dc39b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

auth-doctor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/auth/skills/auth-doctor/SKILL.md · 385 lines

How it starts

The opening of the file, as written. The whole thing — 385 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auth Doctor — Diagnostic Guide

Health check for existing authentication setups. Detects misconfigurations, missing files, security issues, and dangerous code patterns across Better Auth and Firebase Auth projects.

When to Use

  • After running /shipwithai-auth:setup — final validation
  • Auth is broken and you don't know why
  • Before deploying to production — pre-flight check
  • After upgrading auth packages or Next.js version
  • Periodic maintenance check

Step 1: Auto-Discover Project Stack

Run the same discovery logic as skills/auth-setup/SKILL.md → Step 0. This ensures setup and doctor use identical detection.

Scan for:

1a. Framework & Versions (same as setup Step 0a/0b):

  • next.config.* → Next.js (extract version from package.json)
  • App Router vs Pages Router
  • React version, Node.js version

1b. Auth Provider (same as setup Step 0d):

  • better-auth in deps → Better Auth
  • firebase in deps → Firebase
  • @clerk/nextjs, next-auth, @supabase/ssr → respective provider
  • If no auth detected → ❌ STOP: "No auth setup detected. Run /shipwithai-auth:setup first."

1c. ORM & Database (same as setup Step 0c):

  • drizzle.config.ts → Drizzle | prisma/schema.prisma → Prisma
  • Check database type from drizzle config or deps (SQLite, PostgreSQL, MySQL)

1d. Package Manager (same as setup Step 0f):

  • Lockfile detection

1e. UI Library (same as setup Step 0g):

  • components.json → shadcn/ui | Tailwind | MUI/Chakra/Mantine

1e. Existing Auth Pages & Routes (same as setup Step 0e):

  • Check for auth pages: src/app/(auth)/login/, src/app/(auth)/register/, etc.
  • Check for API routes: src/app/api/auth/
  • Check for middleware: src/middleware.ts, middleware.ts

1f. Auth-specific detection:

  • .env.local or .env → configured env vars
  • OAuth providers: check env vars for GOOGLE_CLIENT_ID, GITHUB_CLIENT_ID, APPLE_CLIENT_ID
  • Email: check for resend in deps or RESEND_API_KEY in env

Output the detection summary before proceeding:

🔍 Auth Doctor — Scanning project...

Framework:   Next.js 14.2.18 (App Router)
Provider:    Better Auth ([email protected])
ORM:         Drizzle ([email protected])
Database:    SQLite (better-sqlite3)
Package mgr: npm
UI:          shadcn/ui (new-york)
OAuth:       Google ✓, GitHub ✗
Email:       Resend ✓

Read the full file on GitHub · 385 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 385 lines · 42 tokens per session scan A 3243aa0dc39b

Subscribe to this mod's changes

auth-doctor is a skill published in the GitHub repository ShipWithAI/shipwithai-plugins (10 stars, last pushed 26d ago), licensed MIT. It adds 42 tokens to every session and 3,854 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.