Percerno Skillsbeta
← everything it can do · other

Datadog Cli TEXT

Executes Datadog CLI commands to search logs, query metrics, trace distributed requests, and manage dashboards for observability and debugging.

5 uses this weeksource softaworkslicence MIT
Quality gate: FAIL · better answers · measured 2026-10-23
Blind-judged against the bare model on 2 requests: average lift -9.5 points (specificity, structure, method, fit).
won 0/2, lift -9.5, tokens ×103.35
Security scan: clean · 2026-10-24 · 7 files · ran in sandbox
no network calls, shell tricks, credential access or instruction tampering found in its files.

Try asking

Say it in your own words; the assistant finds this recipe by itself. Examples:

“Hent alle 500-fejl i 'checkout'-tjenesten fra de sidste 15 minutter.”
“Kør en trace på ID abc123def456 og vis resultatet pænt formateret.”
“Sammenlign fejlantallet for den sidste time med den foregående time for at se, om stigningen er ny.”
“Search for all 500 errors in the 'checkout' service from the last 15 minutes.”
“npx @leoflores/datadog-cli logs trace --id abc123def456 --pretty”
“Compare the error count for the last hour against the previous hour to see if the spike is new.”
Try this skill from Claude, ChatGPT or a chat on your own page. Free plan, no credit card.Get started free

Good for

datadogclilogsmetricstracingdebuggingobservabilitydashboardsincident-response

Not for

Do not use this skill for configuring Datadog agents, setting up APM integrations, or modifying infrastructure-as-code definitions for Datadog. For visualizing data in the browser or managing API keys via the UI, use the Datadog web interface or API directly instead.

Details

When it is the right choice

Use this skill when you need to query Datadog logs or metrics via the command line to debug production issues. It is ideal for tracing specific request IDs, comparing error rates between time periods, or retrieving real-time log streams for triage.

The full recipe the assistant reads

Datadog CLI

A CLI tool for AI agents to debug and triage using Datadog logs and metrics.

Required Reading

You MUST read the relevant reference docs before using any command: - Log Commands - Metrics - Query Syntax - Workflows - Dashboards

Setup

Environment Variables (Required)

export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-app-key"

Get keys from: https://app.datadoghq.com/organization-settings/api-keys

Running the CLI

npx @leoflores/datadog-cli <command>

For non-US Datadog sites, use --site flag:

npx @leoflores/datadog-cli logs search --query "*" --site datadoghq.eu

Commands Overview

Command Description
logs search Search logs with filters
logs tail Stream logs in real-time
logs trace Find logs for a distributed trace
logs context Get logs before/after a timestamp
logs patterns Group similar log messages
logs compare Compare log counts between periods
logs multi Run multiple queries in parallel
logs agg Aggregate logs by facet
metrics query Query timeseries metrics
errors Quick error summary by service/type
services List services with log activity
dashboards Manage dashboards (CRUD)
dashboard-lists Manage dashboard lists

Quick Examples

Search Errors

npx @leoflores/datadog-cli logs search --query "status:error" --from 1h --pretty

Tail Logs (Real-time)

npx @leoflores/datadog-cli logs tail --query "service:api status:error" --pretty

Error Summary

npx @leoflores/datadog-cli errors --from 1h --pretty

Trace Correlation

npx @leoflores/datadog-cli logs trace --id "abc123def456" --pretty

Query Metrics

npx @leoflores/datadog-cli metrics query --query "avg:system.cpu.user{*}" --from 1h --pretty

Compare Periods

npx @leoflores/datadog-cli logs compare --query "status:error" --period 1h --pretty

Global Flags

Flag Description
--pretty Human-readable output with colors
--output <file> Export results to JSON file
--site <site> Datadog site (e.g., datadoghq.eu)

Time Formats

  • Relative: 30m, 1h, 6h, 24h, 7d
  • ISO 8601: 2024-01-15T10:30:00Z

Incident Triage Workflow

# 1. Quick error overview
npx @leoflores/datadog-cli errors --from 1h --pretty

# 2. Is this new? Compare to previous period
npx @leoflores/datadog-cli logs compare --query "status:error" --period 1h --pretty

# 3. Find error patterns
npx @leoflores/datadog-cli logs patterns --query "status:error" --from 1h --pretty

# 4. Narrow down by service
npx @leoflores/datadog-cli logs search --query "status:error service:api" --from 1h --pretty

# 5. Get context around a timestamp
npx @leoflores/datadog-cli logs context --timestamp "2024-01-15T10:30:00Z" --service api --pretty

# 6. Follow the distributed trace
npx @leoflores/datadog-cli logs trace --id "TRACE_ID" --pretty

See workflows.md for more debugging workflows.

Files in this skill (8)
  • LICENSE
  • README.md
  • SKILL.md
  • references/dashboards.md
  • references/logs-commands.md
  • references/metrics.md
  • references/query-syntax.md
  • references/workflows.md
Where it comes from

Vendored from softaworks/agent-toolkit, commit 3027f20f3181, path skills/datadog-cli, licence MIT. The upstream licence file ships inside the skill.