Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
日本語の概要は準備中です。原文の説明を表示しています。
Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Build resilient applications with robust error handling strategies that gracefully handle failures and provide excellent debugging experiences.
After reading the methodology below, read the reference matching your surface's Languages column in the surface stack map (.claude/instructions/tech-stack.md):
| Language | Reference |
|---|---|
| TypeScript / JavaScript | references/typescript.md |
| Python | references/python.md |
| Go | references/go.md |
| Rust | references/rust.md |
Every language takes a different approach to error handling. Know which philosophy your language uses and follow its idioms:
| Philosophy | Description | Languages |
|---|---|---|
| Exceptions | Traditional try-catch, disrupts control flow | Python, TypeScript/JS, Java, C# |
| Result Types | Explicit success/failure, functional approach | Rust, Haskell, modern TypeScript |
| Error Returns | Explicit error as return value, requires discipline | Go |
| Option/Maybe Types | For nullable values without exceptions | Rust, Haskell, Swift |
| Panics/Crashes | Unrecoverable errors, programming bugs | Rust (panic), Go (panic), Python (SystemExit) |
When to Use Each:
Recoverable Errors — the application can handle and continue:
Unrecoverable Errors — the application should crash and restart:
Prevent cascading failures in distributed systems. When a downstream service fails repeatedly, stop calling it temporarily to let it recover.
State machine:
CLOSED → (failures ≥ threshold) → OPEN
OPEN → (timeout elapsed) → HALF_OPEN
HALF_OPEN → (success ≥ threshold) → CLOSED
HALF_OPEN → (any failure) → OPEN
Parameters:
failure_threshold — how many failures before opening the circuit (e.g., 5)timeout — how long to stay open before trying again (e.g., 60s)success_threshold — how many successes in HALF_OPEN before closing (e.g., 2)See language-specific references for implementation examples.
Collect multiple errors instead of failing on first error. Essential for form validation, batch processing, and multi-field input.
The pattern:
See language-specific references for implementation examples.
Provide fallback functionality when errors occur. The system continues operating with reduced capability rather than failing completely.
Strategies:
See language-specific references for implementation examples.
Automatically retry failed operations with increasing delays between attempts.
Parameters:
max_attempts — maximum retry count (e.g., 3)backoff_factor — multiplier for delay between attempts (e.g., 2.0)retryable_exceptions — which errors are worth retrying (network, timeout — NOT validation)Delay formula: delay = backoff_factor ^ attempt (1s, 2s, 4s, 8s, ...)
See language-specific references for implementation examples.
except Exception / catch (e) hides bugsThis interview is mandatory for every project. All 5 decisions below must be confirmed before proceeding to Data Strategy. Do not skip or defer any decision — this is a hard gate.
Every error response from any surface must conform to this canonical 4-field structure:
| Field | Description |
|---|---|
code | Machine-readable error code (e.g., VALIDATION_FAILED, NOT_FOUND). Clients switch on this field. |
message | Human-readable explanation of what went wrong. Safe to display to end users. |
requestId | Unique identifier for the request that caused the error. Used for support and debugging. |
details | object | null. Structured additional context (e.g., field-level validation errors) or null when no extra detail applies. |
Locked JSON example:
{
"code": "VALIDATION_FAILED",
"message": "Email address is not valid.",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"details": { "field": "email", "reason": "must contain @" }
}
All four top-level fields are always present in every error response.
Rule: No other top-level fields (status, error, timestamp) may appear in the error envelope. HTTP status codes are conveyed via the HTTP response status line, not inside the body.
For each layer in the stack (database → service layer → API handler → transport → client), define: what errors are caught, what is logged (and at what level), and what is exposed to the next layer.
Rule: No layer may expose raw upstream errors to the client. Every layer must catch, wrap, and translate errors before passing them upward.
Define the process-level catch mechanism:
process.on('uncaughtException'), global error middleware, panic recovery).Define per-surface behavior when the backend is unreachable or returns an error:
Define per-surface error boundary placement and behavior:
Present these three questions to the user for confirmation:
Write completed decisions to architecture-draft.md under ## Error Architecture with five sub-sections matching the five decisions above:
### Global Error Envelope### Error Propagation Chain### Unhandled Exception Strategy### Client Fallback Contract### Error Boundary Strategyまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".
日本語の概要は準備中です。原文の説明を表示しています。
Structured methodology for adversarial thinking — generating attack scenarios, abuse cases, race conditions, and security edge cases against specs and implementations. Produces spec-level gap items, not code-level fixes.
日本語の概要は準備中です。原文の説明を表示しています。
Orchestrate multiple Antigravity skills through guided workflows for SaaS MVP delivery, security audits, AI agent builds, and browser QA.
日本語の概要は準備中です。原文の説明を表示しています。
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
日本語の概要は準備中です。原文の説明を表示しています。
Manage API versioning and evolution with URL/header/query strategies, deprecation workflows, breaking change classification, sunset headers, and consumer-driven contract testing. Use when designing versioning strategy, deprecating endpoints, or evolving API contracts.
日本語の概要は準備中です。原文の説明を表示しています。
Analyzes codebase structure, data flow, module relationships, and key patterns to generate and maintain a living architecture document (ARCHITECTURE.md).
日本語の概要は準備中です。原文の説明を表示しています。