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.
npx agentmods add skills/fusebase-dev/fusebase-flow/handling-authentication-errorsnpx skills add fusebase-dev/fusebase-flow --skill handling-authentication-errorsgit clone --depth 1 https://github.com/fusebase-dev/fusebase-flowWhat 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 | $0.00068 | $0.03093 |
| Opus 5 | $0.00034 | $0.01546 |
| Sonnet 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 2d 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.
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.
- 2d 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 7d ago), licensed MIT. It adds 68 tokens to every session and 3,093 once invoked, about $0.0003 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.
Other skills, from other repositories
lov-app-generator
Use when the user asks for "App生成器", "生成 Web App", "生成 Tauri App", "生成原生 macOS App", "Finder Quick Action", "只创建 web", or to standardize an existing app with branding, CI/CD, native integration, and Lovinsp where applicable.
lov-integrate-lovinsp
幂等集成 lovinsp (click-to-code) 到当前前端项目,并支持从 code-inspector 自动迁移。 Use when the user asks to "装 lovinsp"、"集成 lovinsp"、"接入点击跳转源码"、"click to code"、 "从 code-inspector 迁移",or when scaffolding/upgrading a browser-rendered app that needs click-to-source support. Also trigger when another skill (例如 lov-app-generator) requires…
chrome-devtools
Use Chrome DevTools MCP to control and inspect a live Chrome instance for network, console, performance, rendering, and Deep debugging. Pairs with playwright-cli (deterministic interaction/E2E) — complements, not duplicates.
upload-report
Run automation and upload or verify Katalon Platform reports for Katalon Studio/KRE, JUnit XML, and Playwright reports. Use when you need to combine Katalon MCP project/result discovery with Katalon CLI execution, Katalon Report Uploader, or @katalon/playwright-reporter; configure report folders, report types…
playwright-execute
Run Playwright tests or suites and upload the resulting report to Katalon True Platform. Use when you need to execute Playwright scripts, package scripts, spec files, projects, or suites, configure or verify @katalon/playwright-reporter, upload Playwright reports with Katalon CLI/reporter commands, and verify uploaded…
test-case-to-playwright
Convert Katalon True Platform/TestOps manual test cases, test suites, or requirement-linked cases into Playwright TypeScript automation. Use when you need to fetch/read Katalon Platform test cases and implement Playwright scripts, create or adapt a Playwright framework, apply Page Object Model and fixtures, or…