kiro-rails: Command for Claude Code

.claude/commands/review-observability.md

review-observability is a command for Claude Code from sourjya/kiro-rails. It costs 33 tokens per session (2,924 once invoked), scanned A, original, MIT.

A review of the logs, measurements, traces, and request IDs that show what background jobs and data pipelines are doing in production.

In plain words
What is it for?
Use it to check structured logs, required fields, metrics, tracing, and correlation IDs—values that connect related events across services and jobs.
Why use it?
It identifies code paths that are silent or missing context, making failures difficult to diagnose during an incident.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is sourjya/kiro-rails's own configuration. It tells Claude Code how to work on kiro-rails itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kiro-rails configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sourjya/kiro-rails. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sourjya/kiro-rails/main/.claude/commands/review-observability.md
Clone the repo
git clone --depth 1 https://github.com/sourjya/kiro-rails

Made for: Claude Code.

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 review-observability

README.md
[![agentmods](https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-observability/github.svg)](https://agentmods.dev/commands/sourjya/kiro-rails/review-observability)
Your own site
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-observability"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-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 review-observability

Your own site · 80×15
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-observability"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-observability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,924 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.00033 $0.02924
Opus 5 $0.00016 $0.01462
Sonnet 5 $0.00007 $0.00585
Haiku 4.5 $0.00003 $0.00292

Measured 10d ago against content hash 154cbfd16639, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

review-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 10d 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/commands/review-observability.md · 161 lines

How it starts

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

Before scanning, read docs/decisions/ ADRs and any SLO/SLI documentation if they exist. Use documented observability decisions to distinguish intentional gaps (acceptable risk) from accidental omissions.

Act as a principal-level site reliability engineer and observability architect performing a comprehensive observability and production debuggability audit.

Your mission is not to verify that logging exists. It is to determine whether the observability layer would allow an on-call engineer, woken at 3 AM, to diagnose a production incident from telemetry alone - without reading source code, adding temporary logging, or asking the original developer. Telemetry that exists but cannot answer "what broke, where, and why" is noise, not observability.


Review Objectives

Identify:

  1. Structured logging quality. Log statements that use unstructured text (print, console.log, string interpolation) instead of JSON-structured output. Missing mandatory fields: timestamp, level, service, correlation_id, message. Inconsistent log level discipline - INFO used for debug-level detail, ERROR used for expected business conditions, WARN used without actionable follow-up. Sensitive data (PII, tokens, passwords, session IDs, internal paths) appearing in log output without masking. Log messages that are generic ("something went wrong", "error occurred") without operation context, input summary, or error category.

  2. Correlation ID and context propagation. Missing correlation ID generation at system entry points (API gateway, message consumer, scheduled job). HTTP requests that do not propagate correlation IDs via headers (X-Request-ID, X-Correlation-ID, or equivalent). Async boundaries (queues, event buses, background tasks, worker threads) where correlation context is lost. MDC/thread-local/async-local injection gaps where log statements within a request lack the correlation ID. Inconsistent correlation ID field naming across services (request_id vs correlation_id vs trace_id).

  3. Distributed tracing. Missing or incomplete OpenTelemetry (or equivalent) instrumentation. Span naming that is too generic (HTTP request, db query) to identify the operation. Errors not recorded on spans via span.record_exception() and span.set_status(ERROR). Missing sampling configuration - either no sampling (100% in production is expensive) or aggressive sampling that drops error traces. Trace-log correlation gaps where log entries cannot be joined to their parent trace via trace_id and span_id fields. Missing spans at service boundaries: outbound HTTP calls, database queries, cache operations, queue publish/consume.

  4. Metric naming conventions. Metric names that do not follow Prometheus (snake_case, unit suffix) or CloudWatch (PascalCase, namespace/dimension) conventions consistently. High-cardinality label values (user IDs, request paths with dynamic segments, full URLs) that will explode metric storage. Missing standard metrics: request rate, error rate, latency histograms (p50/p95/p99), saturation (queue depth, connection pool usage, thread pool utilization). Metrics that measure activity but not outcomes - counting invocations without tracking success/failure/duration. Inconsistent unit suffixes (_seconds vs _ms vs _duration vs no suffix).

  5. CloudWatch alarm coverage. Services, Lambda functions, queues, or databases without alarms on their critical failure modes. Missing composite alarms that correlate related signals (e.g., high error rate AND high latency AND queue depth growing). Alarms with static thresholds on metrics that have natural variance - missing anomaly detection where appropriate. Alarm actions that notify but do not escalate - no PagerDuty/SNS/OpsGenie integration for CRITICAL alarms. Missing alarms on: 5xx error rate, Lambda throttles and errors, SQS dead-letter queue depth, DynamoDB throttled requests, RDS connection count and CPU, API Gateway 4xx/5xx rates.

Read the full file on GitHub · 161 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. 10d ago First seen · 161 lines · 33 tokens per session scan A 154cbfd16639

Subscribe to this mod's changes

review-observability is a command published in the GitHub repository sourjya/kiro-rails (9 stars, last pushed 1mo ago), licensed MIT. It adds 33 tokens to every session and 2,924 once invoked, about $0.0002 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-31.