Globales Ranking · von 601 Skills
pino-logging AI Agent Skill
Quellcode ansehen: oakoss/agent-skills
SafeInstallation
npx skills add oakoss/agent-skills --skill pino-logging 56
Installationen
Pino Logging
High-performance JSON logger for Node.js. Transports run in worker threads to keep the main event loop free. Produces NDJSON by default with automatic level, time, pid, hostname, and msg fields.
When to use: Structured logging in Node.js applications, request-scoped logging with correlation IDs, sensitive data redaction, multi-destination log routing, framework logging integration.
When NOT to use: Browser-only logging (pino has limited browser support), simple console.log debugging during development, projects that need human-readable logs by default (pino outputs JSON; use pino-pretty for dev).
Package: pino (v10+)
Quick Reference
| Pattern | API | Key Points |
|---|---|---|
| Basic logger | pino() |
Defaults: level info, JSON to stdout |
| Set level | pino({ level: 'debug' }) |
fatal > error > warn > info > debug > trace |
| Log with context | logger.info({ userId }, 'msg') |
First arg is merged object, second is message |
| Error logging | logger.error({ err }, 'failed') |
Pass errors as err key for serialization |
| Child logger | logger.child({ requestId }) |
Bindings persist on all child logs |
| Redaction | pino({ redact: ['password'] }) |
Paths use dot notation, supports wildcards |
| Transport (worker) | pino({ transport: { target } }) |
Runs in worker thread, non-blocking |
| Multiple transports | transport: { targets: [...] } |
Different levels per destination |
| Pretty print (dev) | target: 'pino-pretty' |
Dev only — not for production |
| File transport | target: 'pino/file' |
Built-in, with mkdir option |
| Rotating files | target: 'pino-roll' |
Size and time-based rotation |
| HTTP middleware | pinoHttp() from pino-http |
Auto request/response logging |
| Request ID | genReqId option in pino-http |
Generate or forward X-Request-Id |
| Serializers | serializers: { req, res, err } |
Transform objects before logging |
| Formatters | formatters: { level, log } |
Rename fields, transform output |
| Custom levels | customLevels: { http: 35 } |
Add levels between built-in ones |
| Async destination | pino.destination({ sync: false }) |
Buffered async writes |
| Fastify | fastify({ logger: true }) |
Built-in pino, request.log |
| Hono | hono-pino middleware |
c.get('logger') in handlers |
Common Mistakes
| Mistake | Fix |
|---|---|
Using pino-pretty in production |
Use JSON output in production; pretty-print only in dev via transport |
| Logging sensitive data (tokens, passwords) | Use redact option with paths to sensitive fields |
| Creating a new logger per request | Use logger.child({ requestId }) for request-scoped context |
| Blocking main thread with file writes | Use pino.transport() — runs in a worker thread |
Using JSON.stringify on errors |
Pass errors as { err } — pino serializes stack, cause chain |
Not forwarding X-Request-Id header |
Use genReqId in pino-http to check headers first |
| Logging inside hot loops | Check logger.isLevelEnabled('debug') before expensive operations |
Missing fetch-depth: 0 with transports |
Transports are separate packages — install them as dependencies |
Delegation
If the
honoskill is available, delegate Hono middleware and routing patterns to it.
If thevitest-testingskill is available, delegate test setup and mocking patterns to it.
If thesentry-setup-loggingskill is available, delegate Sentry integration to it — it coversSentry.pinoIntegration()for forwarding pino logs to Sentry.
Otherwise, recommend:pnpm dlx skills add getsentry/sentry-for-claude -s sentry-setup-logging -a claude-code -y
References
Installationen
Sicherheitsprüfung
Quellcode ansehen
oakoss/agent-skills
Mehr aus dieser Quelle
Power your AI Agents with
the best open-source models.
Drop-in OpenAI-compatible API. No data leaves Europe.
Explore Inference APIGLM
GLM 5
$1.00 / $3.20
per M tokens
Kimi
Kimi K2.5
$0.60 / $2.80
per M tokens
MiniMax
MiniMax M2.5
$0.30 / $1.20
per M tokens
Qwen
Qwen3.5 122B
$0.40 / $3.00
per M tokens
So verwenden Sie diesen Skill
Install pino-logging by running npx skills add oakoss/agent-skills --skill pino-logging in your project directory. Führen Sie den obigen Installationsbefehl in Ihrem Projektverzeichnis aus. Die Skill-Datei wird von GitHub heruntergeladen und in Ihrem Projekt platziert.
Keine Konfiguration erforderlich. Ihr KI-Agent (Claude Code, Cursor, Windsurf usw.) erkennt installierte Skills automatisch und nutzt sie als Kontext bei der Code-Generierung.
Der Skill verbessert das Verständnis Ihres Agenten für pino-logging, und hilft ihm, etablierte Muster zu befolgen, häufige Fehler zu vermeiden und produktionsreifen Code zu erzeugen.
Was Sie erhalten
Skills sind Klartext-Anweisungsdateien — kein ausführbarer Code. Sie kodieren Expertenwissen über Frameworks, Sprachen oder Tools, das Ihr KI-Agent liest, um seine Ausgabe zu verbessern. Das bedeutet null Laufzeit-Overhead, keine Abhängigkeitskonflikte und volle Transparenz: Sie können jede Anweisung vor der Installation lesen und prüfen.
Kompatibilität
Dieser Skill funktioniert mit jedem KI-Coding-Agenten, der das skills.sh-Format unterstützt, einschließlich Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider und anderen Tools, die projektbezogene Kontextdateien lesen. Skills sind auf Transportebene framework-agnostisch — der Inhalt bestimmt, für welche Sprache oder welches Framework er gilt.
Chat with 100+ AI Models in one App.
Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.