agentsclimarketplace

Logging

Skill stevekinney/lesson-plan-adapter/.claude/skills/logging

Install
npx -y skills add stevekinney/lesson-plan-adapter --skill logging

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.3 KB, as published. Nobody here has run it

Skill: Logging

Pino logging patterns used throughout the codebase.

Setup

The shared logger lives in packages/mcp/src/logger.ts:

  • JSON output in production
  • Pretty-printed output in development (via pino-pretty)
  • Log level controlled by LOG_LEVEL env var (default: info)

Patterns

Import

import { logger } from '@lesson-adapter/mcp/logger';

Child Loggers

Create child loggers for request/tool context:

const requestLogger = logger.child({ tool: 'tool_name', userId: context.userId });
requestLogger.info({ durationMs }, 'Tool completed');

Error Logging

Always use err as the key (pino convention):

requestLogger.error({ err }, 'Description of what failed');

What to Log

  • Tool execution start/completion with duration
  • Session creation and closure
  • OAuth flow steps (registration, authorization, token exchange)
  • Database query failures

What NOT to Log

  • Full access tokens, passwords, or secrets
  • PII beyond userId
  • Request/response bodies (unless debugging)
  • Successful health checks or routine operations

Rules

  • Never use console.log, console.error, or console.warn in server code
  • Always use the shared logger instance
  • Use structured logging (pass objects, not string interpolation)

Keep looking

Skills are one crate of 608,475. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.