Design, audit, or implement application structured logging architecture from repository evidence.
SkillScore59Maintained
Automatic
◆DevOps & SRE pack
Last verified 8/28/2026
What it changes
Passed 10 of 17 test cases with the skill, and 6 of 17 without it.
Without skill36%
With skill59%
Checks it passed that the model alone missed
Eliminates the start event that only narrate normal control flow.
Recommends emitting exactly one request-completion event per request.
Refuses to sample user-visible server errors without an explicit loss policy.
and 7 more in the full report
6 fixed7 passed either way8 still failing1 broke
Pass-rate lift
+23 pp
Tokens
+94%
Agent turns
0%
Response time
+47%
Model gemini-3.6-flashMeasured 8/28/2026v113 of 22 cases passed with skill · 17 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 6
Prompt
We are refactoring a core Rust `pricing-engine` module that calculates discounts. I want to inject a `slog::Logger` instance directly into the pure `calculate_discount` domain function so we can track complex pricing tiers step-by-step. Provide the updated Rust function signature and the internal logging calls.
What was checked, without and with the skill
Checked
Without skill
With skill
Recommends keeping pure domain code free of logger dependencies.
Passed
Passed
Advises logging the effect or result at the system boundary or adapter instead of inside the domain logic.
Missed
Passed
case-04 · gemini-3.6-flash · 8/28/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md70 lines3 files
Structured Logging Lite
Build the smallest logging contract that makes the target system diagnosable without leaking data, duplicating audit records, or forcing an unnecessary logging-library migration.
Operating Contract
Direct actions: Inspect repositories, manifests, runtime entrypoints, tests, deployment files, and existing logs. Make local logging changes only when the user asks to implement or upgrade them; treat design, review, and diagnosis requests as read-only.
Escalate before: Ask before publishing, pushing, changing remote observability infrastructure, touching production, or expanding from application logging into a full observability rollout.
Evidence-backed pushback: Challenge a requested library migration or log-everything plan only with repository evidence, a measured requirement, a concrete security/cardinality risk, or a smaller compatible alternative.
Feedback loop: Promote repeated missing fields, false-success signals, secret leaks, or manual incident queries into the field contract, gotchas, validation tests, or a deterministic helper.
Never print or persist credentials, tokens, cookies, signatures, request bodies, DSNs, private URLs, or secret values while investigating.
Return errors through the existing error contract. A new log line never justifies swallowing, downgrading, or replacing an error.
Workflow
Search before proposing. Read applicable repository instructions, check the worktree, then locate manifests, entrypoints, logger construction, log calls, request/context propagation, error mapping, panic handling, adapters, workers, audit records, metrics, tests, and deployment configuration.
Classify the target. Distinguish a reusable library, CLI/batch job, HTTP service, long-running worker, or multi-service system. Libraries should usually accept host-provided diagnostics rather than configure process-global output.
Reconstruct current coverage. Mark lifecycle, request, authentication, application milestones, external adapters, background jobs, degraded paths, panic/crash, and third-party library output as covered, partial, or missing.
Name the operational questions. Require each proposed event to answer a concrete debugging, security, support, or capacity question. Delete events that only narrate normal control flow.
Choose boundaries before libraries. Configure output at the composition root; observe requests at transport middleware; log effect failures at adapters; log worker batch outcomes at the worker owner; keep pure domain code free of logger dependencies.
Keep or select the logger. Prefer a working repository-standard logger or a language standard library. Recommend migration only with evidence such as missing required capability, measured overhead, ecosystem incompatibility, or unsafe behavior.
Write the contract. Define stable event names, required and conditional fields, level policy, error classification, correlation rules, redaction rules, retention/collection ownership, and low-cardinality metric labels.
Implement incrementally when authorized. Land P0 request/error/security coverage first, P1 adapter and worker telemetry next, and tracing or backend-specific integration only when the runtime needs it.
Verify with fresh evidence. Run repository-native build/tests plus log capture, secret-canary, route-normalization, panic, and streaming-response tests that match the change.
Boundary Rules
Treat logs, metrics, traces, and durable audit records as different contracts. Do not claim one replaces another.
Emit one request-completion event per request. Add a second event only when it contains a distinct root cause or business outcome.
Use route templates or operation names in metrics. Keep request IDs, user IDs, asset/order IDs, raw paths, URLs, and error strings out of metric and log-index labels.
Include trace_id and span_id only when a real trace context exists. Do not invent IDs or require tracing as a prerequisite for useful logging.
Prefer fixed error codes and reason enums over arbitrary error strings for aggregation. Preserve a safe cause for debugging without exposing upstream payloads.
Exclude or sample high-volume health and readiness success logs. Never sample security failures or user-visible server errors without an explicit loss policy.
Preserve optional response/stream interfaces when observing HTTP writers; a naive wrapper can break flushing, hijacking, streaming, or byte counts.
Use when the user explicitly asks for $threads, Codex-native subagents, 开几个子 agent, or a GitHub issue/PR queue needing parallel lanes, worktrees, review/merge gates, and closure audit. Do not use for OS/language threads, chat/email/forum threads, or Assistants product threads unless Codex workflow orchestration is explicit.