Borrowing it
Nothing to install: this file belongs to fusebase-dev/fusebase-flow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/fusebase-dev/fusebase-flow/main/.agents/skills/handling-authentication-errors/SKILL.mdgit clone --depth 1 https://github.com/fusebase-dev/fusebase-flowWrote 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.
[](https://agentmods.dev/skills/fusebase-dev/fusebase-flow/handling-authentication-errors)<a href="https://agentmods.dev/skills/fusebase-dev/fusebase-flow/handling-authentication-errors"><img src="https://agentmods.dev/badge/skills/fusebase-dev/fusebase-flow/handling-authentication-errors/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.
<a href="https://agentmods.dev/skills/fusebase-dev/fusebase-flow/handling-authentication-errors"><img src="https://agentmods.dev/badge/skills/fusebase-dev/fusebase-flow/handling-authentication-errors.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00068 | $0.03093 |
| Opus 5.5 | $0.00027 | $0.01237 |
| Sonnet 5.5 | $0.00014 | $0.00619 |
| Haiku 4.5 | $0.00007 | $0.00309 |
Grade A, and why
handling-authentication-errors 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 2mo 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- handling-authentication-errors — 92% identical, 52 lines differ
How it starts
The opening of the file, as written. The whole thing — 294 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Handling Authentication Errors
Apps need two related but distinct patterns:
- Platform app token (
fbsfeaturetoken/x-app-feature-token) —AppTokenValidationErroron Gate/Dashboard proxy calls. - App-owned session (httpOnly cookie, e.g.
app_session) — backend/api/account/me(or equivalent) on load.
Do not treat every failed fetch as “logged out”. That lies to the user when the backend is restarting (deploy), the proxy returns 502, or the network blips.
Session probe invariant (backend SaaS apps)
Any SPA that boots auth from GET /api/account/me (or similar) MUST follow this table:
| Response on session check | Meaning | UI action |
|---|---|---|
401 |
Session rejected by backend | Show login / anon state |
403 with known business code (membership_revoked, tenant_suspended, …) |
Authenticated but blocked | Dedicated blocked screen |
| Everything else (502/503/504, 5xx, network error, timeout, aborted) | No verdict — server may be down | Retry (see below), then “Can't reach server” + Try again. Do not clear session cookie or force login |
A timeout on the first call after idle or deploy is a cold start, not a logout. Retry once with the full deadline, then report "Can't reach server" — never clear the session. Timeout sizing: skill app-backend § Cold Starts (Scale-to-Zero).
Anti-pattern (never ship)
// BAD — treats deploy blip as logout
catch (e) {
if (e.code !== 'tenant_suspended' && e.code !== 'membership_revoked') {
setAuth({ status: 'anon' }) // ← 502 during fusebase deploy looks like logout
}
}
Required pattern
type SessionVerdict = 'authenticated' | 'anon' | 'blocked' | 'unknown'
async function probeSession(): Promise<SessionVerdict> {
const res = await fetch('/api/account/me', { credentials: 'include' })
if (res.status === 401) return 'anon'
if (res.status === 403) {
const body = await res.json().catch(() => ({}))
if (body.code === 'membership_revoked' || body.code === 'tenant_suspended') return 'blocked'
return 'unknown' // do not assume logout
}
if (!res.ok) return 'unknown'
return 'authenticated'
}
async function probeSessionWithDeployTolerance(): Promise<SessionVerdict> {
const delays = [0, 400, 1200] // ms — survives fusebase deploy pod restart window
let last: SessionVerdict = 'unknown'
for (const ms of delays) {
if (ms) await new Promise((r) => setTimeout(r, ms))
try {
const v = await probeSession()
if (v !== 'unknown') return v
last = v
} catch {
last = 'unknown'
}
}
return last
}
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.
- 2mo ago First seen · 294 lines · 68 tokens per session scan A e0c3e8cb3c80
handling-authentication-errors is a skill published in the GitHub repository fusebase-dev/fusebase-flow (9 stars, last pushed 13d ago), licensed MIT. It adds 68 tokens to every session and 3,093 once invoked, about $0.0003 per session on Opus 5.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.
handling-authentication-errors compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| handling-authentication-errorsfusebase-dev/fusebase-flow | Skill | 9 | 13d ago | MIT | A | 68 | Claude Code |
| adobe-express-cors-and-backendSandgrouse/adobe-express-dev-skill | Skill | 9 | 2mo ago | none | A | 92 | Claude Code, Codex |
| adobe-express-oauth-authenticationSandgrouse/adobe-express-dev-skill | Skill | 9 | 2mo ago | none | A | 50 | Claude Code, Codex |
| error-handling-patternswshobson/agents | Skill | 42k | 2d ago | MIT | A | 43 | Claude Code |
| diagnose-backend-bugQoderAI/better-harness | Skill | 2.4k | today | MIT | A | 87 | Claude Code, Codex |
| config-secrets-environmentsmajiayu000/spellbook | Skill | 290 | 3d ago | MIT | A | 73 | Codex |
| lov-clash-tun-doctorlovstudio/skills | Skill | 72 | yesterday | MIT | A | 93 | Claude Code |