auth
Skill0 starsChanged 5 months agoMITView on GitHub
Diagnose and fix authentication problems (login fails, AccessDenied, token/session issues, user-sync bugs, role mapping, logout, silent re-login/logout). Works diagnose-first (logs before code), follows a fixed 5-step procedure and a 5-layer checklist. Only relevant for projects with auth. Fix only after user approval; bug-loop-conform.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- crbnos/carbontheir own version, first seen Oct 4, 2026
- vercel-labs/hatcherytheir own version, first seen Sep 25, 2026
- microsoft/apmtheir own version, first seen Sep 16, 2026
- blyatiful1/ultrawebtheir own version, first seen Sep 2, 2026
- zyphr-labs/bounty-harnesstheir own version, first seen Aug 26, 2026
- SpiderIQ/skillstheir own version, first seen Aug 20, 2026
Used with
Projects with it also use test.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Microsoft AzureSkilltest
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- openai/plugins★ 7.3ksame name
- microsoft/apm★ 3.9ksame name
- crbnos/carbon★ 2.7ksame name
- vercel/vercel-plugin★ 297same name
- maxwell2732/claudecode-research-harness-workflow★ 40same name
- lightpointventures/claude-code-starter★ 36same name
- YepAPI/skills★ 8same name
- vercel-labs/hatchery★ 7same name
- MartinOlivero/saas-builder★ 4same name
- silvioventre/lovable-skills★ 4same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- architectureSkill
- backendSkill
- bugSkill
- check-updatesSkill
- deploySkill
- frontendSkill
- helpSkill
- initSkill
- qaSkill
- requirementsSkill
- reviewSkill
- securitySkill
- uxSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Read .claude/rules/stack.md → auth (e.g.
- Distinctive: line 28
App logs: Read the application's auth/server logs around the failed attempt.
- Distinctive: line 31
Identity-provider logs / state: Check the IdP side (provider logs / admin console) for the same attempt — was the request received, the …
- Distinctive: line 37
App-side state: If the app keeps a local user shadow / role table, check it matches the IdP (user exists, not disabled/tombstoned, role …
- Very specific: line 63
If invoked as /auth BUG-NNNN: read the bug file first, fix only what it describes (no scope-creep).
- Very specific: line 64
If invoked on a fresh symptom and the user confirms it's a bug: file it with /bug (source per the discovery position — usually production …
- Very specific: line 66
Commit per .claude/rules/general.md bug-fix format.
- Distinctive: line 71
Logs before code: Don't theorize about the auth config before reading the actual error + logs.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Auth Doctor
Role
You diagnose and fix authentication/identity problems. You work diagnose-first: gather evidence
(logs → tokens → state) before forming a hypothesis, and fix only after the user approves. This is
the alternative to ping-ponging /backend and /frontend on an auth bug.
Read the setup first
Read .claude/rules/stack.md → auth (e.g. oidc-keycloak, oidc-other, custom-jwt, session)
and deploy (is there a reverse proxy in front?). The provider determines which knobs exist, but the
procedure and the 5 layers below are provider-agnostic — map them onto the concrete provider.
When to use
Login fails / AccessDenied / "unauthorized_client" / invalid credentials; user immediately logged out again or silently re-logged-in; token/claim/role-mapping problems; user-sync drift between the identity provider and the app's user store; logout flow broken; callback/redirect errors.
The 5-step diagnosis procedure (in order — don't skip ahead to code)
- Reproduce + read the exact error. The user-visible page/text and the URL (e.g. an
?error=...query param) often name the failure class. Note it verbatim. - App logs. Read the application's auth/server logs around the failed attempt. Look for the provider error string, redirect mismatch, signature/issuer errors, or a downstream failure (a DB outage can masquerade as an auth error).
- Identity-provider logs / state. Check the IdP side (provider logs / admin console) for the same attempt — was the request received, the client recognized, the user found, the redirect URI allowed?
- Token / claim inspection. Decode the issued token (or session payload). Are the expected claims present (subject, email, roles/groups)? Does the app read the claim it expects, under the name the provider actually emits?
- App-side state. If the app keeps a local user shadow / role table, check it matches the IdP (user exists, not disabled/tombstoned, role mapped). Reconcile drift.
Form a single hypothesis from the evidence, state it to the user, propose the fix, and wait for approval.
The 5-layer checklist (where auth bugs live)
- Provider / realm config — issuer URL, signing keys, token lifetimes, required scopes, default roles, account status (enabled / disabled / deleted).
- Client / app registration — client id + secret in sync between the app config and the provider; allowed redirect URIs match the app's callback exactly (scheme/host/port/path); grant type + PKCE settings.
- App auth mapping — secret set + long enough; trust/proxy flag set when behind a reverse proxy; session strategy + lifetime; the callback maps provider claims → app session correctly; sign-in / error pages on relative paths.
- Cookies / session — cookie name/flags (
Secure,HttpOnly,SameSite), domain/path scoping, clock skew, session expiry vs. token expiry mismatch (a cause of silent logouts/re-logins). - Reverse proxy / network — the proxy forwards the right host/proto headers; TLS terminates correctly; the callback URL the proxy presents matches the registered redirect URI.
Common secret-sync drift (very frequent root cause)
Several auth secrets exist in two stores at once — the app's env file and a backend (provider client secret, admin client secret, signing secret, a reconcile/cron token). Drift in either store → silent auth failure. When a symptom points at "wrong credentials / unauthorized client", verify the secret matches on both sides before changing code.
Fix + close (bug-loop-conform)
- If invoked as
/auth BUG-NNNN: read the bug file first, fix only what it describes (no scope-creep). - If invoked on a fresh symptom and the user confirms it's a bug: file it with
/bug(source per the discovery position — usuallyproductionormanual), then fix. - Commit per
.claude/rules/general.mdbug-fix format. Don't change bug status —/bug closedoes that after a green/qare-test. - Handoff: "Fix for
BUG-NNNNcommitted. Next:/qare-tests the login flow, then/bug close BUG-NNNN."
Important
- Logs before code. Don't theorize about the auth config before reading the actual error + logs.
- A generic config/login error is often a downstream failure (DB down, migration missing) — rule that out early (step 2) before touching auth settings.
- Fix only after the user approves the hypothesis.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

