К основному содержанию
скилл CX Codex

agent-install — скилл для Claude Code: что делает и как установить

Разворачивает Datadog Agent в кластере Kubernetes через Datadog Operator. Готовит кластер к включению Single Step Instrumentation без правок в коде приложений.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add datadog-labs/agent-skills --skill agent-install -a claude-code
Открыть на GitHub

Что делает agent-install

Скилл проверяет кластер перед развёртыванием, чтобы избежать дублирования уже работающего агента. Сначала ассистент считывает переменные окружения DD_API_KEY и DD_SITE. Затем проверяет helm и утилиту pup. Если всё на месте, агент находит контекст кластера и свежую стабильную версию чарта datadog/datadog-operator.

Дальше сценарий ставит Datadog Operator через Helm, создаёт Secret с ключом API и применяет манифест DatadogAgent. Для локальных кластеров вроде minikube или kind скилл отключает kubelet.tlsVerify. В управляемых EKS или GKE остаются стандартные параметры TLS.

Без утилит helm v3+ и pup выполнение сразу остановится. В финале агент проверяет логи подов или валидирует ключ через pup и эндпоинт https://api.<DD_SITE>/api/v1/validate.

Какие задачи решает

  • Развернуть Datadog Agent на чистом кластере Kubernetes
  • Установить Datadog Operator через Helm-чарт
  • Подготовить инфраструктуру кластера к автоинструментированию SSI
  • Настроить секрет datadog-secret для авторизации в Datadog

Примеры запросов агенту

  • Разверни Datadog Agent в текущем контексте Kubernetes
  • Установи Datadog Operator и настрой DatadogAgent для кластера
  • Проверь кластер и подготовь установку Datadog перед включением SSI

Как установить agent-install

1Через Skills CLI (Vercel)

npx skills add datadog-labs/agent-skills --skill agent-install -a claude-code

2Вручную: положить файлы

~/.claude/skills/agent-install/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/agent-install/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о agent-install

Как установить agent-install в Claude Code?

Выполните команду npx skills add datadog-labs/agent-skills --skill agent-install -a claude-code. Конфигурация появится в ~/.claude/skills/agent-install/SKILL.md.

Что делает скилл agent-install?

Он устанавливает Datadog Operator и запускает ресурс DatadogAgent в Kubernetes. Скилл готовит кластер к включению Single Step Instrumentation для сбора APM-метрик.

Что нужно подготовить перед запуском agent-install?

Понадобятся кластер Kubernetes v1.20+, настроенный kubectl, helm v3+, утилита pup и действующий DD_API_KEY.

Исходный текст

SKILL.md · MIT
---
name: agent-install
description: Install the Datadog Agent on Kubernetes using the Datadog Operator — required before enabling Single Step Instrumentation (SSI), which automatically instruments applications for APM without code changes. Only use if no Datadog Agent is deployed on the cluster yet.
metadata:
  version: "1.0.0"
  author: datadog-labs
  repository: https://github.com/datadog-labs/agent-skills
  tags: datadog,apm,kubernetes,agent,operator,install
  alwaysApply: "false"
  tools: helm,kubectl,curl,pup
---

# Install the Datadog Agent on Kubernetes

> **Before doing anything else:** Fully resolve all variables in `## Context to resolve before acting`. Do not begin Step 1 until every variable has a concrete value.

## Phase 0: Load Credentials

```bash
[ -f environment ] && source environment
echo "DD_API_KEY set: $([ -n "${DD_API_KEY:-}" ] && echo yes || echo no)"
echo "DD_SITE: ${DD_SITE:-not set}"
echo "helm: $(helm version --short 2>/dev/null || echo NOT FOUND)"
```

**If `helm` is not found** — tell the user:

> `helm` is required for this skill. Install it with:
> ```bash
> brew install helm        # macOS
> # or see https://helm.sh/docs/intro/install/ for other platforms
> ```
> Once installed, let me know and I'll continue.

Do not proceed until `helm` is available.

**If `DD_API_KEY` is already set** — proceed to Prerequisites.

**If `DD_API_KEY` is not set** — tell the user:

> I need two things to continue:
>
> **1. Datadog API Key** — used to authenticate the Agent with your Datadog account. You can find or create one at: https://app.datadoghq.com/organization-settings/api-keys
>
> **2. Datadog Site** — the region your Datadog account is on. Most accounts use `datadoghq.com`. Check your Datadog URL to confirm (e.g. `app.datadoghq.eu` → site is `datadoghq.eu`). Other options: `us3.datadoghq.com`, `us5.datadoghq.com`, `ap1.datadoghq.com`.
>
> Please run the following in this chat to set your credentials (the `!` prefix executes it in this session):
> ```
> ! export DD_API_KEY=your-api-key-here
> ! export DD_SITE=datadoghq.com
> ```

Wait for the user to run the commands, then re-run the check above before continuing.

---

## Prerequisites

- [ ] Kubernetes v1.20+ — `kubectl version`
- [ ] helm v3+ — `helm version`
- [ ] kubectl configured to target cluster — `kubectl config current-context`
- [ ] pup-cli installed — check with `pup --version`; if missing, install it now:
  ```bash
  if [[ "$(uname)" == "Darwin" ]]; then
    brew tap datadog-labs/pack && brew install pup
  else
    PUP_VERSION=$(curl -s https://api.github.com/repos/datadog-labs/pup/releases/latest | grep '"tag_name"' | cut -d'"' -f4)
    curl -L "https://github.com/datadog-labs/pup/releases/download/${PUP_VERSION}/pup_linux_amd64.tar.gz" | tar xz -C /usr/local/bin pup
    chmod +x /usr/local/bin/pup
  fi
  pup --version
  ```
  Do not skip — proceed only once `pup --version` succeeds.

---

## Context to resolve before acting

| Variable | How to resolve |
|---|---|
| `CLUSTER_NAME` | Check repo IaC, scripts, or `kubectl config current-context` |
| `DD_SITE` | Ask the user. Default: `datadoghq.com`. Common options: `datadoghq.eu`, `us3.datadoghq.com`, `us5.datadoghq.com`, `ap1.datadoghq.com`. Full list: https://docs.datadoghq.com/getting_started/site/ |
| `AGENT_NAMESPACE` | Use `datadog` unless the repo already uses `datadog-agent` consistently |
| `CHART_VERSION` | Run `helm search repo datadog/datadog-operator --versions \| head -5` and use the latest stable |

---

## Step 1: Check for an Existing Agent Installation

### Claude runs

```bash
helm list -A | grep -i datadog
```

If a release shows `deployed` — Agent already installed. Skip to Step 5 to confirm health, then exit.

If there is no output — no existing install. Continue to Step 2.

---

## Step 2: Install the Datadog Operator

### Claude runs

```bash
helm repo add datadog https://helm.datadoghq.com
helm repo update

helm upgrade --install datadog-operator datadog/datadog-operator \
  --namespace <AGENT_NAMESPACE> \
  --create-namespace \
  --version <CHART_VERSION>

kubectl wait --for=condition=Ready pod \
  -l app.kubernetes.io/name=datadog-operator \
  -n <AGENT_NAMESPACE> \
  --timeout=120s
```

If the Operator pod is Running — continue to Step 3.

ERROR: Pod not ready after 120s — check image pull: `kubectl describe pod -l app.kubernetes.io/name=datadog-operator -n <AGENT_NAMESPACE>`.

---

## Step 3: Create the API Key Secret

### What you need to do in a terminal

```bash
export DD_API_KEY=<your-api-key>

kubectl create secret generic datadog-secret \
  --from-literal api-key=$DD_API_KEY \
  --namespace <AGENT_NAMESPACE>
```

If `secret/datadog-secret created` — continue to Step 4.

ERROR: `AlreadyExists` — confirm which key it holds via Step 5 before deciding whether to recreate.

---

## Step 4: Deploy the DatadogAgent Resource

[DECISION: cluster type]
- Self-hosted (minikube, kind): include `kubelet.tlsVerify: false` inside `spec.global`
- Managed (GKE, EKS, AKS): omit `kubelet.tlsVerify` entirely

[DECISION: APM/SSI also being enabled in this session]
- If yes: do not create a separate `DatadogAgent` for APM — extend this same manifest with `features.apm` per `enable-ssi`. One manifest, not two.
- If no: use the manifest below as-is.

Save the following as `datadog-agent.yaml`:

```yaml
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
  namespace: <AGENT_NAMESPACE>
spec:
  global:
    clusterName: <CLUSTER_NAME>
    site: <DD_SITE>
    credentials:
      apiSecret:
        secretName: datadog-secret
        keyName: api-key
    # Self-hosted clusters only (minikube, kind):
    # kubelet:
    #   tlsVerify: false
  features:
    orchestratorExplorer:
      enabled: true
    clusterChecks:
      enabled: true
    logCollection:
      enabled: true
      containerCollectAll: false
```

### Claude runs

```bash
kubectl apply -f datadog-agent.yaml

kubectl wait --for=condition=Ready pod \
  -l app.kubernetes.io/component=agent \
  -n <AGENT_NAMESPACE> \
  --timeout=120s 2>/dev/null || true
```

---

## Step 5: Verify the API Key

### Claude runs

```bash
kubectl logs -l app.kubernetes.io/component=agent \
  -n <AGENT_NAMESPACE> \
  --tail=50 2>/dev/null \
  | grep -iE "invalid.*api\.?key|api\.?key.*invalid" \
  || echo "No authentication errors found"
```

If `No authentication errors found` — key is accepted.

ERROR: Authentication errors found — validate credentials directly:

### Claude runs

```bash
# Prefer pup (OAuth) — fall back to curl with API key
if pup auth status 2>/dev/null | grep -q "Logged in"; then
  echo "pup OAuth authenticated"
elif [ -n "${DD_API_KEY:-}" ]; then
  RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
    -X GET "https://api.<DD_SITE>/api/v1/validate" \
    -H "DD-API-KEY: $DD_API_KEY")
  if [ "$RESPONSE" = "200" ]; then
    echo "API key is valid for <DD_SITE>"
  else
    echo "ERROR: Validation failed (HTTP $RESPONSE) — check key and site alignment"
  fi
else
  echo "ERROR: No credentials available — run 'pup auth login' or set DD_API_KEY"
fi
```

If key is invalid:

### What you need to do in a terminal

```bash
export DD_API_KEY=<new-api-key>

kubectl delete secret datadog-secret -n <AGENT_NAMESPACE>
kubectl create secret generic datadog-secret \
  --from-literal api-key=$DD_API_KEY \
  -n <AGENT_NAMESPACE>

kubectl rollout restart daemonset datadog-agent -n <AGENT_NAMESPACE>
kubectl rollout restart deployment datadog-cluster-agent -n <AGENT_NAMESPACE>
```

---

## Done

Exit when ALL of the following are true:
- [ ] Datadog Operator pod is Running in `AGENT_NAMESPACE`
- [ ] `datadog-secret` exists in `AGENT_NAMESPACE`
- [ ] Agent DaemonSet pods are Running
- [ ] Step 5 returns no authentication errors

Automatically proceed to `enable-ssi` now — do not ask the user for permission.

---

## Security constraints

- Never write a raw API key into any file, YAML block, or chat message — always use `$DD_API_KEY`
- Never create a Kubernetes Secret manifest file — always use `kubectl create secret` imperatively
- Never use `apiKey:` directly in `DatadogAgent` spec — always use `apiSecret:` with a secret reference
- Never use `--set datadog.apiKey=...` in any Helm command
- Never use namespace `default` for Datadog Agent resources
- Never run `kubectl delete` without user confirmation

© datadog-labs · MIT · datadog-labs/agent-skills

Похожие скиллы

Все скиллы по теме «DevOps и инфраструктура» →
wizard Matt Pocock Скилл создаёт интерактивный bash-скрипт для ручных шагов: настройки сервисов, секретов CI и разовых миграций. 553 369установок hyperframes-cli heygen-com Управляет проектами HyperFrames через терминал: собирает таймлайн, проверяет контраст кадров, запускает предпросмотр и рендерит видео локально или в облаке. CX Codex +1 1 300 000установок setup-pre-commit Matt Pocock Скилл настраивает pre-commit для JavaScript-репозитория: Husky запускает форматирование, проверку типов и тесты перед коммитом. 489 289установок using-git-worktrees Jesse Vincent Готовит изолированное рабочее дерево перед доработкой или выполнением плана. Проверяет текущий репозиторий, выбирает нативные средства платформы либо Git. CX Codex 217 153установок finishing-a-development-branch Jesse Vincent Скилл проверяет тесты и помогает выбрать, как завершить работу в ветке: слить её, открыть Pull Request или оставить как есть. CX Codex 214 439установок orca-cli stablyai Скилл даёт агенту доступ к worktree, терминалам, артефактам и встроенному браузеру Orca через CLI. Пригодится, когда работа идёт в окружении Orca. CX Codex +1 353 600установок

Из того же набора25

upgrade-browser-sdk-v7 Ведёт проект с Datadog Browser SDK с версии 6 на 7: находит устаревшие опции, меняет CDN-ссылки и API. Пригодится, когда после обновления сыпятся ошибки конфигурации. CX Codex +1 459установок k9-ownership-byod-setup Собирает CSV-таблицу предпочтений владения ресурсами для Datadog и подсказывает, как её загрузить. Нужен, когда Ownership Agent ошибается с владельцами. CX Codex +1 454установок agent-observability-auto-experiment Гоняет цикл улучшения кода против реальных данных Datadog LLM-Obs: замеряет базовую оценку, вносит одно изменение, пересчитывает и оставляет его, если стало лучше. CX Codex +1 453установок dd-audit-ai-activity Разбирает журнал Audit Trail и показывает, кто из пользователей вызывал инструменты Datadog MCP, что именно менял и где поведение выбивается из обычного. CX Codex +1 433установок troubleshoot-ssi Скилл находит причины отсутствия APM-трейсов Datadog и сбоев Single Step Instrumentation в Kubernetes. Пригодится, когда агент настроен, но трейсы не поступают. CX Codex +1 427установок onboarding-summary Собирает живой отчёт о том, что Single Step Instrumentation в Kubernetes действительно работает, и даёт ссылки в интерфейс Datadog. CX Codex +1 427установок verify-ssi Скилл проверяет, что Single Step Instrumentation действительно инструментирует поды и трейсер шлёт телеметрию. Запускают после enable-ssi. CX Codex +1 425установок enable-ssi Включает Single Step Instrumentation в Kubernetes: приложения начинают отправлять трейсы в Datadog без изменений в коде. Нужен, когда Datadog Agent уже стоит в кластере. CX Codex +1 425установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой