skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
delexw/claude-code-misc51 installs

datadog-analyser

Analyse Datadog observability data including metrics, logs, monitors, incidents, SLOs, APM traces, RUM, security signals, and more. Use when asked to investigate infrastructure health, query metrics, search logs, check monitors, diagnose errors, or analyse any Datadog data.

How do I install this agent skill?

npx skills add https://github.com/delexw/claude-code-misc --skill datadog-analyser
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides a structured way to analyze Datadog observability data using the pup CLI. It implements several security best practices, including restricting the agent's execution environment to a specific set of allowed commands and explicitly preventing the exposure of sensitive API keys.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

  • Runlayerpass

    1 file scanned · No issues

What does this agent skill do?

Datadog Analyser

Investigate and analyse Datadog observability data using the pup CLI.

Inputs

Raw arguments: $ARGUMENTS

Infer from the arguments:

  • QUERY: what to analyse.
  • SINCE: (optional) UTC ISO8601 start of analysis window. When provided, convert to epoch seconds for pup --from flags (e.g. date -d "2026-03-20T02:30:00Z" +%s on Linux, or date -jf "%Y-%m-%dT%H:%M:%SZ" "2026-03-20T02:30:00Z" +%s on macOS).
  • UNTIL: (optional) UTC ISO8601 end of analysis window. When provided, convert to epoch seconds for pup --to flags where supported; otherwise omit (defaults to now).
  • SERVICE_HINT: (optional) Service name to prioritise in queries (filter monitors, logs, APM by this service first).

System Requirements

  • pup CLI installed — see https://github.com/datadog-labs/pup/blob/main/README.md
  • DD_API_KEY and DD_APP_KEY environment variables set. Important: When checking these variables, verify at least 2 times before concluding they are not set. Environment variables can appear unset due to shell context differences. Never expose the values — use existence checks only (e.g. test -n "$DD_API_KEY").
  • DD_SITE set if not using datadoghq.com (optional)

Output Directory

.datadog-analyser-tmp/
└── report.md    # Final analysis report

Execution

1. Verify Connection

Run pup test to confirm the CLI is configured and connected:

pup test

If this fails, use AskUserQuestion to inform the user that pup is not configured or DD_API_KEY/DD_APP_KEY are not set, and link to the setup guide: https://github.com/datadog-labs/pup/blob/main/README.md

Do NOT continue until pup test succeeds.

2. Discover Available Commands

Run pup agent guide to get the full list of available commands and usage patterns for this session:

pup agent guide

If pup agent guide is not available (command not found), use the known command reference below and continue.

3. Analyse

Based on QUERY, determine which pup commands are most relevant. Use --output=json (default) for all commands to get structured output. Run commands sequentially.

Time window rule — when QUERY contains a named day ("today", "yesterday") or a calendar range, compute the window using local day boundaries, not UTC calendar days. A user saying "today" means since local midnight, so an event at 11am local is included even if it falls on a different UTC date.

For relative durations ("last 1h", "last 24h"), pass them directly as pup relative strings: --from="1h", --from="24h".

For named days, compute the local day boundary as epoch seconds and pass to --from/--to:

# Start of local today as epoch (Linux / macOS)
date -d "$(date +%Y-%m-%d) 00:00:00" +%s          # Linux
date -jf "%Y-%m-%d %H:%M:%S" "$(date +%Y-%m-%d) 00:00:00" +%s  # macOS
# Current time as epoch
date +%s
# Start of local yesterday
date -d "$(date -d yesterday +%Y-%m-%d) 00:00:00" +%s          # Linux
date -jf "%Y-%m-%d %H:%M:%S" "$(date -v-1d +%Y-%m-%d) 00:00:00" +%s  # macOS

When SINCE and UNTIL are provided as UTC ISO8601, convert each to epoch seconds and use them for all --from/--to flags instead of inferring time windows from QUERY. This ensures all Datadog queries cover exactly the same window as the other PIR sub-skills:

# Linux
SINCE_EPOCH=$(date -d "2026-03-20T02:30:00Z" +%s)
UNTIL_EPOCH=$(date -d "2026-03-20T06:00:00Z" +%s)
# macOS
SINCE_EPOCH=$(date -jf "%Y-%m-%dT%H:%M:%SZ" "2026-03-20T02:30:00Z" +%s)
UNTIL_EPOCH=$(date -jf "%Y-%m-%dT%H:%M:%SZ" "2026-03-20T06:00:00Z" +%s)

When SERVICE_HINT is provided, prioritise it in queries:

  • Filter monitors: pup monitors search --query="service:<SERVICE_HINT>"
  • Scope log searches with service:<SERVICE_HINT> in the query string
  • Focus APM traces on that service first

Common analysis patterns:

GoalCommands
Triggered/alerting monitorspup monitors list, pup monitors search --query="status:alert"
Error logspup logs search --query="status:error" --from="1h"
Metric trendpup metrics query --query="<metric>" --from="<window>"
Active incidentspup incidents list
SLO healthpup slos list, pup slos status <id>
APM service healthpup apm services, pup apm dependencies
Security signalspup security signals list, pup security findings search
Error trackingpup error-tracking issues search --query="<service>"
Synthetics failurespup synthetics tests list
CI failurespup cicd pipelines list, pup cicd events list

All commands default to JSON output. Use flags like --from, --to, --query, --tags to narrow scope. Refer to pup <command> --help for available flags.

4. Report

All timestamps in the report must use current agent's local timezone (detect via system clock), not UTC. Format: 2026-03-20 15:30 NZDT (with TZ abbreviation). Do NOT use UTC in user-facing report sections — this includes timestamps that come directly from API responses (e.g. last_triggered, overall_state_modified, event times). Convert every timestamp to local time before writing it to the report.

Write a structured analysis to .datadog-analyser-tmp/report.md using the Write tool:

  1. Summary — Overall health status and key findings
  2. Details — Breakdown of findings per domain (monitors, logs, metrics, etc.)
  3. Anomalies — Anything alerting, degraded, or unusual
  4. Recommendations — Suggested follow-up actions

Inform the user of the report location: .datadog-analyser-tmp/report.md

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/delexw/claude-code-misc/datadog-analyser">View datadog-analyser on skillZs</a>