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

dynatrace-cli

Skill8 starsChanged 7 months agoApache-2.0View on GitHub

Perform Dynatrace operations using the Dynatrace HTTP API via curl. Use for querying entities, metrics, problems, and events.

The file

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 Dynatrace API commands.

    line 8
  2. Distinctive:

    Update the table below with your Dynatrace environment URLs and token file paths:

    line 12
  3. Distinctive:

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

    line 19
  4. Distinctive:

    NEVER target any Dynatrace environment not listed in the instance table above.

    line 68
  5. Distinctive:

    NEVER print, display, log, or store the contents of any token file.

    line 69
  6. Very specific:

    Always read the token inline with $(cat <TOKEN_FILE>) — never hardcode a token value in a command.

    line 70
  7. Very specific:

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

    line 71
  8. Distinctive:

    NEVER run DELETE endpoints without explicit user instruction — these are irreversible.

    line 72
  9. Very specific:

    All list endpoints are paginated (nextPageKey field) — follow it until absent to fetch all pages.

    line 73
  10. Distinctive:

    If an entity ID or problem ID is unfamiliar, look it up with a read-only call first.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Dynatrace CLI Skill

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

Instances

Update the table below with your Dynatrace environment URLs and token file paths:

EnvironmentBase URLToken File
Productionhttps://<your-env-id>.live.dynatrace.com~/.dynatrace/prod.token
Staginghttps://<your-env-id>.live.dynatrace.com~/.dynatrace/staging.token

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

Prerequisites (one-time setup by user)

Generate a Dynatrace API token with the required scopes (Settings → Integration → Dynatrace API) for each environment and save it to the corresponding token file. Never print or display token values. Do not perform these steps yourself.

mkdir -p ~/.dynatrace && echo "<your-api-token>" > <TOKEN_FILE> && chmod 600 <TOKEN_FILE>

Command Format

curl -s -H "Authorization: Api-Token $(cat <TOKEN_FILE>)" \
  "<BASE_URL>/api/v2/<endpoint>" | jq .

Available API Endpoints

Read-only (safe, no confirmation needed)

EndpointMethodDescription
/api/v2/entitiesGETList monitored entities (hosts, services, etc.)
/api/v2/entities/<id>GETGet a specific entity
/api/v2/metrics/queryGETQuery metric data points
/api/v2/problemsGETList problems
/api/v2/problems/<id>GETGet a specific problem
/api/v2/eventsGETList events
/api/v2/synthetic/monitorsGETList synthetic monitors

Mutating operations (confirm with user before running)

EndpointMethodDescription
/api/v2/problems/<id>/commentsPOSTAdd a comment to a problem
/api/config/v1/anomalyDetection/metricEventsPOSTCreate a metric event/alert rule
/api/v2/synthetic/monitorsPOSTCreate a synthetic monitor

Never run — requires explicit human approval

EndpointMethodReason
/api/v2/settings/objects/<id>DELETEIrreversible settings object deletion
/api/config/v1/anomalyDetection/metricEvents/<id>DELETEIrreversible alert rule deletion
/api/v2/synthetic/monitors/<id>DELETEIrreversible monitor deletion

Rules

  • NEVER target any Dynatrace environment not listed in the instance table above. If a URL references a different host, stop and ask the user to confirm.
  • NEVER print, display, log, or store the contents of any token file.
  • Always read the token inline with $(cat <TOKEN_FILE>) — never hardcode a token value in a command.
  • Always pass -s (silent) to curl and pipe through jq for readable output.
  • NEVER run DELETE endpoints without explicit user instruction — these are irreversible.
  • All list endpoints are paginated (nextPageKey field) — follow it until absent to fetch all pages.
  • If an entity ID or problem ID 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.