/harness-operate:observability-and-instrumentationfrom harness-operate
Adds logging, metrics, tracing and alert hooks to code so production behaviour can be understood from telemetry alone. Use when building or reviewing anything that runs in production, adding I/O, retries, queues or cross-service calls, or when an incident was hard to diagnose because the data was missing.
Ships in harness-operate. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Code you cannot observe is code you cannot operate. Observability means answering "what is the system doing and why?" from the outside, using the telemetry the code emits. Write instrumentation alongside the feature, as you would tests. Without it, the first user-reported bug becomes archaeology instead of a query.
Not for:
Telemetry without a question is noise. Write 2-4 questions the on-call engineer will ask:
FEATURE: payment retry
QUESTIONS:
1. What share of payments succeed first time vs after retry?
2. When one fails permanently, why (provider error, timeout, validation)?
3. Is the provider slower than usual?
Every signal added must help answer one of these.
If you cannot name the questions, you are not ready to instrument.
| Signal | Answers | Cost profile |
|---|---|---|
| Structured log | What happened in this case? | Per event; grows with traffic |
| Metric | How often / how fast, in aggregate? | Per series; cheap to query |
| Trace | Where did the time go across services? | Per request; usually sampled |
Metrics say that something is wrong, traces say where, logs say why.
Log events, not prose: a stable event name plus machine-readable fields.
BAD: log("Payment 42 failed for user 7 after 3 retries")
GOOD: log.warn({event: "payment_failed", paymentId: 42, provider: "x",
errorCode: "timeout", attempt: 3})
| Level | Meaning | On-call action |
|---|---|---|
| error | Invariant broken; someone may need to act | Investigate |
| warn | Degraded but handled (retry succeeded, fallback used) | Watch trends |
| info | Significant business event | None |
| debug | Diagnostic detail | Off in production by default |
Correlation IDs are mandatory. Accept or generate a request ID at the system boundary; attach it to every log line, span and outbound call (headers, queue metadata). Without it a single request cannot be reconstructed from interleaved logs.
Name the entry point. A correlation ID identifies a run, not which path started it. If a scheduler, a replay endpoint and a manual script can all start the same job into one log sink, their lines are interchangeable. Stamp an entry_point field where the run starts, propagate it with the correlation ID, and never infer it downstream. A field that merely correlates with an entry point is a hint, not attribution.
Never log secrets, tokens, passwords or unredacted personal data. Allowlist fields; do not dump request bodies. See harness-verify:security-and-hardening.
OK label: route="/tasks/:id" status_class="5xx" dependency="billing"
NEVER label: user_id, email, request_id, full URL, error message
Prefer a vendor-neutral standard (OpenTelemetry) so the backend can change. Auto-instrumentation covers HTTP, RPC and common database clients. Add manual spans only around meaningful internal units of work and attach the attributes on-call will filter by. Propagate context across every async boundary or the trace breaks at the gap. Sample at a low rate by default and keep all errors where tail sampling is available.
Alert on symptoms users feel (error rate, latency, queue age), not causes (CPU, one restart). Each alert must be actionable, justified by an SLO or data, and linked to a runbook. Two severities only: page and ticket. Details in harness-operate:slo-alerts-and-runbooks.
Instrumentation is code and can be wrong. Before calling the work done:
| Rationalization | Reality |
|---|---|
| "I'll add logging after it works." | "After" means after the first incident, the costliest time to find out you are blind. |
| "More logs means more observability." | Unstructured noise slows incidents down. Three queryable events beat three hundred prose lines. |
| "Plain print statements are fine for now." | They cannot be filtered, correlated or alerted on. A structured logger costs minutes once. |
| "We'll look at dashboards when something breaks." | Dashboards built without questions show everything except the answer. |
| "Alert on everything, tune later." | A noisy pager trains people to ignore it; the tuning never happens. |
| "User ID as a metric label helps debugging." | It also overwhelms the metrics backend. Use logs and traces for that. |
| "Tracing is overkill for two services." | Two services already raise cross-service latency questions logs cannot answer. |
For a shorter list, see harness-core's observability checklist reference.
What SKILL.md sets; muted values are Claude Code's defaults
2 plugins ship this exact skill · first indexed Nov 17, 2026
5 skills in this plugin
/cost-reviewEstimates, reviews and caps the money a change can spend, covering cost estimates before building, anomaly review, budgets with hard ceilings, approval for new recurring or open-ended spend, and guards against runaway loops. Use when adding calls to a billed API or cloud service, scheduled jobs, always-on processes, polling, data scans, or investigating a cost spike./incident-response-and-postmortemGuides handling of a production incident from triage through mitigation, communication, rollback decision and a blameless postmortem with tracked follow-ups. Use when an alert fires, users report an outage or degradation, a release misbehaves in production, or after an incident when a postmortem is due./Other plugins' skills for the same job
npx claudepluginhub ivedha-tech/platformnex-abilities --plugin harness-operate