pino
Guides AI agents to use Pino logging correctly — levels, structured logs, child loggers, and Fastify integration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guides AI agents to use Pino logging correctly — levels, structured logs, child loggers, and Fastify integration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Guides AI agents to produce accurate, well-structured technical documentation in Markdown with Mermaid diagrams.
Guides AI agents to write correct, idiomatic Fastify code using plugins, routes, schemas, and lifecycle hooks.
Guides AI agents to write idiomatic, correct Node.js JavaScript code.
Guides AI agents to write secure Fastify/Node.js code — input validation, authentication, injection prevention, and safe error handling.
基于 SOC 职业分类
| name | pino |
| description | Guides AI agents to use Pino logging correctly — levels, structured logs, child loggers, and Fastify integration. |
| metadata | {"tags":["pino","logging","fastify","nodejs"]} |
Use this skill when writing any logging code with Pino: creating loggers, choosing log levels, adding context, or configuring Fastify's built-in logger.
trace, debug, info, warn, error, fatal).request.log, and serializers.// Fastify uses Pino by default — enable it at startup
const app = Fastify({ logger: true });
// In route handlers, always use request.log (bound to request id)
fastify.get('/users/:id', async (request) => {
request.log.info({ userId: request.params.id }, 'fetching user');
const user = await db.findUser(request.params.id);
if (!user) {
request.log.warn({ userId: request.params.id }, 'user not found');
throw fastify.httpErrors.notFound();
}
return user;
});
// Log errors with the err key — Pino serializes Error objects automatically
try {
await riskyOp();
} catch (err) {
request.log.error({ err }, 'riskyOp failed');
throw err;
}