← ClaudeAtlas

logging-auditlisted

Audit code for logging and observability quality, retrofit code onto whatever logger a repo already uses, and diagnose why a failed run left no usable evidence. Use this whenever reviewing a diff or PR for log quality, cleaning up or standardising logging in a module, judging whether error handling would actually be diagnosable in production, deciding what a catch block should do, or running a postmortem on a job or agent run that failed without explaining itself. Works in any language and any repo. Trigger it for requests like "review the logging here", "why was this run impossible to debug", "is this catch block okay", "make this failure easier to trace", or any investigation of a job that died silently — even when the user never says the word "logging".
arndvs/ctrlshft · ★ 0 · Code & Development · score 64
Install: claude install-skill arndvs/ctrlshft
# Logging audit Judge whether code produces evidence that makes failures diagnosable, and fix it where it doesn't. Two tests sit behind every judgment below, one per audience. **Human:** could someone reconstruct what happened from the log alone, without rerunning anything? Many failures can't be reproduced — non-deterministic jobs, transient upstream errors, conditions that existed for one minute in production. For those, the log is the only evidence that will ever exist. **Agent:** does this output narrow where a coding agent has to look? An agent running a command sees only what that command prints. Output naming the operation and the code path that failed cuts the search from every file in the repo to a handful. Code that works correctly but prints nothing is opaque to an agent even though it has no bug — a distinct defect class, and an increasingly expensive one. The tests usually agree. Where they diverge, `references/agent-readable.md` covers the trade-off. This skill assumes nothing about the repo. Detect what's there, audit against it, and propose changes that fit the codebase rather than an ideal. --- ## Step 1: Detect the convention Do this before forming any opinion. Auditing against a general best practice produces findings that don't get merged; auditing against the repo's own prevailing pattern produces findings that do. **Find the logger.** Grep imports for the usual suspects — `pino`, `winston`, `bunyan`, `zap`, `zerolog`, `log/slog`, `structlog`, `