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 ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
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.
| 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;
}