Provides opinionated guidance on instrumentation, logging, tracing, alerting, and production feedback. Use when designing telemetry, defining SLIs/SLOs, or investigating production outcomes.
Ships in usetemi. 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.
Read when SKILL.md points to them.
The goal is explainability. The evidence needed to explain a production
outcome exists, and a fresh investigator can find it. The investigator did not
write the code. Without the author's memory and without reading the source, they
must establish three things: what happened, whom it affected, and what separated
the failed work from the work that succeeded. Load references/vocabulary.md
when you define an SLI or SLO, or choose among metrics, records, and traces.
Use the project's existing logger; do not add a second one. If there is none, use the language's standard structured logger, writing JSON to stdout or stderr. Never write an unstructured log line: interpolated values are data thrown away. A record has a literal event name, typed fields, a time, and a severity. Fix each field's meaning, type, and unit across the codebase.
result is one of succeeded, failed, skipped, retried, degraded,
unknown. A reason code comes from a closed list declared in one place:
payment.failure.reason_code: card_declined. Often the domain's event names are
that list, so the domain event names the cause. Scope field names:
payment.result.
Bind context to a logger object as the request evolves: the request or job id first, the user id after authentication, the operation id when the operation starts. Later records carry them; never repeat them per call site.
Instrument the owner of a unit of work (a request, a job, or a durable business operation), not every wrapper it passes through. A terminal record is the last record an operation writes before it exits, with its outcome, duration, and reason code. Write one on every exit path, including a throw: a missing path is where the question lands.
Unknown is its own outcome: a side effect that timed out is unknown. Check
the downstream state before retrying, or risk a duplicate. Write one record per
attempt, with its attempt number, plus one terminal record for the whole
operation. Long-running work emits progress records at a fixed interval, so slow
and dead runs differ.
Add what automatic instrumentation cannot: the decision, the state, the caller's outcome. Carry the operation id (request or job id) across calls, queues, and retries through the existing context propagation; invent no new one.
A count is a filter plus a group-by, never a parse. Ask the question first: "How many sends fell back to fax last week, by cause?" names the event, filter, and group-by. Batch counts sum to the total, so zero means idle work and a mismatch means a bug. Log every run of a scheduled sweep, including empty runs, or an empty sweep looks stopped.
| Level | Use |
|---|---|
debug | Diagnostic detail. Off in production; on for an investigation. |
info | A decision taken, an outcome, an audit fact. |
warn | A recovered or expected failure, or a threshold reached. |
error | Unexpected terminal failure, exhausted recovery, broken invariant. |
error spends a person's attention now, so it alerts. Every uncaught
exception reaches an alert. A catch rethrows or writes the terminal record. If
unhandled errors reach no alert yet, add that path in the same change, emitting
an error record.
Alert per event name, not per stack trace: one wrapper's stack mixes unrelated failures. The alert, log record, and any Slack post for one event come from one emit call, not from separate calls in business logic.
Metrics count; events explain. Ids and URLs go in the record, not metric labels. The terminal record is primary; a trace is secondary. Put the trace id on the record to reach the trace. Correlation is a contract. Propagated ids, not a shared backend, connect records; missing ids are a defect.
This applies when the project owns a shipper, collector, or transform. A drop or a prune writes a payload-free record saying so and how much. A transform that errors drops the record, so an unredacted payload cannot leak, and a scheduled heartbeat record that stops arriving is an alert.
Derive the SLI from terminal records of the promised outcome, like a delivered message, not HTTP status or CPU, which look healthy during failed journeys.
Record opaque ids and reason codes, never personal, clinical, or secret content. Truncating, hashing, or redacting a forbidden value still records it; a downstream scrubber is a backstop, not the rule. Cap record size at the source, pruning in a fixed order that keeps the event name, result, reason code, and ids.
Ship instrumentation in the same change as the behavior, with a test per exit path asserting exactly one terminal record. After release, run the record's question in production and confirm a hit; if you cannot, say so in the PR. Missing evidence is design feedback, fixed in code. Never infer a missing record: say it is absent.
What SKILL.md sets; muted values are Claude Code's defaults
/usetemi:observabilityfrom usetemi
npx claudepluginhub usetemi/skills --plugin usetemi7 skills in this plugin
/ask-clarifying-questionsConduct a clarification interview before writing code, investigating ambiguous bugs, or changing design or architecture, then use the resulting model of how the user decides to make implementation-time decisions on their behalf. Uses AskUserQuestion in Claude Code, request_user_input in Codex when exposed, or plain prose when no interactive question tool is available. Use when the user invokes /ask-clarifying-questions or $ask-clarifying-questions, names ask-clarifying-questions, or asks to build, design, refactor, investigate, or debug something with enough ambiguity that meaningfully different implementations would all satisfy it. The output is shared understanding in the current session; no file artifact./dddWrite, revise, or consolidate DOMAIN.md, a repository's domain model, by interviewing the user as the domain expert. Use to create DOMAIN.md, to model a domain with domain-driven design (ubiquitous language, entities, value objects, domain services, aggregates, domain events, rules and invariants), when a task introduces a term, rule, or concept absent from DOMAIN.md, when code and DOMAIN.md disagree, or to remove inconsistencies and redundancies from an existing DOMAIN.md. Produces the document only; it does not implement or refactor code.Other plugins' skills for the same job