datadog-cli — Claude Code skill: what it does, how to install
Enables Claude Code to query logs and inspect metrics directly via Datadog CLI during incident triage.
npx claude-code-templates@latest --skill ai-research/datadog-cliWhat datadog-cli does
This skill guides Claude Code to run @leoflores/datadog-cli commands through npx. The agent can search log streams, aggregate facets, group error patterns, and inspect distributed traces.
The tool also handles timeseries metric checks and dashboard updates. Non-US regions can be targeted with the --site flag, such as datadoghq.eu. Output can be exported into a JSON file or formatted with --pretty.
Without valid DD_API_KEY and DD_APP_KEY environment variables, the CLI cannot authenticate against Datadog. Node.js must be installed to run the underlying commands.
What it helps with
- search recent error logs for a specific service
- correlate log entries around a distributed trace ID
- compare error counts across two time periods
- query timeseries system metrics
- cluster recurring log messages into patterns
Example prompts for the agent
- Search for recent API service errors from the past hour using datadog-cli.
- Compare error log volume between the current hour and the previous one.
- Find logs associated with trace ID
abc123def456and show the context.
How to install datadog-cli
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/datadog-cli2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill datadog-cli -a claude-code3Manually: put the files in place
~/.claude/skills/datadog-cli/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/datadog-cli/
Manually: put the files in place
.agents/skills/datadog-cli/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/datadog-cli/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates datadog-cli2Manually: put the files in place
.github/skills/datadog-cli/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/datadog-cliManually: put the files in place
.devin/skills/datadog-cli/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about datadog-cli
How to install datadog-cli in Claude Code?
Run npx claude-code-templates@latest --skill ai-research/datadog-cli or npx skills add davila7/claude-code-templates --skill datadog-cli -a claude-code. Alternatively, copy the skill definition to ~/.claude/skills/datadog-cli/SKILL.md.
What does the datadog-cli skill do?
It gives the agent instructions to execute Datadog queries using npx @leoflores/datadog-cli. Claude Code can triage production issues, inspect metrics, and analyze traces inside the terminal.
What credentials are required for datadog-cli?
Set the DD_API_KEY and DD_APP_KEY environment variables in your shell. If your organization is on an EU site, pass --site datadoghq.eu to your queries.