qauth: Skill for Claude Code

.claude/skills/errors/SKILL.md

errors is a skill for Claude Code from qauth-labs/qauth. It costs 59 tokens per session (1,056 once invoked), scanned A, original, Apache-2.0.

A guide to handling errors in the QAuth authentication server. It defines shared error types, a consistent JSON response format, and rules for keeping passwords, tokens, secrets, and internal paths out of responses.

In plain words
What is it for?
Use it when throwing or handling errors, writing the global error handler, or reviewing authentication-server error responses.
Why use it?
It prevents each route from inventing its own error behavior and reduces the risk of revealing sensitive information.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is qauth-labs/qauth's own configuration. It tells Claude Code how to work on qauth itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything qauth configures →

Reuse

Borrowing it

Nothing to install: this file belongs to qauth-labs/qauth. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/qauth-labs/qauth/main/.claude/skills/errors/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/qauth-labs/qauth

Made for: Claude Code.

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 errors

README.md
[![agentmods](https://agentmods.dev/badge/skills/qauth-labs/qauth/errors/github.svg)](https://agentmods.dev/skills/qauth-labs/qauth/errors)
Your own site
<a href="https://agentmods.dev/skills/qauth-labs/qauth/errors"><img src="https://agentmods.dev/badge/skills/qauth-labs/qauth/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.

agentmods 80×15 button for errors

Your own site · 80×15
<a href="https://agentmods.dev/skills/qauth-labs/qauth/errors"><img src="https://agentmods.dev/badge/skills/qauth-labs/qauth/errors.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,056 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00059 $0.01056
Opus 5.5 $0.00024 $0.00422
Sonnet 5.5 $0.00012 $0.00211
Haiku 4.5 $0.00006 $0.00106

Measured today against content hash a26d3ec55ac6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 today.

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.

.claude/skills/errors/SKILL.md · 113 lines

How it starts

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

Error Handling (QAuth)

Standards-aligned error handling for the QAuth auth-server. Throw domain errors, return a consistent JSON shape, and never leak sensitive data. Use this skill when raising/handling errors or reviewing error-handling code.

Use Domain Errors

Throw domain-specific errors from @qauth-labs/shared-errors:

// ✅ GOOD: Domain error with statusCode
import { NotFoundError, InvalidCredentialsError } from '@qauth-labs/shared-errors';

if (!user) {
  throw new NotFoundError('User', userId);
}

if (!passwordValid) {
  throw new InvalidCredentialsError(); // Generic message prevents enumeration
}

// ❌ BAD: Generic Error or ad-hoc status codes
throw new Error('User not found');
reply.code(404).send({ error: 'Not found' });

Error Response Shape

The global error handler (apps/auth-server/src/app/plugins/error-handler.ts) answers in one of two formats, chosen by the route's config.errorFormat (ADR-019 Decision 7, #513):

  • problem (the default): an RFC 9457 document, application/problem+json, with type, title, status, detail, instance, a stable lower-case code and trace_id (the request id); errors[] (pointer, message) for a validation failure and for weak-password feedback under /password.
  • oauth, set on the OAuth protocol endpoints only (token, authorize, introspect, revoke, register, userinfo, the wallet-facing OID4VP endpoints): { error, error_description? } and nothing else.

Which code and which OAuth error a domain error class answers is set once, in apps/auth-server/src/app/api-conventions/error-classes.ts; a new class in @qauth-labs/shared-errors needs an entry there (a test fails without one). A class a route or a server library defines with a statusCode (the SSF transmitter's, SignInRequiredError) goes in APP_ERROR_CLASSES there, with a published code for its status; a test fails without one. A route never sends an error body of its own: it throws, and the handler answers. An OAuth error class carries its token as its message and its prose in errorDescription. A refusal that several routes raise comes from one helper in the module that owns it (e.g. helpers/token-subject.ts), so it reads one way. Tests assert code (problem) or error (OAuth) and the status, never the wording.

Read the full file on GitHub · 113 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. today Changed · +19 lines a26d3ec55ac6
  2. 1mo ago First seen · 94 lines · 59 tokens per session scan A 449d8cd58c28

Subscribe to this mod's changes

errors is a skill published in the GitHub repository qauth-labs/qauth (26 stars, last pushed today), licensed Apache-2.0. It adds 59 tokens to every session and 1,056 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

theauth

Install and use theAuth (@glinr/theauth), the TypeScript auth SDK for AI agents and humans. Use when adding agent identity, scoped permissions, delegation, audit logs, human sign-in plugins, or an MCP OAuth 2.1 authorization server to a Node, Bun, Deno or edge project.

glincker/theauth · 67 tokens

crudauth

Use when building or modifying authentication in a FastAPI app with crudauth (the crudauth PyPI package) — covers CRUDAuth, the AuthUserMixin / makeauthidentity user model, IdentityConfig, currentuser(...) gates, session + bearer transports, OAuth (Google/GitHub), email verification / password reset / change, custom…

benavlabs/crudauth · 199 tokens

nextjs-authentication

Secure token storage (HttpOnly Cookies) and Middleware patterns. Use when implementing authentication, secure session storage, or auth middleware in Next.js.

FilippoDeSilva/skills · 33 tokens

api-integration-architect

Design, implement, debug, and optimize API integrations with expert-level patterns for REST, GraphQL, webhooks, and authentication flows.

sickn33/agentic-awesome-skills · 33 tokens

coding-directives

Implement or review caddy-security Go code, Caddy modules, parsers, lifecycle, and HTTP delegation. Use for app/plugin boundaries, authcrunch integration, errors, logging, and code conventions.

greenpau/caddy-security · 45 tokens

configuration-authentication-cookies

Configure portal cookie names, prefixes, domains, paths, attributes, and refresh overrides. Use for cookie precedence and coordination with authorization token discovery.

greenpau/caddy-security · 34 tokens