All skills
davila7 avatar

/datadog-cli

@1c194fd

Datadog CLI for searching logs, querying metrics, tracing requests, and managing dashboards. Use this when debugging production issues or working with Datadog observability.

Use this Skill: https://skilld.dev/gh/davila7/claude-code-templates/datadog-cli

This session only. Nothing lands on disk.

referenceslogs-commands.md

≈762 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Log Commands Reference

logs search

Search logs with filters.

npx @leoflores/datadog-cli logs search --query "<query>" [--from <time>] [--to <time>] [--limit <n>] [--sort <order>]
Flag Default Description
--query * Datadog search query
--from 15m Start time
--to now End time
--limit 100 Max results (max: 1000)
--sort -timestamp Sort order
npx @leoflores/datadog-cli logs search --query "service:api status:error" --from 1h --pretty

logs tail

Stream logs in real-time. Press Ctrl+C to stop.

npx @leoflores/datadog-cli logs tail --query "<query>" [--interval <seconds>]
Flag Default Description
--interval 2 Polling interval in seconds
npx @leoflores/datadog-cli logs tail --query "status:error" --pretty

logs trace

Find all logs for a distributed trace across services.

npx @leoflores/datadog-cli logs trace --id "<trace-id>" [--from <time>] [--to <time>]

Searches both @trace_id and @dd.trace_id attributes.

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

logs context

Get logs before and after a specific timestamp.

npx @leoflores/datadog-cli logs context --timestamp "<iso-timestamp>" [--before <time>] [--after <time>] [--service <svc>]
Flag Default Description
--before 5m Time window before
--after 5m Time window after
--service - Filter by service
npx @leoflores/datadog-cli logs context --timestamp "2024-01-15T10:30:00Z" --service api --before 5m --after 2m --pretty

logs patterns

Group similar log messages to find patterns. Replaces UUIDs, numbers, IPs, etc.

npx @leoflores/datadog-cli logs patterns --query "<query>" [--from <time>] [--limit <n>]

Returns top 50 patterns with counts and sample messages.

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

logs compare

Compare log counts between current period and previous period.

npx @leoflores/datadog-cli logs compare --query "<query>" --period <time>

Shows absolute and percentage change with directional arrows.

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

logs multi

Run multiple queries in parallel.

npx @leoflores/datadog-cli logs multi --queries "name1:query1,name2:query2" [--from <time>]
npx @leoflores/datadog-cli logs multi --queries "errors:status:error,warnings:status:warn" --from 1h --pretty

logs agg

Aggregate logs by facet.

npx @leoflores/datadog-cli logs agg --query "<query>" --facet <facet> [--from <time>]

Common facets: status, service, host, @http.status_code, @error.kind

npx @leoflores/datadog-cli logs agg --query "*" --facet status --from 1h --pretty

Source: SKILL.md on GitHub

2 warnings5mo5 checks · Risk MEDIUM
  • Gen Agent Trust Hub7mo

    This skill downloads and executes an untrusted third-party CLI package (@leoflores/datadog-cli) from npm via npx. It also processes external log data which provides a vector for indirect prompt injection, potentially allowing attackers to influence agent actions through malicious log entries.

  • Socket6mo

    No alerts

  • Snyk7mo

    Risk: LOW · No issues

  • Runlayer7mo

    7/7 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 1c194fd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 15 hours ago.

Activeupdated 8 months ago

README badge

README badge for davila7/claude-code-templates/datadog-cli