error-observability
Implement structured error handling, logging, metrics, and observability.
Skill by roborracle
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/roborracle-error-observability
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/error-observability
What's inside
- Skill name
error-observability- Description
- Implement structured error handling, logging, metrics, and observability. Covers error hierarchies, correlation IDs, log levels, alerting thresholds, and health check endpoints.
- License
- MIT
- Instructions
- 109 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Error Handling & Observability
## Error Hierarchy Design
### Base Error Structure
```typescript
class AppError extends Error {
constructor(
message: string,
public readonly code: string, // Machine-readable: "AUTH_TOKEN_EXPIRED"
public readonly statusCode: number, // HTTP status: 401
public readonly isOperational: boolean, // true = expected, false = programmer error
public readonly context?: Record<string, unknown>
) {
super(message);
this.name = this.constructor.name;
}
}
```
### Error Categories
| Category | Retry? | Alert? | Log Level | Example |
|----------|--------|--------|-----------|---------|
| Validation | No | No | warn | Invalid email format |
| Authentication | No | On spike | warn | Expired token |
| Authorization | No | On spike | warn | Insufficient permissions |
| Not Found | No | No | info | Resource doesn't exist |
| Conflict | No | No | warn | Duplicate entry |
| Rate Limit | Yes (backoff) | On threshold | warn | Too many requests |
| Upstream Failure | Yes (circuit breaker) | Yes | error | Third-party API down |
| Internal | No | Yes | error | Null pointer, type error |
| Infrastructure | Yes (limited) | Yes (page) | fatal | Database unreachable |
### Decision Tree: Retry vs. Fail
```
Is the error transient?
├── Yes → Has retry budget remaining?
│ ├── Yes → Retry with exponential backoff (base * 2^attempt + jitter)
│ └── No → Fail with "service temporarily unavailable"
└── No → Is it a client error (4xx)?
├── Yes → Return error to client with helpful message
└── No → Log, alert, return generic 500
```
## Structured Logging
### Log Format (JSON)
```json
{
"timestamp": "ISO-8601 timestamp",
"level": "error",
"message": "Payment processing failed",
"correlationId": "req-abc123",
"service": "payment-service",
"traceId": "trace-xyz789",
"error": { "code": "PAYMENT_DECLINED", "message": "Card declined by issuer" }
}
```
### Log Level Guidelines
| Level | When | Example |
|-------|------|---------|
| **debug** | Development-only detail | Variable values, query parameters |
| **info** | Normal operations worth recording | Request completed, user logged in, job finished |
| **warn** | Unexpected but handled | Retry succeeded, deprecated API used, rate limit approaching |
| **error** | Failure requiring investigation | Upstream timeout, unhandled rejection, data inconsistency |
| **fatal** | System cannot continue | Database connection lost, out of memory, config missing |
### What to NEVER Log
- Passwords, tokens, API keys, session IDs
- Full credit card numbers, SSNs, or PII
- Request/response bodies containing user data (log a hash or ID instead)
- Conversation or message content
### Correlation IDs
- Generate a unique ID at the entry point (API gateway, message consumer)
- Pass it through every function call, database query, and outgoing HTTP request
- Include it in every log line and error response
- Return it to the client for support reference
## Health Check Endpoints
### Liveness (`/health/live`)
Returns 200 if the process is running. No dependency checks.
### Readiness (`/health/ready`)
Returns 200 only if all critical dependencies are reachable:
```json
{
"status": "healthy",
"checks": {
"database": { "status": "up", "latency_ms": 12 },
"cache": { "status": "up", "latency_ms": 3 },
"upstream_api": { "status": "up", "latency_ms": 89 }
}
}
```
## Alerting Thresholds
| Metric | Warning | Critical | Action |
|--------|---------|----------|--------|
| Error rate (5xx) | > 1% of requests | > 5% of requests | Page on-call |
| Latency (p95) | > 500ms | > 2000ms | Investigate |
| Queue depth | > 1000 | > 10000 | Scale consumers |
| Disk usage | > 80% | > 95% | Expand storage |
| Memory usage | > 85% | > 95% | Investigate leaks |From roborracle/agent-workflow-kit, MIT.
More from roborracle/agent-workflow-kit
- 0.524score
devops-automator
roborracle
Set up CI/CD pipelines, configure cloud infrastructure, implement monitoring systems, and automate deployment processes.
SkillBFreshness: BClaude Code +9 - 0.524score
ai-engineer
roborracle
Build AI-powered applications with LLMs, embeddings, RAG systems, and AI agents.
SkillBFreshness: BClaude Code +9 - 0.524score
git-commit-helper
roborracle
Create properly formatted, detailed commit messages following Conventional Commits specification.
SkillBFreshness: BClaude Code +9 - 0.524score
github-issues-manager
roborracle
Automatically create GitHub issues for every quantifiable task during planning and development.
SkillBFreshness: BClaude Code +9 - 0.524score
handoff
roborracle
Use when ending, pausing, or wrapping up a working session, or when asked to write or update hand-off, continuity, or session-state docs (session end, hand…
SkillBFreshness: BClaude Code +9 - 0.524score
code-cleanup-guardian
roborracle
Safely refactor and clean up code without breaking existing functionality.
SkillBFreshness: BClaude Code +9 - 0.521score
api-client
roborracle
Integrate with third-party APIs and webhooks.
SkillBFreshness: BClaude Code +9 - 0.521score
code-reviewer
roborracle
Comprehensive code review from senior engineering perspective following OWASP standards and industry best practices.
SkillBFreshness: BClaude Code +9 - 0.521score
contract-test
roborracle
Detect breaking API changes before merge.
SkillBFreshness: BClaude Code +9 - 0.521score
db-migrate
roborracle
Design and execute safe database migrations.
SkillBFreshness: BClaude Code +9 - 0.521score
env-config
roborracle
Design and manage application configuration across environments.
SkillBFreshness: BClaude Code +9 - 0.521score
incident-response
roborracle
Handle production incidents with structured triage, communication, and blameless postmortems.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 11, 2026 (2 months ago)
- Last release
- Aug 11, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/roborracle/agent-workflow-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from roborracle
- 0.524score
git-commit-helper
roborracle
Create properly formatted, detailed commit messages following Conventional Commits specification.
SkillBFreshness: BClaude Code +9 - 0.524score
github-issues-manager
roborracle
Automatically create GitHub issues for every quantifiable task during planning and development.
SkillBFreshness: BClaude Code +9 - 0.524score
ai-engineer
roborracle
Build AI-powered applications with LLMs, embeddings, RAG systems, and AI agents.
SkillBFreshness: BClaude Code +9 - 0.524score
devops-automator
roborracle
Set up CI/CD pipelines, configure cloud infrastructure, implement monitoring systems, and automate deployment processes.
SkillBFreshness: BClaude Code +9 - 0.524score
code-cleanup-guardian
roborracle
Safely refactor and clean up code without breaking existing functionality.
SkillBFreshness: BClaude Code +9 - 0.524score
handoff
roborracle
Use when ending, pausing, or wrapping up a working session, or when asked to write or update hand-off, continuity, or session-state docs (session end, hand…
SkillBFreshness: BClaude Code +9
Cite this page
error-observability skill. Agent Mart. https://agentmart.dev/skills/roborracle-error-observability (last updated 2026-10-24)