Index of every page on this site: llms.txt
All skills
elithrar avatar

/logging-sucks

@eb4f994
by Matt Silverlockelithrar/dotfiles226 stars
16
Run it yourself

Design or review structured application logging, canonical request events, correlation, redaction, and sampling. Use when changing logging instrumentation or auditing log quality, not for every debugging task.

Use this Skill: https://skilld.dev/gh/elithrar/dotfiles/logging-sucks

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈56 tokens for metadata: the name and description. ≈637 when used: this file. ≈670 more on demand in 2 files.

Description uses 2.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈225 characters, or 2.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Structured request logging

Adapted from Boris Tane's logging guide. Preserve the existing logger, transport, field schema, and runtime constraints unless changing them is part of the request.

Event design

Start with the incident question the logs must answer. Prefer a canonical completion event for each request or job when the runtime can emit it reliably. Accumulate outcome, duration, correlation, and relevant domain context during execution. Retain separate events for independently actionable failures, long-running progress, or required audit records; do not force every event into a single request summary.

Use the logger's structured fields and established naming conventions. Include a stable event name, severity, timestamp, service, and outcome where applicable, reusing metadata the platform already supplies. Attach request, trace, or job identifiers when available and appropriate. Use only fields that answer a concrete query; there is no field-count target.

Propagate correlation through HTTP, queues, and asynchronous jobs using the runtime's supported mechanism. Avoid mutable global context that can leak identifiers between concurrent requests.

Privacy and cost

Allowlist useful context and redact before emission. Do not serialize full request objects, credentials, cookies, raw bodies, private URLs, or personal data merely because they are available. Include permitted identifiers according to the product's data policy and retention needs. Bound event sizes and avoid logs in tight loops.

Choose retention and sampling from the actual traffic, budget, and incident needs. Favor retaining errors and diagnostically useful slow requests, but do not mandate 100% retention, VIP tracking, or a fixed success-sampling rate. Account for crashes or cancellations that can prevent completion events from being emitted.

For a concrete event schema or sampling design, read references/event-design.md.

Review and validation

For an audit, report evidence-backed findings without editing. For requested instrumentation changes, implement them and check the affected success, failure, or concurrency path. Verify correlation isolation, redaction, and emission behavior where the change puts them at risk. Once those checks pass, stop optional validation.

Report the incident query enabled by the change and any remaining visibility gap. Do not replace the logging stack or rewrite unrelated call sites solely to enforce this skill's preferred pattern.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides comprehensive guidelines for designing and reviewing structured logging instrumentation. It prioritizes privacy by instructing the agent to redact credentials and personal identifiers from logs. No malicious patterns or security risks were identified.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at eb4f994. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 3 months ago
metadata
{
  "source": "https://loggingsucks.com/",
  "author": "Boris Tane"
}

README badge

README badge for elithrar/dotfiles/logging-sucks