What problem does it solve?
This Skill helps you write production-grade Go logging that is structured, consistent, and useful at 3 a.m. when someone needs to diagnose a live incident. It prevents noisy, duplicate, or unsafe logs by steering code toward the standard library logger and away from ad hoc printf-style output.
Core Features & Use Cases
- Structured logging with slog: Choose
log/slog for new Go services, emit static messages with typed fields, and keep logs easy to index and search.
- Request-scoped context: Attach request IDs and other per-request fields once in middleware, then inherit them through downstream calls.
- Level and handler guidance: Decide between debug, info, warn, and error correctly, add redaction or sampling in handlers, and migrate from zap, logrus, or zerolog when needed.
- Use case: A Go API receives a checkout request, derives a request logger in middleware, records an error once at the request boundary, and returns a sanitized response while keeping operator logs rich and consistent.
Quick Start
Ask the skill to convert your Go code to structured slog logging with request-scoped fields, correct levels, and safe redaction.