Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
softaworks avatar

Datadog Cli

  • 556 installs
  • 2.3k repo stars
  • Updated March 5, 2026
  • softaworks/agent-toolkit

datadog-cli is a Claude Code skill that exposes Datadog log, metric, trace, and dashboard CLI commands for developers who need live production observability data inside the coding agent.

About

datadog-cli is an agent-toolkit skill that teaches coding agents to debug and triage using Datadog through a structured CLI workflow. Before any command, agents must read bundled reference docs for log commands, metrics, query syntax, workflows, and dashboards. Setup requires DD_API_KEY and related Datadog environment variables. Developers reach for datadog-cli when investigating production errors, correlating traces with log lines, or pulling dashboard context during incident response without switching to the Datadog web UI. The skill maps common observability tasks—log search, metric queries, request tracing—to documented command patterns agents can run from the terminal.

  • Search, tail, and compare production logs with advanced filters and pattern detection
  • Query metrics, run aggregations, and inspect distributed traces in a single CLI
  • Supports parallel multi-queries, context lookup before/after timestamps, and real-time streaming
  • Works with any Datadog site via --site flag and requires only API + APP keys
  • Includes mandatory reference docs for logs, metrics, query syntax, workflows and dashboards

Datadog Cli by the numbers

  • 556 all-time installs (skills.sh)
  • +14 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #358 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/softaworks/agent-toolkit --skill datadog-cli

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs556
repo stars2.3k
Last updatedMarch 5, 2026
Repositorysoftaworks/agent-toolkit

How do coding agents query Datadog logs and metrics?

Let their coding agent query live logs, metrics, traces and dashboards directly from Datadog without leaving the IDE.

Who is it for?

Developers debugging production incidents who already use Datadog and want agents to run observability queries from the terminal.

Skip if: Teams without Datadog accounts or workflows that only need local unit-test debugging without production telemetry.

When should I use this skill?

A developer asks to search Datadog logs, query metrics, trace requests, or inspect dashboards during production debugging.

What you get

Log search results, metric time series, trace spans, and dashboard context pulled via CLI command output.

  • Log query results
  • Metric and trace outputs

Files

SKILL.mdMarkdownGitHub ↗

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

CommandDescription
logs searchSearch logs with filters
logs tailStream logs in real-time
logs traceFind logs for a distributed trace
logs contextGet logs before/after a timestamp
logs patternsGroup similar log messages
logs compareCompare log counts between periods
logs multiRun multiple queries in parallel
logs aggAggregate logs by facet
metrics queryQuery timeseries metrics
errorsQuick error summary by service/type
servicesList services with log activity
dashboardsManage dashboards (CRUD)
dashboard-listsManage 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

FlagDescription
--prettyHuman-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.

Related skills

How it compares

Use datadog-cli when production telemetry already lives in Datadog; use local log tailing skills for pre-deploy debugging only.

FAQ

What credentials does datadog-cli require?

datadog-cli requires Datadog environment variables including DD_API_KEY before agents run log, metric, or trace commands. Reference docs under references/ define setup and per-command syntax.

Which Datadog surfaces does datadog-cli cover?

datadog-cli covers log search, metrics queries, request tracing, and dashboard management. Agents must read logs-commands.md, metrics.md, query-syntax.md, workflows.md, and dashboards.md first.

Cloud & Infrastructuremonitoringinfra

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.