ai-infrastructure-hugg…
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
Pino logging, Sentry error tracking, Axiom - structured logging with correlation IDs, error boundaries, performance monitoring, alerting
$ npx -y skills add agents-inc/skills --skill api-observability-axiom-pino-sentry --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/api-observability-axiom-pino-sentryContext preview
The summary Claude sees to decide when to auto-load this skill.
Pino logging, Sentry error tracking, Axiom - structured logging with correlation IDs, error boundaries, performance monitoring, alerting
name: api-observability-axiom-pino-sentry description: Pino logging, Sentry error tracking, Axiom - structured logging with correlation IDs, error boundaries, performance monitoring, alerting
> **Quick Guide:** Structured logging with Pino (debug/info/warn/error). Correlation IDs for request tracing. Sentry error boundaries in React. Attach user context after auth. Filter expected errors (404s). Create Axiom monitors for alerts.
---
<critical_requirements>
> **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants)
**(You MUST include correlation ID in ALL log statements for request tracing)**
**(You MUST use structured logging with required fields: level, message, correlationId, timestamp)**
**(You MUST filter expected errors (404, validation) from Sentry to avoid quota waste)**
**(You MUST attach user context to Sentry AFTER authentication completes)**
**(You MUST use child loggers with context instead of repeating fields in every log call)**
</critical_requirements>
---
**Auto-detection:** log, logger, pino, Sentry, error boundary, correlation ID, trace, span, observability, monitoring, alerting
**When to use:**
**When NOT to use:**
**Key patterns covered:**
**Detailed Resources:**
**Extended Examples:**
---
<philosophy>
**Good observability answers three questions:**
1. **What happened?** (Structured logs with context) 2. **Why did it happen?** (Error tracking with stack traces) 3. **How do I find it?** (Correlation IDs linking related events)
Logging should be **intentional, not defensive**. Every log statement should answer a specific question you might ask when debugging. Avoid logging "just in case" - it creates noise that makes real issues harder to find.
</philosophy>
---
<patterns>
Choose the appropriate log level based on the situation.
What are you logging?
├─ Development-only debugging info?
│ └─ debug (filtered in production)
├─ Normal operation events?
│ ├─ Request started/completed → info
│ ├─ User action completed → info
│ └─ Background job finished → info
├─ Something unexpected but recoverable?
│ ├─ Retry attempt → warn
│ ├─ Fallback used → warn
│ └─ Deprecation notice → warn
└─ Something that needs attention?
├─ Unhandled exception → error
├─ External service failure → error
└─ Data integrity issue → error**Level Guidelines:**
| Level | Production | When to Use | | ------- | --------------- | -------------------------------------------------- | | `debug` | Filtered | Development debugging, verbose tracing | | `info` | Visible | Normal operations, request lifecycle, user actions | | `warn` | Visible | Recoverable issues, retries, fallbacks | | `error` | Visible + Alert | Unrecoverable issues, failures, exceptions |
For code examples, see [examples/core.md](examples/core.md#pattern-1-log-levels).
---
Every log statement should include structured context for searchability.
**Required Fields:**
| Field | Type | Purpose | | --------------- | ------- | ----------------------------------------------------- | | `correlationId` | string | Links all logs from same request | | `service` | string | Identifies the service (api, web, worker) | | `operation` | string | What action is being performed | | `userId` | string? | User performing the action (if authenticated) | | `duration` | number? | Time taken in milliseconds (for completed operations) |
For code examples, see [examples/core.md](examples/core.md#pattern-2-structured-logging).
---
Generate and propagate correlation IDs to trace requests across services.
**Key Components:**
1. **Correlation ID Middleware** - Generates/extracts correlation ID from headers 2. **Request Logger Middleware** - Creates request-scoped logger with correlation context 3.
The official skills marketplace for Agents Inc. 150+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?
Repo: agents-inc/skills
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming, embeddings, image generation,…
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production…
Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client patterns
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and…
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation,…