logging-and-observability

logging-and-observability is a skill for Claude Code from KhaledSaeed18/dotclaude. It costs 113 tokens per session (1,378 once invoked), scanned A, original, MIT.

A guide for adding logs, measurements, traces, and health checks to a running service. These are forms of observability: information that helps you understand what a system is doing in production.

In plain words
What is it for?
Use it to create structured logs, track request and service metrics, trace requests with OpenTelemetry, add health and readiness endpoints, and build alerts and dashboards.
Why use it?
It makes failures diagnosable without first changing and redeploying the service. Consistent request identifiers also help follow one operation across services and background jobs.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the engineering plugin — 22 skills, 2 commands, 7 agents shipped together

Good fit Use it to create structured logs, track request and service metrics, trace requests with OpenTelemetry, add health and readiness endpoints, and build alerts and dashboards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khaledsaeed18/dotclaude/logging-and-observability
Install

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.

Any agent
npx skills add KhaledSaeed18/dotclaude --skill logging-and-observability
Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code.

Or install engineering, the plugin that ships this one along with the rest of its 22 skills, 2 commands, 7 agents.

Wrote 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.

agentmods badge for logging-and-observability

README.md
[![agentmods](https://agentmods.dev/badge/skills/khaledsaeed18/dotclaude/logging-and-observability/github.svg)](https://agentmods.dev/skills/khaledsaeed18/dotclaude/logging-and-observability)
Your own site
<a href="https://agentmods.dev/skills/khaledsaeed18/dotclaude/logging-and-observability"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/dotclaude/logging-and-observability/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.

agentmods 80×15 button for logging-and-observability

Your own site · 80×15
<a href="https://agentmods.dev/skills/khaledsaeed18/dotclaude/logging-and-observability"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/dotclaude/logging-and-observability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,378 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.01378
Opus 5.5 $0.00045 $0.00551
Sonnet 5.5 $0.00023 $0.00276
Haiku 4.5 $0.00011 $0.00138

Measured 28d ago against content hash 88e043d4c30a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

logging-and-observability 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 28d 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.

.claude-plugin/plugins/engineering/skills/logging-and-observability/SKILL.md · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Observability is the ability to ask a new question about the system's behaviour without shipping new code. Logs, metrics, and traces each answer different questions; a service needs all three, wired so that one request can be followed across them.

Logs

  • Structured (JSON, one object per line) to stdout; the platform ships them. Never format strings for humans in production logs; dashboards and queries need fields.
  • Standard fields on every line: timestamp (ISO 8601 UTC), level, message, service, version, env, request_id or trace_id, and the domain ids in play (user_id, order_id). A logger bound with context (logger.child({ requestId })) so handlers do not repeat them.
  • Levels: error for failures needing attention (paged or triaged), warn for degraded but handled, info for business events and request summaries (one line per request with method, path, status, duration), debug off in production. A log at error that nobody would act on is noise that hides the one that matters.
  • One request summary line at the boundary rather than a line per step; steps at debug.
  • Never log: secrets, tokens, passwords, full card numbers, full request bodies, personal data beyond the ids needed. Redaction in the logger config (pino redact, structlog processors), not by remembering.
  • Sampling for high-volume info and for debug in production when needed; errors are never sampled.
  • Retention and cost: logs cost by volume; a noisy dependency at info can be the largest line item. Budget per service and review monthly.

Libraries: pino (Node), structlog or logging with a JSON formatter (Python), slog (Go), tracing (Rust).

Correlation

  • A request_id accepted from the inbound header (X-Request-Id, or the W3C traceparent) or generated at the edge, put on the logger context and the response header, and forwarded on every outbound call and every enqueued job. A job carries the id of the request that created it.
  • With tracing enabled, the trace id serves as the correlation id; log it on every line.

Read the full file on GitHub · 67 lines

Changes

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.

  1. 28d ago First seen · 67 lines · 113 tokens per session scan A 88e043d4c30a

Subscribe to this mod's changes

logging-and-observability is a skill published in the GitHub repository KhaledSaeed18/dotclaude (5 stars, last pushed 6d ago), licensed MIT. It adds 113 tokens to every session and 1,378 once invoked, about $0.0005 per session on Opus 5.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-22.

Related

Other skills, from other repositories

ast-grep

Searches and rewrites code by AST shape across 25 languages. Use when the target is a syntax pattern (every call/class/import shaped like X, a codemod, a YAML rule) rather than literal text; for plain strings, comments, or filenames, use rg.

code-yeongyu/oh-my-openagent · 61 tokens

debugging

Runs a hypothesis-driven debugging loop across any language or binary, escalating to orthogonal oracle angles and locking the fix with a failing test. Use for crashes, silent failures, hangs, wrong responses, memory leaks, async misbehavior, or reverse engineering.

code-yeongyu/oh-my-openagent · 53 tokens

lcx-doctor

Diagnose LazyCodex and Codex CLI installation health against the latest sources. Use whenever the user asks for a doctor or health check, says LazyCodex, lazycodex-ai, omo-codex, or Codex behaves oddly after an install, update, or config change, suspects a stale, drifted, or broken setup, or wants the local install…

code-yeongyu/oh-my-openagent · 93 tokens

lcx-report-bug

Create a high-signal bug issue or PR in the repo that owns the defect. Use this whenever the user asks to report, file, open, or triage a LazyCodex, lazycodex-ai, omo-codex, Codex plugin, or upstream Codex CLI bug, especially when they need source-backed root cause, reproduction steps, fix guidance, and GitHub routing.

code-yeongyu/oh-my-openagent · 85 tokens

remove-deadcode

Remove unused code from this project with ultrawork mode, LSP-verified safety, atomic commits. Triggers: remove dead code, dead code, cleanup, remove unused.

code-yeongyu/oh-my-openagent · 41 tokens

code-review-web

Review web application code for bugs, security issues, performance problems, and stack-specific anti-patterns. Use this skill whenever the user wants to review code, debug a production issue, investigate a build failure, audit security, or check a PR before merging. Triggers on code review, review my code, debug…

rampstackco/claude-skills · 121 tokens