/agent-skills:dd-coreweave-agent-fleet-installation-on-clustersfrom agent-skills
Installs the Datadog Agent fleet on CoreWeave Kubernetes (CKS) clusters of a tenant already connected to Datadog. Discovers clusters, creates an install rule so Datadog manages the Agent rollout for container monitoring and APM telemetry. Stops at rule creation.
Ships in agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Datadog installs and manages the Agent on the tenancy's CoreWeave
Kubernetes (CKS) clusters: the Datadog Operator in a datadog-managed
namespace deploys the Agent on every Linux node and the Cluster Agent,
keeps them current, and covers clusters that start matching the rule
later. Nothing is installed until a rule exists, and clusters that already
run a Datadog installation are reported, never changed.
The skill stops at rule creation. Once the rule exists, Datadog's own server-side Operator rollout takes over. The skill does not wait for the rollout, poll it to completion, push any configuration, or verify telemetry.
Scope. Container monitoring and APM are enabled by default on an installed Agent. Private API endpoints are not supported (clusters are public unless CoreWeave Support makes them private). Do not enable other Datadog features (log collection, CWS, SBOM, profiling) unless the user explicitly asks.
These prerequisites must be in place before any setup step runs.
Datadog credentials and org — locked in before anything else. Every later step (integration detection, rule lookup, rule write) is org-scoped, and a wrong org yields a confidently wrong answer instead of an error. Nothing else in this skill runs — not even read-only discovery — until the Datadog org and site are locked:
<SKILL_DIR>/scripts/dd-env.sh in the same shell as every
script invocation: it loads DD_SITE / DD_API_KEY / DD_APP_KEY
from the environment (exported values win) falling back to
.env.local / .env, defaults DD_SITE to datadoghq.com, and
prints the resolved state — set/unset only, never key values.datadog_session.env_keys in the output, with
env_keys_wrong_site / env_keys_wrong_org /
env_keys_org_unresolved warnings when the pair cannot work for a
keyed write on this session). Confirm the org with the user once.The CoreWeave CLI (cwic). Installed and logged in, with a session for
the same CoreWeave organization the Datadog integration account holds.
Check command -v cwic; if it is missing, point the user to the cwic
README (https://github.com/coreweave/cwic) for the install steps for their
platform. Have the user run cwic auth login themselves (it opens a
browser; the token page is https://console.coreweave.com/tokens) and
verify with cwic auth whoami. Never ask the user to paste a CoreWeave
token into chat.
Pup. Skip this when Pup is not installed — with DD_API_KEY and
DD_APP_KEY both exported, the pair authenticates the rule write on its
own (the script checks its site and org at preflight). Otherwise, check
the session on the site dd-env.sh resolved:
command -v pup >/dev/null 2>&1 && DD_SITE="${DD_SITE:-datadoghq.com}" pup auth status
The only scope this flow asks for beyond Pup's normal set is
agent_install_write, which lets rule writes ride the session token.
If the script reports a scope error (pup_scopes_missing or
pup_scopes_missing_for_key_minting), ask before running the login
command in the error's remediation — it names the exact scopes, and
--extra-scopes adds to Pup's normal set (never --scopes, which
replaces it). Run every Pup login on the resolved site
(DD_SITE='<site>' pup auth login ...): a login on Pup's default site
locks the token into the wrong org.
Python 3, for the scripts:
command -v python3 || echo "MISSING python3"
Detect the existing integration before offering to create one. The
tenancy is an existing CoreWeave Cloud integration, and the script
enforces the ordering — no reliance on the agent: the tenancy is
identified and org-paired (accounts → telemetry cluster_org /
account_display_name → cwic session's org) before required access,
rules, or clusters are read. An existing account whose org matches is
the tenancy to use; only when the right org holds no matching account
does the dd-coreweave-integration skill follow — never create a second
integration for the same CoreWeave org, because rules and install state
would strand across two accounts. The account's access token must carry
the CKS Admin role — CoreWeave API tokens inherit the roles of the
user who created them, so that user needs CKS Admin, because Datadog
needs cluster-admin access to install the Operator. Every discovery and
install result carries datadog_session (site, org, env_keys) so
a wrong-org run is visible immediately.
With the prerequisites in place, run the read-only discovery, which validates Pup scopes, the cwic session, the provider's agent-fleet availability for this organization, the integrated account, its existing install rule, and the tenancy's CKS clusters, and lists the organization's API keys:
python3 <SKILL_DIR>/scripts/setup.py
Preview. Agent fleet installation on CoreWeave is in preview. When
the script reports a preview error (mci_not_enabled or
preview_feature), relay this message verbatim and stop — do not guess
at another cause or suggest a workaround:
This is a preview feature. Please reach out to Datadog support for early access.
The script is non-interactive and makes no changes in this mode. Handle its errors before asking anything:
pup_cli_missing / pup_not_authenticated / pup_scopes_missing —
follow the remediation in the error, asking before any login command.cwic_cli_missing / cwic_not_logged_in / coreweave_command_failed —
follow the CoreWeave CLI prerequisite above. cwic auth whoami exits 0
even when logged out, so the script checks for a logged-in principal
itself; a cwic_not_logged_in or login failure means the session is
missing or expired, so have the user run cwic auth login again.mci_not_enabled / preview_feature — the feature is in preview and not
enabled for this organization. Relay verbatim: "This is a preview
feature. Please reach out to Datadog support for early access."integration_not_configured — the error names the session's org and
site: no CoreWeave account exists in that org, not anywhere.
Re-check the org/site pinning first; only when the right org is
confirmed empty does the dd-coreweave-integration skill follow.integration_not_available — Datadog's CoreWeave integration account API
is disabled for this organization; enable the CoreWeave integration here
first, or ask your Datadog representative.multiple_accounts — the script first tries to select the account whose
CoreWeave org matches the cwic session automatically (through the
integration's telemetry); ask the user which Datadog account to use and
rerun with --account-id only when that matching fails.cluster_org_mismatch — the cwic session is logged into a different
CoreWeave org than the one the Datadog integration reports. Every later
step would preview the session's clusters while the install covers the
integration's org, so the run stops here. Have the user run
cwic auth login into the CoreWeave organization the Datadog account
holds (or pass --account-id for the matching account), then rerun.coreweave_cluster_list_unparsed — run cwic cluster get yourself,
tell the user what it printed, and have the install use --query.Report the discovery to the user as a table built straight from the
script's JSON: tenancy (account name and id), datadog_session,
org_pairing.verified, each cluster (name, id, zone, status, node
pools, GPU), the existing rule, other_account_rules, and every
warning with its message. Relay the script's fields and warnings
verbatim — they already say what each means, so do not re-derive or
re-explain them.
no_isolating_query, in which case run the install with --query.
When the tenancy has more clusters than the question tool can show,
rely on the tool's built-in Other choice for unlisted clusters —
never add a custom "Other — type X" option, which renders with no
place to type and returns an empty value. If the user picks Other,
ask for the cluster names or ids as text and pass those to
--clusters.existing_rule is reported: still ask — the
local cluster list may be incomplete, and the rule's current coverage
may not match the intent. One lean question —
Which clusters should the Agent fleet rule cover? — with the content
in the options:
TAG:VALUE
next; every matching cluster, future ones included, is covered.
This replaces the existing rule: the install would stop withThen use the interactive question tool once for approval:
Title: Approve CoreWeave agent fleet installation
Question: `Please confirm your Datadog Agent Remote Installation Selection:
when the selection was all clusters, orOnly clusters matching the tag query TAG:VALUE — today (); clusters that start matching later are covered automatically` when specific clusters or a custom query were chosen (name the isolating tag, or the cluster names when isolated by name).Datadog will create one install rule for the tenancy: the Datadog Operator in a datadog-managed namespace deploys the Agent on every Linux node and a Cluster Agent. Clusters that already run a Datadog installation are reported, not changed. Once the rule exists, Datadog rolls the Operator out itself; this skill stops at rule creation.`
Approve option: Create the Agent fleet rule
Cancel option: Cancel without making changes
After permission, create the rule in the foreground — the command no longer
waits for a rollout, so it needs no nohup and no log file. Source
dd-env.sh in the same shell as the invocation (shells do not persist
exports between commands):
python3 <SKILL_DIR>/scripts/setup.py --install \
--api-key-name "<API_KEY_NAME>"
Add --clusters "<COMMA_SEPARATED_IDS>" when specific clusters were
selected, or --query "<TAG:VALUE>" when the user supplied their own
query. Launching the command is authorization for the rule creation.
The script prints one JSON result when the rule exists and exits. Report
the rule id (rule.id), the coverage, the selected clusters, the API key,
and all warnings, and tell the user that Datadog rolls out the Operator
from here. Do not wait for the rollout, poll it to completion, push any
configuration, or verify telemetry. If the user asks for progress later,
python3 <SKILL_DIR>/scripts/setup.py --status <RULE_ID> is a read-only
read.
Handle these install-time errors:
preview_feature — the rules API returned a 404 or an
unsupported-resource-type 400, so the preview flags are off. Relay the
preview message verbatim (see Preview above).rule_write_keys_wrong_org — the exported DD_API_KEY/DD_APP_KEY
pair does not see the selected account (or, for a deletion, the rule),
so it belongs to a different Datadog org than the session. The write
was not sent. Export a key pair from the same org as the session, or
log in with agent_install_write so the write rides the token.rule_write_not_permitted — Datadog refused the rule write. When the
error's details carry transport: oauth, the session token itself
(which claims agent_install_write) was refused: rerun the login from
the error's remediation and try again. Otherwise the token lacked the
scope and the one-shot keys did not carry Agent Install — the fix is on
the user side: export an API and application key pair owned by a user
who holds it (Organization Settings > API Keys) and rerun, or ask their
Datadog representative to grant the permission. Never ask for or paste
key values into chat; the user exports the env vars themselves.pup_scopes_missing_for_key_minting — no env keys were exported and
the Pup token lacks the key-creation scopes. Ask before running the
full-scope login from the preflight section above.existing_rule_coverage_mismatch — the account already has an install
rule whose query differs from the approved selection, and nothing was
changed: reusing it would cover clusters the user did not select. Tell
the user what the existing rule covers (existing_query; none means
every cluster) and either rerun with that coverage or, with their
approval, remove the rule with --remove-rule <RULE_ID> and rerun.agent_install_write; otherwise it resolves the rule-write pair
itself: exported DD_API_KEY/DD_APP_KEY when present, otherwise
one-shot keys minted through Pup and deleted after the write — the
values never transit the conversation, stdout, or the emitted JSON.python3 <SKILL_DIR>/scripts/setup.py --remove-rule <RULE_ID> with the
user's approval. Rule deletion takes the same route as creation: the
session's own token when it can write rules, otherwise the same key
resolution. Datadog
then removes the Operator, Agent, Cluster
Agent, CRDs, cluster role, and admission webhooks, leaving only a small
datadog-operator-lock Lease in datadog-managed. To only follow
progress, use --status <RULE_ID> (read-only).pup auth refresh; if that fails, pup auth login with the scopes from the prerequisites.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub datadog-labs/agent-skills --plugin agent-skills78 skills in this plugin
/agent-observability-auto-experimentRun an iterative code-improvement hill-climb against real Datadog LLM-Obs data, locally, with Claude Code as the agent. Establishes a baseline eval, makes one focused change, re-scores both splits with the same harness, keeps the change when held-out test improves without overfitting val (labeling within-noise gains tentative), and repeats. This is the skill published as "Autoresearch" in Datadog Agent Observability. Use when the user says "run an auto experiment", "run autoresearch", "hill-climb this code", "iteratively improve X and measure the delta", "optimize this code/agent/pipeline/prompt against my traces", "auto-optimize against LLM-Obs", or wants the local equivalent of the auto_experiments worker. Works from an ml_app, a dataset_id, an annotation_queue_id (a queue of human-labelled interactions), a list of trace_ids, or (by exception) a local dataset file. The corpus and its val/test splits live in Datadog LLM-Obs Datasets, created once per run with a timestamp in their names./agent-observability-build-eval-from-annotationsFit a Datadog LLM-Obs evaluator to human labels. Takes an annotation queue, works out where in the trace the labelled property actually lives, drafts an LLM-judge that predicts the human label, scores that judge against the already-labelled rows with a metric agreed with the user, then hill-climbs it — inspect the errors, make one focused change, re-score, keep it only if it beats the best — for a bounded number of iterations, and finally publishes the winner to Datadog as a DISABLED evaluator (not a Datadog draft — a real evaluator with `enabled: false`). Use when the user says "build an eval from my annotations", "build an evaluator from the annotation queue", "turn my annotations into an evaluator", "learn an evaluator from my labels", "fit a judge to the annotation queue", "auto-label", "auto labelling", "automate this annotation queue", "scale up my human labels", or wants the rest of a queue graded the way the humans graded the first rows. Needs an annotation queue with at least two classes present in the human labels (e.g. one true and one false for a boolean).Other plugins' skills for the same job