agentleFS
abdullahkhawerabdullahkhawer/devops-skills/skills/datadog-cli/SKILL.md

datadog-cli

Skill8 starsChanged 6 months agoApache-2.0View on GitHub

Perform Datadog operations using the Datadog HTTP API via curl. Use for querying metrics, logs, monitors, dashboards, and events.

  • Reads credentials

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the instance and rules below when constructing all Datadog API commands.

    line 8
  2. Distinctive:

    Update the table below with your Datadog site and credential file paths:

    line 12
  3. Distinctive:

    If the target environment is unclear, ask the user before running any command.

    line 19
  4. Distinctive:

    NEVER target any Datadog site not listed in the configuration table above.

    line 74
  5. Distinctive:

    NEVER print, display, log, or store the contents of any API/App key file.

    line 75
  6. Very specific:

    Always read keys inline with $(cat <FILE>) — never hardcode key values in a command.

    line 76
  7. Very specific:

    Always pass -s (silent) to curl and pipe through jq for readable output.

    line 77
  8. Distinctive:

    NEVER run DELETE endpoints or global config changes (log indexes, retention) without explicit user instruction.

    line 78
  9. Very specific:

    All list endpoints may be paginated — check the response for a page cursor or next link and iterate if needed.

    line 79
  10. Distinctive:

    If a monitor ID, dashboard ID, or metric name is unfamiliar, look it up with a read-only call first.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Datadog CLI Skill

Use the instance and rules below when constructing all Datadog API commands.

Configuration

Update the table below with your Datadog site and credential file paths:

EnvironmentSiteAPI Key FileApp Key File
Production<your-datadog-site> (e.g. datadoghq.com, datadoghq.eu)~/.datadog/prod.api_key~/.datadog/prod.app_key
Staging<your-datadog-site>~/.datadog/staging.api_key~/.datadog/staging.app_key

If the target environment is unclear, ask the user before running any command.

Prerequisites (one-time setup by user)

Generate a Datadog API key and Application key for each environment (Organization Settings → API Keys / Application Keys) and save them to the corresponding files. Never print or display key values. Do not perform these steps yourself.

mkdir -p ~/.datadog && echo "<your-api-key>" > <API_KEY_FILE> && echo "<your-app-key>" > <APP_KEY_FILE> && chmod 600 ~/.datadog/*

Command Format

curl -s -H "DD-API-KEY: $(cat <API_KEY_FILE>)" \
  -H "DD-APPLICATION-KEY: $(cat <APP_KEY_FILE>)" \
  "https://api.<your-datadog-site>/api/<endpoint>" | jq .

Available API Endpoints

Read-only (safe, no confirmation needed)

EndpointMethodDescription
/api/v1/query?query=<metric-query>&from=<ts>&to=<ts>GETQuery timeseries metrics
/api/v2/logs/events/searchPOSTSearch log events
/api/v1/monitorGETList monitors
/api/v1/monitor/<id>GETGet a specific monitor
/api/v1/dashboardGETList dashboards
/api/v1/dashboard/<id>GETGet a specific dashboard
/api/v2/incidentsGETList incidents
/api/v1/eventsGETList events
/api/v1/hostsGETList hosts

Mutating operations (confirm with user before running)

EndpointMethodDescription
/api/v1/monitorPOSTCreate a monitor
/api/v1/monitor/<id>PUTUpdate a monitor
/api/v1/dashboardPOSTCreate a dashboard
/api/v1/monitor/<id>/mutePOSTMute a monitor
/api/v1/eventsPOSTPost a custom event

Never run — requires explicit human approval

EndpointMethodReason
/api/v1/monitor/<id>DELETEIrreversible monitor deletion
/api/v1/dashboard/<id>DELETEIrreversible dashboard deletion
/api/v2/logs/config/indexes/<name>DELETE/PUTAlters log retention/indexing globally
/api/v1/monitor/<id>/unmute combined with bulk operationsCan silence/unsilence alerting broadly

Rules

  • NEVER target any Datadog site not listed in the configuration table above. If a command references an unfamiliar site, stop and ask the user to confirm.
  • NEVER print, display, log, or store the contents of any API/App key file.
  • Always read keys inline with $(cat <FILE>) — never hardcode key values in a command.
  • Always pass -s (silent) to curl and pipe through jq for readable output.
  • NEVER run DELETE endpoints or global config changes (log indexes, retention) without explicit user instruction.
  • All list endpoints may be paginated — check the response for a page cursor or next link and iterate if needed.
  • If a monitor ID, dashboard ID, or metric name is unfamiliar, look it up with a read-only call first.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.