agent-observability-spec

agent-observability-spec is a cursor rule for Cursor from mohitagw15856/pm-claude-skills. It costs 92 tokens per session (1,325 once invoked), scanned A, original, MIT.

A production monitoring plan for an AI agent or language-model feature. It defines what each request records, which measures to calculate, and when to alert someone.

In plain words
What is it for?
It helps teams design traces, quality and cost metrics, alert thresholds, sampling, data retention, and privacy rules.
Why use it?
It makes model behavior visible when the system gives wrong answers, takes bad actions, costs too much, or fails silently.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit It helps teams design traces, quality and cost metrics, alert thresholds, sampling, data retention, and privacy rules.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mohitagw15856/pm-claude-skills/agent-observability-spec
About the project

PM Skills is a collection of plain-Markdown instructions that teach AI assistants structured methods for handling professional, personal, and life-admin tasks. People use it with Claude, ChatGPT, Gemini, Cursor, Codex, and other supported agents for work such as writing product requirements, reviewing documents, or planning difficult situations.

mohitagw15856/pm-claude-skills · 1,352 stars · on GitHub · mohitagw15856.github.io

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.

Clone the repo
git clone --depth 1 https://github.com/mohitagw15856/pm-claude-skills

Made for: Cursor.

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 agent-observability-spec

README.md
[![agentmods](https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/agent-observability-spec/github.svg)](https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/agent-observability-spec)
Your own site
<a href="https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/agent-observability-spec"><img src="https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/agent-observability-spec/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 agent-observability-spec

Your own site · 80×15
<a href="https://agentmods.dev/rules/mohitagw15856/pm-claude-skills/agent-observability-spec"><img src="https://agentmods.dev/badge/rules/mohitagw15856/pm-claude-skills/agent-observability-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 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,325 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.00092 $0.01325
Opus 5 $0.00046 $0.00662
Sonnet 5 $0.00018 $0.00265
Haiku 4.5 $0.00009 $0.00133

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

Security

Grade A, and why

agent-observability-spec 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 7d 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.

exports/cursor/pm-agentops/agent-observability-spec/agent-observability-spec.mdc · 92 lines

How it starts

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

Agent Observability Spec Skill

You can't fix what you didn't record. For LLM systems the unit of observability is the trace — everything the model saw and did — because behaviour, not uptime, is what fails. This skill specifies what to capture, what to compute from it, and when to page someone.

What This Skill Produces

  • A trace schema: per-request spans and the fields each must carry
  • Metric definitions across health, quality, cost, and behaviour — each with a threshold and owner
  • A sampling and retention policy that keeps cost sane and debugging possible
  • A privacy note: what logged content contains, who can see it, and how long it lives

Required Inputs

Ask for (if not already provided):

  • The system's shape — single LLM call, RAG pipeline, or multi-step tool-using agent
  • Traffic volume and cost sensitivity — full tracing at 10M req/day is a budget decision
  • What "misbehaving" means here — the two or three failure modes that matter most (wrong facts? wrong actions? cost? refusals?)
  • Existing observability stack (Datadog, Langfuse, OTel, homegrown) — spec into it, not around it

Trace Schema

Every request produces one trace; every model call, retrieval, guardrail check, and tool execution is a span. Minimum fields:

Span Must capture
Request root request id, user/session (pseudonymous), feature + prompt version, model id, total tokens, total cost, latency, terminal status
Model call full input context (or content-addressed ref), output, finish reason, tokens in/out, cached-token share, temperature
Retrieval query, top-k ids + scores, which chunks entered the context
Tool call tool name, arguments, result (or ref), duration, error
Guardrail check name, verdict, and what it did (blocked / rewrote / flagged)
User signal edits, regenerates, thumbs, abandonment — joined to the trace id

The test of the schema: an engineer can replay any incident from its trace alone (see agent-incident-postmortem).

Read the full file on GitHub · 92 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. 7d ago First seen · 92 lines · 92 tokens per session scan A a6df1064ac51

Subscribe to this mod's changes

agent-observability-spec is a cursor rule published in the GitHub repository mohitagw15856/pm-claude-skills (1,352 stars, last pushed 2d ago), licensed MIT. It adds 92 tokens to every session and 1,325 once invoked, about $0.0005 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-09-03.