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.
npx agentmods add skills/sawrus/agent-guides/observabilitynpx skills add sawrus/agent-guides --skill observabilitygit clone --depth 1 https://github.com/sawrus/agent-guidesWrote 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.
[](https://agentmods.dev/skills/sawrus/agent-guides/observability)<a href="https://agentmods.dev/skills/sawrus/agent-guides/observability"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/observability.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00018 | $0.01204 |
| Opus 5 | $0.00009 | $0.00602 |
| Sonnet 5 | $0.00004 | $0.00241 |
| Haiku 4.5 | $0.00002 | $0.00120 |
Grade A, and why
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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Observability Skill
Expertise: Structured JSON logging, OpenTelemetry distributed tracing, Prometheus/RED metrics, alert design.
Structured Logging
import structlog
import logging
# Configure once at app startup
structlog.configure(
processors=[
structlog.contextvars.merge_contextvars,
structlog.processors.add_log_level,
structlog.processors.TimeStamper(fmt="iso"),
structlog.processors.JSONRenderer(), # machine-parseable
],
logger_factory=structlog.PrintLoggerFactory(),
)
log = structlog.get_logger()
# Bind context per request (FastAPI middleware)
@app.middleware("http")
async def logging_middleware(request: Request, call_next):
request_id = request.headers.get("X-Request-ID") or str(uuid4())
structlog.contextvars.bind_contextvars(
request_id=request_id,
method=request.method,
path=request.url.path,
)
response = await call_next(request)
structlog.contextvars.unbind_contextvars("request_id", "method", "path")
return response
# Usage in service/repository layer
log.info("order.created", order_id=order.id, user_id=user.id, amount=str(order.total))
log.warning("payment.retry", order_id=order_id, attempt=attempt, reason=str(error))
log.error("db.query_failed", table="orders", query_type="insert", exc_info=True)
What NOT to log
# ❌ Never log PII or secrets
log.info("user.login", email=user.email) # PII — omit or hash
log.debug("auth.token", token=access_token) # secret — never
# ✅ Log identifiers, not values
log.info("user.login", user_id=user.id)
log.info("auth.issued", token_jti=token_payload["jti"])
Distributed Tracing (OpenTelemetry)
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import BatchSpanProcessor
# Setup (once at startup)
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
trace.set_tracer_provider(provider)
tracer = trace.get_tracer("order-service")
# Instrument a service method
async def create_order(self, user_id: int, items: list) -> Order:
with tracer.start_as_current_span("order.create") as span:
span.set_attribute("user.id", user_id)
span.set_attribute("items.count", len(items))
try:
order = await self.repo.create(user_id, items)
span.set_attribute("order.id", order.id)
return order
except Exception as e:
span.record_exception(e)
span.set_status(trace.StatusCode.ERROR)
raise
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.
- 4d ago First seen · 163 lines · 18 tokens per session scan A 5be49dd34c6e
observability is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 3d ago), licensed MIT. It adds 18 tokens to every session and 1,204 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.
Other skills, from other repositories
documentation-and-adrs
Records decisions and documentation. Use when making architectural decisions, changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.
agent-orchestration-improve-agent
Systematic improvement of existing agents through performance analysis, prompt engineering, and continuous iteration.
agentmail
Email infrastructure for AI agents. Create accounts, send/receive emails, manage webhooks, and check karma balance via the AgentMail API.
luna
Reviews code for objective correctness, security, and reliability.
agent-self-scheduling
Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.
max
Cleans up and improves existing code without changing behavior.