Backend Structured Logging

Use when the user asks about structured logging, JSON logs, Pino, Winston, Serilog, structlog, correlation IDs, log levels, log sampling or PII redaction in logs. Produces a logging setup with a field schema. Not for tracing pipelines (use observability) or audit trails (use backend-audit-logging).

45 stars 6 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add j4flmao/agent-skills --skill backend-structured-logging
Manual install
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/agent-skills/skills/backend/universal/structured-logging ~/.claude/skills/backend-structured-logging

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Backend Structured Logging

## Purpose
Design structured JSON logging with consistent schema, context propagation, and sampling.

## Agent Protocol

### Trigger
Exact user phrases: "structured logging", "JSON logging", "log format", "logging best practice", "log levels", "distributed tracing", "log correlation", "structured log", "logging library", "log aggregation", "log output", "log schema", "correlation ID".

### Input Context
Before activating, verify:
- Logging framework (Winston/Pino/Serilog/Log4j/logrus/zerolog)
- Log aggregation system (Elasticsearch/Loki/CloudWatch/Datadog)
- Compliance requirements (audit log retention, PII handling, access logs)

### Output Artifact
Logging schema and configuration as formatted text.

### Response Format
```yaml
# Log schema (JSON fields)
# Log levels and sampling rules
```
```typescript
// Logger configuration
// Context propagation middleware
// PII redaction config
```

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

### Completion Criteria
- [ ] Log schema defined with all required fields (timestamp, level, message, context)
- [ ] Log levels configured with production rules (ERROR/WARN/INFO, sampled DEBUG)
- [ ] Log output configured as JSON lines to stdout
- [ ] Context propagation implemented (correlation ID through all async boundaries)
- [ ] Sensitive data redaction with pattern-based masking
- [ ] Sampling strategy defined per log level
Read the full skill on GitHub

Details

Skill name
backend-structured-logging
Path
skills/backend/universal/structured-logging/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Backend Structured Logging skill do?

Use when the user asks about structured logging, JSON logs, Pino, Winston, Serilog, structlog, correlation IDs, log levels, log sampling or PII redaction in logs. Produces a logging setup with a field schema. Not for tracing pipelines (use observability) or audit trails (use backend-audit-logging).

How do I install the Backend Structured Logging skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add j4flmao/agent-skills --skill backend-structured-logging. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Backend Structured Logging popular?

It lives in j4flmao/agent-skills, which has 45 GitHub stars and 6 forks.

Related skills

Agent Observability

45

j4flmao/agent-skills

Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).

DevOps & Cloud

AI Agent Architectures

45

j4flmao/agent-skills

Use when the user asks to build an AI agent, design an agent that calls tools and keeps memory, write an agent system prompt or pick an agent framework (Claude Agent SDK, OpenAI Agents SDK, LangGraph). Produces an architecture brief covering loop, tools, memory, guardrails and evals, routing depth to child skills. Not for workflow patterns (use ai-agentic-workflows).

AI, LLMs & Agents

AI Agent Core Loop

45

j4flmao/agent-skills

Use when the user asks about the agent loop, ReAct vs plan-and-solve, re-planning, Reflexion, an agent stuck in a loop, max iterations or termination conditions. Produces a loop spec or patch with state, success predicate, caps and no-progress detection. Not for overall agent design (use ai-agent-architectures) or tool schemas (use tool-calling-principles).

AI, LLMs & Agents

Backend Transactional Outbox

45

j4flmao/agent-skills

Use when the user asks about the transactional outbox, when a database write and a Kafka publish get out of sync, dual writes, reliable event publishing, Debezium outbox or a message relay. Produces outbox table, relay and consumer dedupe. Not for event schema design (use backend-event-driven).

Software Development

Backend Sms Messaging

45

j4flmao/agent-skills

Use when the user asks about sending SMS, Twilio, Amazon SNS SMS, Vonage, OTP codes by SMS, WhatsApp Business API, STOP/opt-out handling, 10DLC or TCPA. Produces SMS/OTP sending code with consent, rate limits and failover. Not for push notifications (use mobile-push-notifications) or email (use backend-transactional-email).

Software Development

Backend Web Real Time

45

j4flmao/agent-skills

Use when the user asks about WebRTC, building a video call feature, SFU vs MCU, signaling servers, TURN/STUN, LiveKit or mediasoup, simulcast or live streaming latency. Produces real-time media architecture and signaling code. Not for chat-style WebSocket messaging (use backend-websocket-patterns).

Software Development

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.