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.

referencesworkflows.md

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

Common Workflows

Incident Triage

Step-by-step workflow for investigating production issues.

# 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:payment-api" --from 1h --pretty

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

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

Real-time Debugging

Monitor logs as they arrive.

# Stream all errors
npx @leoflores/datadog-cli logs tail --query "status:error" --pretty

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

# Monitor deployments
npx @leoflores/datadog-cli logs tail --query "service:deploy" --pretty

Service Health Check

Assess overall service health.

# List all services
npx @leoflores/datadog-cli services --from 24h --pretty

# Check error distribution for a service
npx @leoflores/datadog-cli logs agg --query "service:api" --facet status --from 1h --pretty

# Check CPU/memory usage
npx @leoflores/datadog-cli metrics query --query "avg:system.cpu.user{service:api}" --from 1h --pretty
npx @leoflores/datadog-cli metrics query --query "avg:system.mem.used{service:api}" --from 1h --pretty

# Error summary for service
npx @leoflores/datadog-cli errors --service api --from 24h --pretty

Export for Sharing

Save results to files for reports or sharing.

# Save search results
npx @leoflores/datadog-cli logs search --query "status:error" --from 1h --output errors.json --pretty

# Save error summary
npx @leoflores/datadog-cli errors --from 24h --output error-report.json --pretty

# Save metrics data
npx @leoflores/datadog-cli metrics query --query "avg:system.cpu.user{*}" --from 24h --output cpu-metrics.json --pretty

Multi-Query Investigation

Run parallel queries for comprehensive view.

# Compare error types across services
npx @leoflores/datadog-cli logs multi \
  --queries "api-errors:service:api status:error,payment-errors:service:payment status:error,auth-errors:service:auth status:error" \
  --from 1h --pretty

⚠️ Safe Dashboard Update

CRITICAL: Dashboard updates are destructive and replace the entire dashboard.

Follow the Safe Dashboard Update Workflow in dashboards.md to avoid data loss.

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 13 hours ago.

Activeupdated 8 months ago

README badge

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