observe

observe is a command for Claude Code from studioKjm/ai-harness-template. It costs 25 tokens per session (1,702 once invoked), scanned A, original, MIT.

A command for designing the metrics, logs, and traces a feature or system component should produce before it is implemented. These signals are records used to understand performance, errors, and availability.

In plain words
What is it for?
Use it to define observability plans for stories, features, endpoints, or modules; specify metrics and log events; check coverage of files and symbols; and move a plan through design, instrumentation, measurement, and review.
Why use it?
It prevents monitoring from being added as an afterthought, when important events or measurements may already be missing. It also provides a way to track whether the planned signals are defined, added to the code, and receiving production data.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .harness/methodologies/observability-first/scripts/obs.py \.

Part of the harness plugin — 44 commands, 11 agents shipped together

Good fit Use it to define observability plans for stories, features, endpoints, or modules; specify metrics and log events; check coverage of files and symbols; and move a plan through design, instrumentation, measurement, and review.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/studioKjm/ai-harness-template
agentmods
npx agentmods add commands/studiokjm/ai-harness-template/observe

Made for: Claude Code.

Or install harness, the plugin that ships this one along with the rest of its 44 commands, 11 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 observe

README.md
[![agentmods](https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/observe.svg)](https://agentmods.dev/commands/studiokjm/ai-harness-template/observe)
Your own site
<a href="https://agentmods.dev/commands/studiokjm/ai-harness-template/observe"><img src="https://agentmods.dev/badge/commands/studiokjm/ai-harness-template/observe.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,702 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.00025 $0.01702
Opus 5 $0.00013 $0.00851
Sonnet 5 $0.00005 $0.00340
Haiku 4.5 $0.00003 $0.00170

Measured 8d ago against content hash 63393ae0bd24, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

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

methodologies/observability-first/commands/observe.md · 190 lines

How it starts

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

/observe — Define Observability Before Implementation

Telemetry is a design output, not a retrofit.

When to use

  • New story with performance or availability AC
  • New endpoint added
  • Logic-layer module touches business-critical operation
  • Before writing implementation code (so signals are designed in, not bolted on)

Usage

/observe define <slug> --target-kind story|feature|endpoint|module --target-ref REF
/observe list-specs [--status draft|defined|instrumented|measuring|review-due]
/observe show-spec <spec-id>
/observe instrument <spec-id>     # defined → instrumented (after coverage verified)
/observe measure <spec-id>        # instrumented → measuring (production data flowing)
/observe coverage <spec-id> --files F1 [F2 ...] --symbols S1 [...]
/observe add-metric <spec-id> --name N --type counter|gauge|histogram|summary --question "..."
/observe add-log <spec-id> --event E --level info|warn|error --field F1 [--field F2:pii]

For SLOs, see /observe-slo.

State machine

[draft] → [defined] → [instrumented] → [measuring] → [review-due]
                                            ↑              ↓
                                            └──────────────┘  (90d cycle)
State Meaning Move when
draft Spec being written First metric/log/trace added (auto)
defined Spec complete Code emits matching telemetry
instrumented Code verified Production data flowing
measuring SLOs computable 90 days passed (review-due triggered)
review-due Time for refresh After review, back to measuring

Instructions

Step 1 — Locate the script

.harness/methodologies/observability-first/scripts/obs.py

Step 2 — Run the requested subcommand

# Define spec for a story
python3 .harness/methodologies/observability-first/scripts/obs.py \
  define refund-api \
  --target-kind story \
  --target-ref st-2026-04-30-refund \
  --description "Refund API observability"

# Add metrics one at a time
python3 .harness/methodologies/observability-first/scripts/obs.py \
  add-metric obs-2026-04-30-refund-api \
  --name "refund_request_total" \
  --type counter \
  --labels "method" "status_code" "merchant_id" \
  --question "How many refund requests, segmented by outcome?"

python3 .harness/methodologies/observability-first/scripts/obs.py \
  add-metric obs-2026-04-30-refund-api \
  --name "refund_processing_duration_ms" \
  --type histogram \
  --labels "merchant_id" \
  --question "Distribution of refund processing time" \
  --unit "milliseconds"

# Add log events
python3 .harness/methodologies/observability-first/scripts/obs.py \
  add-log obs-2026-04-30-refund-api \
  --event "refund.requested" \
  --level info \
  --field "merchant_id" \
  --field "amount" \
  --field "user_id:pii"

Read the full file on GitHub · 190 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. 8d ago First seen · 190 lines · 25 tokens per session scan A 63393ae0bd24

Subscribe to this mod's changes

observe is a command published in the GitHub repository studioKjm/ai-harness-template (43 stars, last pushed 3mo ago), licensed MIT. It adds 25 tokens to every session and 1,702 once invoked, about $0.0001 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-08-30.