Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add j4flmao/agent-skills --skill structured-logginggit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/j4flmao/agent-skills/structured-logging)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/structured-logging"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/structured-logging/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/structured-logging"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/structured-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00091 | $0.05195 |
| Opus 5 | $0.00046 | $0.02597 |
| Sonnet 5 | $0.00018 | $0.01039 |
| Haiku 4.5 | $0.00009 | $0.00519 |
Grade A, and why
backend-structured-logging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 537 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Structured Logging
Purpose
Design structured JSON logging with consistent schema, context propagation, and sampling.
Agent Protocol
Trigger
Exact user phrases: "structured logging", "JSON logging", "log format", "logging best practice", "log levels", "distributed tracing", "log correlation", "structured log", "logging library", "log aggregation", "log output", "log schema", "correlation ID".
Input Context
Before activating, verify:
- Logging framework (Winston/Pino/Serilog/Log4j/logrus/zerolog)
- Log aggregation system (Elasticsearch/Loki/CloudWatch/Datadog)
- Compliance requirements (audit log retention, PII handling, access logs)
Output Artifact
Logging schema and configuration as formatted text.
Response Format
# Log schema (JSON fields)
# Log levels and sampling rules
// Logger configuration
// Context propagation middleware
// PII redaction config
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
- Log schema defined with all required fields (timestamp, level, message, context)
- Log levels configured with production rules (ERROR/WARN/INFO, sampled DEBUG)
- Log output configured as JSON lines to stdout
- Context propagation implemented (correlation ID through all async boundaries)
- Sensitive data redaction with pattern-based masking
- Sampling strategy defined per log level
Max Response Length
200 lines of configuration and code.
Decision Tree
Which Log Level?
What happened?
├── Application cannot continue (OOM, DB connection lost for good)
│ └── FATAL — page on-call immediately
├── Request failed, user got an error
│ └── ERROR — alert if rate exceeds threshold
├── Request succeeded but degraded (fallback used, retry happened)
│ └── WARN — investigate if persistent
├── State transition normal (order created, user registered)
│ └── INFO — sampled in production
├── Need to trace request through the system
│ └── DEBUG — header-activated per request
└── Deep internal details (loop iterations, variable values)
└── TRACE — never enabled in production
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/log-aggregation.md 2.7 KB
- references/log-correlation-tracing.md 5.0 KB
- references/log-format.md 8.4 KB
- references/log-sampling-strategies.md 4.6 KB
- references/log-shipping.md 7.2 KB
- references/logging-aggregation.md 6.1 KB
- references/logging-architecture.md 6.9 KB
- references/structured-logging-implementation.md 5.4 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 537 lines · 91 tokens per session scan A 9cc850046d64
backend-structured-logging is a skill published in the GitHub repository j4flmao/agent-skills (23 stars, last pushed 5d ago), licensed MIT. It adds 91 tokens to every session and 5,195 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
error-handling
Use when implementing custom error classes, error middleware, structured logging, retry logic, or graceful shutdown patterns in backend applications.
error-handling
Implement robust error handling with custom error types, proper propagation, user-friendly messages, and logging. Use when adding error handling to APIs, libraries, or applications.
printing-press-amend
Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…
convex-performance-audit
Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.
convex-insights
Query a running Convex app's logs + health in natural language (official MCP): failures, slow/expensive functions, deploy causality — scoped, evidence-backed, with a dashboard deep link.
ssl-proxy-troubleshoot
Systematic workflow for troubleshooting SSL/proxy connectivity issues with government websites.