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
npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a claude-codeWhat 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/chatwith duration and status - Wrap the logger in a
"use step"function for workflows - Add
logger.errorwitherranduserIdcontext to the error handler
How to install logging-best-practices
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a claude-code2Manually: put the files in place
~/.claude/skills/logging-best-practices/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/logging-best-practices/
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a codex2Manually: put the files in place
.agents/skills/logging-best-practices/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a cursor2Manually: put the files in place
.cursor/skills/logging-best-practices/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install andrelandgraf/fullstackrecipes skills/logging-best-practices2Manually: put the files in place
.github/skills/logging-best-practices/SKILL.md1Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a gemini-cli2Platform CLI
gemini skills install https://github.com/andrelandgraf/fullstackrecipes --path skills/logging-best-practicesManually: put the files in place
.devin/skills/logging-best-practices/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add andrelandgraf/fullstackrecipes --skill logging-best-practices -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.