Skip to main content
skill CX Codex

logging-best-practices · andrelandgraf — Claude Code skill: Pino logs, install

logging-best-practices teaches the agent to write structured Pino logs: context-first signature, levels for different scenarios, workflow-safe wrapper.

no license 111 installs ★ 23 updated 2026-06-08

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a claude-code
Open on GitHub

What logging-best-practices does

The skill defines the Pino logger call signature: context object first, message second. Errors go into the context under err. It describes log levels (info, warn, error, debug, fatal) and shows how to log from API routes with request timing.

Workflow runtimes cannot import Node modules, so the skill proposes wrapping the logger in a "use step" function. Without Pino in the project, the skill is useless: you need an existing @/lib/logging/logger module.

The LOG_LEVEL environment variable sets the threshold: defaults to info, recommends warn for production.

What it helps with

  • add structured logs with context to route handlers
  • log an error with full request context
  • call the logger from a workflow via step wrapper
  • set log level threshold via environment variable
  • measure request duration and record it in logs

Example prompts for the agent

  • Log a successful request to /api/chat with duration and status
  • Wrap the logger in a "use step" function for workflows
  • Add logger.error with err and userId context to the error handler

How to install logging-best-practices

1Skills CLI (Vercel)

npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a claude-code

2Manually: put the files in place

~/.claude/skills/logging-best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/logging-best-practices/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about logging-best-practices

How to install logging-best-practices in Claude Code?

Run npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a claude-code, the skill will appear in ~/.claude/skills/logging-best-practices/SKILL.md.

What does logging-best-practices do?

It teaches the agent to use Pino: pass context as the first argument, choose the right log level, wrap calls in step functions for workflows.

What does the skill require?

Installed Pino and a @/lib/logging/logger module in the project. Without them, the skill will not work.

Similar skills

All skills for Backend and APIs →

logging-best-practices by other authors comes first.

logging-best-practices boristane The logging-best-practices skill guides your agent to implement wide events (canonical log lines) instead of scattered logs. It consolidates request metrics, business context, and errors into one JSON event. CX Codex +1 5,000installs logging-best-practices aj-geddes logging-best-practices — a skill for setting up logging: levels, JSON output, context fields, PII handling and centralized collection. CX Codex +1 744installs logging-best-practices Mindrally logging-best-practices — a skill that spells out logging rules: structured JSON, log levels, shared fields and request context. Useful when every service logs its own way. CX Codex +1 842installs logging-best-practices secondsky logging-best-practices — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode that enforces structured logging standards: log levels, request context propagation, PII sanitization and centralized aggregation. CX Codex +1 415installs logging-best-practices ncklrs logging-best-practices guides AI coding agents to implement wide request events, structured records, and tail sampling instead of scattered debug strings. CX Codex +1 148installs structured-logging-standardizer patricio0312rev structured-logging-standardizer sets up structured JSON logging with request correlation IDs using AsyncLocalStorage and pino. Keeps backend logs queryable and connected. CX Codex +1 273installs pino-logging oakoss Set up structured Pino logging in Node.js, including request context, sensitive-field redaction, transports, and framework integrations. CX Codex +1 217installs review-logging-patterns HugoRCD review-logging-patterns is a Claude Code skill that reviews logs and errors in TypeScript and JavaScript. It suggests evlog adoption during logging setup or code review. CX Codex +1 767installs pii-redaction-logging-policy-builder patricio0312rev pii-redaction-logging-policy-builder sets up redaction rules and a logging policy to keep sensitive user data out of logs. Replaces emails, phone numbers, and payment cards with safe placeholders. CX Codex +1 283installs monitoring-observability travisjneuman monitoring-observability equips AI coding agents to set up OpenTelemetry, structured JSON logging, and distributed tracing. Useful when defining SLO alerts or instrumenting services. CX Codex +1 146installs encore-logging encoredev The encore-logging skill guides an agent through structured logging in Encore.ts with encore.dev/log, covering message style, levels and fields. CX Codex +1 168installs

From the same set9

ralph-loop-workflow The ralph-loop-workflow skill runs an agent through a coding loop that turns a broad goal into tasks, changes code, and checks the result. Use it for work that needs repeated agent-led iterations. CX Codex +1 684installs use-fullstackrecipes use-fullstackrecipes — a skill for discovering and applying fullstackrecipes: setup guides for tools and day-to-day patterns for databases and APIs. The agent fetches the needed .md from the site and follows its instructions. CX Codex +1 240installs testing-best-practices testing-best-practices — a skill that teaches the agent to pick the right test type (Playwright, integration, or unit) and run it against an isolated Neon branch that auto-deletes after an hour. CX Codex +1 113installs url-state-patterns The url-state-patterns Claude Code skill keeps React state in sync with URL query parameters using nuqs. It activates for shareable filters, search, and dialogs opened through a link. CX Codex +1 110installs authentication-best-practices The authentication-best-practices Claude Code skill covers Better Auth sessions, route protection, and sign-in flows. It activates when a task involves access control for pages or APIs. CX Codex +1 106installs sentry-best-practices The sentry-best-practices Claude Code skill guides Sentry error capture, context, tracing, and logging in application code. It activates during work on error handling or performance instrumentation. CX Codex +1 106installs workflow-best-practices The workflow-best-practices Claude Code skill covers durable workflows with steps, streaming, and agent runs. It applies when creating, starting, resuming, or saving a workflow. CX Codex +1 104installs drizzle-queries The drizzle-queries Claude Code skill guides type-safe Postgres queries with Drizzle ORM. It activates for database reads, mutations, and new table work. CX Codex +1 103installs

Project sponsors

Companies that keep this analytics open