DA

datadog-cli

This CLI tool allows agents to search logs, stream events, query metrics, and manage dashboards for incident triage.

Install

mkdir -p .claude/skills/datadog-cli && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5199" && unzip -o skill.zip -d .claude/skills/datadog-cli && rm skill.zip

Installs to .claude/skills/datadog-cli

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Datadog CLI for searching logs, querying metrics, tracing requests, and managing dashboards. Use this when debugging production issues or working with Datadog observability.
173 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Search and filter logs
  • Stream real-time logs
  • Query timeseries metrics
  • Trace distributed requests
  • Manage dashboard lifecycles

How it works

The CLI interacts with Datadog APIs to execute queries, stream events, and perform CRUD operations on dashboards based on user-provided flags.

Inputs & outputs

You give it
Query parameters and time ranges
You get back
Log entries or metric data points

When to use datadog-cli

  • Search and filter error logs by service
  • Query timeseries metrics for performance analysis
  • Stream logs in real-time for live debugging
  • Manage and update dashboard lists

About this skill

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:

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.

When not to use it

  • When performing complex dashboard design not supported by CLI

Prerequisites

Datadog API and APP keys

Limitations

  • Requires valid API and APP keys
  • Limited by Datadog API rate limits

How it compares

It allows for programmatic log and metric triage directly from the terminal, bypassing the web UI for common debugging tasks.

Compared to similar skills

datadog-cli side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
datadog-cli (this skill)16moReviewIntermediate
gcloud-usage17moNo flagsIntermediate
devops-troubleshooter14moNo flagsAdvanced
autotel01moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

software-architecture

davila7

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

333868

planning-with-files

davila7

Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.

233106

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

humanizer

davila7

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases. Credits: Original skill by @blader - https://github.com/blader/humanizer

90175

game-development

davila7

Game development orchestrator. Routes to platform-specific skills based on project needs.

70195

You might also like

gcloud-usage

fcakyon

This skill should be used when user asks about "GCloud logs", "Cloud Logging queries", "Google Cloud metrics", "GCP observability", "trace analysis", or "debugging production issues on GCP".

14

devops-troubleshooter

sickn33

Expert DevOps troubleshooter specializing in rapid incident response, advanced debugging, and modern observability. Masters log analysis, distributed tracing, Kubernetes debugging, performance optimization, and root cause analysis. Handles production outages, system reliability, and preventive monitoring. Use PROACTIVELY for debugging, incident response, or system troubleshooting.

12

autotel

jagreehal

Use when instrumenting with trace/span/track, reviewing code for logging and observability patterns, converting console.log to wide events, adding structured errors, setting up canonical log lines, configuring init(), adding subscribers, or working in the autotel monorepo.

00

ai-debug-harness

DeandreFu

Self-driving Electron + Node debug harness with NDJSON logs, Playwright E2E, doctor preflight, and a YAML-frontmatter cookbook of known causes. Use when a voice-chat E2E flow misbehaves locally, audio publish silently fails, the agent worker emits warnings, or any LiveKit/Electron/Fastify error appe

00

analyze-prod-issue

MaxPayne89

>-

00

service-mesh-observability

wshobson

Implement comprehensive observability for service meshes including distributed tracing, metrics, and visualization. Use when setting up mesh monitoring, debugging latency issues, or implementing SLOs for service communication.

574

Search skills

Search the agent skills registry