agentleFS
DevelopersGlobalDevelopersGlobal/ai-agent-skills/skills/observability/SKILL.md

observability

Skill69 starsChanged 7 months agoMITView on GitHub

Structured logging, distributed tracing, and alerting for AI systems and traditional services. You can't fix what you can't see.

59 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use parallel-agent-orchestration, ci-cd and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • itallstartedwithaideaSkill

    parallel-agent-orchestration

    Parallel Agent Orchestration is the discipline of dispatching, coordinating, and aggregating results from multiple concurrent subagents to dramatically accelerate complex tasks.

    Also in 3 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 8 projects that use this

  • AnthropicSkill

    incident-response

    Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.

    Also in 16 projects that use this

  • zebbernSkill

    caching

    Caching strategies — invalidation, TTL guidelines, cache keys, cache layers, and when not to cache. Use when implementing or reviewing caching logic.

    Also in 3 projects that use this

  • terrene-foundationSkill

    architecture-decisions

    Architecture decision guides for Kailash SDK including framework selection (Core SDK vs DataFlow vs Nexus vs Kaizen), runtime selection (Async vs Sync), database selection (PostgreSQL vs SQLite), node selection, and test tier selection. Use when asking about 'which framework', 'choose framework', 'which runtime', 'which database', 'which node', 'architecture decision', 'when to use', 'Core SDK vs DataFlow', 'PostgreSQL vs SQLite', 'AsyncLocalRuntime vs LocalRuntime', or 'test tier selection'.

    Also in 3 projects that use this

  • mmondoraSkill

    finops

    Cloud cost management as an architectural discipline. Unit economics, right-sizing, GCP free tier optimization, budget alerts, serverless-first. Use when making infrastructure decisions, estimating costs, or optimizing cloud spending.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before deploying any new service to production

    line 17
  2. Distinctive:

    When adding AI agent capabilities to an existing system

    line 18
  3. Distinctive:

    When debugging production issues

    line 19
  4. Distinctive:

    When designing multi-agent pipelines

    line 20
  5. Very specific:

    All logs must be structured (JSON, not free text).

    line 26
  6. Very specific:

    Every request gets a unique traceId generated at the entry point.

    line 39
  7. Distinctive:

    Use OpenTelemetry as the standard instrumentation library.

    line 42
  8. Distinctive:

    Verify: Every alert has a runbook.

    line 62

“Common” is measured: kept by at least 6 in 10 of the 42 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

Observability is the ability to understand the internal state of a system from its external outputs. For AI systems this is especially critical: agents make decisions that are hard to interpret without detailed telemetry.

The three pillars: Logs (what happened), Traces (how long and where), Metrics (aggregate health).

When to Use

  • Before deploying any new service to production
  • When adding AI agent capabilities to an existing system
  • When debugging production issues
  • When designing multi-agent pipelines

Process

Step 1: Structured Logging

  1. All logs must be structured (JSON, not free text). Fields: timestamp, level, service, traceId, message, context.
  2. Log levels used correctly:
    • ERROR: Something failed that requires immediate attention
    • WARN: Something unexpected happened but the system recovered
    • INFO: Normal significant events (requests received, jobs completed)
    • DEBUG: Detailed diagnostic information (off in production by default)
  3. Never log secrets, PII, or auth tokens.
  4. For AI systems, log: prompt inputs (sanitized), model outputs, token counts, latency, model version.

Verify: Logs are structured JSON. No secrets in logs. AI interactions logged.

Step 2: Distributed Tracing

  1. Every request gets a unique traceId generated at the entry point.
  2. traceId is propagated through all downstream calls (HTTP headers, message queues, agent calls).
  3. Each service/agent creates a span for its work, with: start time, end time, parent span ID.
  4. Use OpenTelemetry as the standard instrumentation library.

Verify: You can trace a single request across all services/agents in a single view.

Step 3: Metrics

  1. Define and track key metrics:
    • RED metrics: Rate (requests/sec), Errors (error rate %), Duration (latency p50/p95/p99)
    • AI-specific: Token usage, prompt cost, model latency, hallucination rate, retrieval precision
  2. Dashboards: one dashboard per service with RED metrics, one dashboard for AI system health.

Verify: RED metrics are tracked for every service. AI-specific metrics tracked for AI systems.

Step 4: Alerting

  1. Alerts must be actionable — every alert should have a runbook.
  2. Alert on symptoms (high error rate, high latency), not just causes.
  3. AI-specific alerts: token budget exceeded, model error rate spike, retrieval failure rate spike.
  4. On-call rotation: someone is responsible for every alert at all times.

Verify: Every alert has a runbook. On-call rotation defined.

Common Rationalizations (and Rebuttals)

ExcuseRebuttal
"We'll add monitoring after launch"You'll be fighting fires blind. Add it before.
"Console.log is enough"In production, console.log is noise. Structured logs with context are signals.
"The AI model handles it internally"Model internals are a black box. You must observe the inputs and outputs.

Verification

  • Structured JSON logging on all services
  • No secrets in logs
  • Distributed tracing with trace ID propagation
  • RED metrics tracked for all services
  • AI-specific metrics tracked (tokens, cost, latency)
  • Alerts configured with runbooks

References

  • production-deployment skill
  • multi-agent-orchestration skill
  • OpenTelemetry documentation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.