home / skills / tlabs-xyz / tbtc-v2-performance / global--error-handling
/.codex/skills/global--error-handling
This skill enforces global error handling standards across the codebase, ensuring consistent responses and reliable observability.
npx playbooks add skill tlabs-xyz/tbtc-v2-performance --skill global--error-handlingReview the files below or copy the command above to add this skill to your agents.
---
name: global--error-handling
description: Apply the Agent OS standard for global error handling.
tags: [agent-os, standard, global]
---
# Global Error Handling
Use this skill when working on global error handling in this repo.
## Instructions
- Follow the standard in `agent-os/standards/global/error-handling.md`.
## References
- `agent-os/standards/global/error-handling.md`
This skill applies the Agent OS global error handling standard to TypeScript projects. It defines a consistent approach for capturing, classifying, and responding to errors across services and agent components. The goal is predictable behavior, better observability, and safer failure modes.
The skill inspects code paths to ensure global error handlers are present and properly configured. It enforces unified error shapes, centralized logging, and sanitized reports before external exposure. It also verifies integrations with monitoring, retry policies, and graceful shutdown behavior.
What should a normalized error include?
Include an error code, human message, deterministic classification (transient vs permanent), safe context fields, and an internal stack or reference for debugging.
How do I avoid exposing secrets in errors?
Sanitize inputs and context before logging or reporting, remove or redact tokens and PII, and provide only high-level messages to external clients.