Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dd-account-setup

БесплатноЗапускает вложенные скриптыНе проверен

Ensure the user has an authenticated Datadog account with a valid DD_API_KEY on the right region before any Datadog setup or instrumentation. Detects existing…

datadog-labsот datadog-labs★ 188 звёзд на GitHub

Об этом скилле

Create / connect a Datadog account

This skill gets the user to a known-good state: a valid API key + application key pair, on the right region, validated against the Datadog API. It is the "step 0" that setup/instrumentation skills depend on — run it first, then hand off.

scripts/account-setup.sh is the single source of truth for everything mechanical — credential detection (env > .env.local > .env), pair validation, browser sign-in (pup when installed and new enough — an old pup CLI falls back to the script's own PKCE OAuth automatically), key creation with retrieve-most-recent fallback (application keys are limited to the signed-in user), validation of the new pair, and the atomic 0600 .env write. Existing env-file contents are preserved if provisioning or validation fails. This SKILL.md carries no copy of that logic: an inline copy is a second implementation that drifts — the --site drift bug shipped exactly that way, in a reference that duplicated the script. If a step seems to need inline bash the script already does, the answer is to fix or extend the script, not to duplicate it.

Run it

scripts/account-setup.sh --site <DD_SITE> [--fresh | --no-browser]   # region from step 1, flag from step 2 / headless

Idempotent: a valid pair already in the environment/.env → exit 0, nothing created (unless --fresh). Otherwise one browser approval provisions both keys; --no-browser never opens one. Exit codes are documented in the script header.

How to talk to the user

  • For questions (the region, the connect method) use the host's native selector (Claude Code AskUserQuestion) — an up/down list, never "enter A / press 1".
  • Never put a secret in the conversation — a key's name and last 4 characters are fine; the value never is. It lives in .env and nowhere else.
  • Relay the script's outcome minimally. Post its final checklist and the one-line hand-off — nothing else. Do not replay the script's intermediate output, quote its status lines back, or wrap the result in commentary ("the flow ran clean, here's what you saw at each stage…"): the user saw the status lines live while it ran; the final checklist is the summary. The only checklist you render yourself is the baseline below, before step 1's question.
  • Describe outcomes ("Signed in as X on US1"), not tool calls ("ran curl …").

Baseline to post when step 1 begins (the script takes over from its own checklist on entry):

**Datadog account setup**
- ◔ 1. Confirm region / site
- ○ 2. Credential source — existing pair or fresh login
- ○ 3. Create api + app keys (optional)
- ○ 4. Ready — hand off

What stays with the agent — one question, one choice, one run, one hand-off

1. Confirm the region / site — the one question a customer must answer

The site drives every URL downstream (API host, key pages), so pin it before running the script.

If DD_SITE is set (env or .env): skip this step entirely — no --regions call, no region question. The environment already carries the decision. Run the script without --site (it reads DD_SITE from the shell, then .env.local, then .env, and validates the value against its own allowed-site list, exiting with a clear error if it is unrecognized — if that error fires, relay it and have the user fix DD_SITE). Post the baseline with step 1 already ● ("confirmed via DD_SITE") and go straight to step 2's question.

If DD_SITE is unset: ask the user to pick a region — never silently commit one. Run scripts/account-setup.sh --regions for the current region table (region, DD_SITE, app base URL) and build the question's options from that output — not from memory or a doc. The same list is what --site is validated against, so the picker can never offer a site the script would reject. Don't try to detect the user's location (no IP-geolocation lookups or other third-party calls): the right region is where their infrastructure runs, which may not be where they are. Default to US1 (datadoghq.com) if they have no preference. Tell the user, e.g.:

Which Datadog region should this account live in? Pick the one closest to where your infrastructure runs (e.g. your cloud region) — sending data to a far-away region adds latency and egress cost, and the region can't be changed after the account is created. Default: US1 (Virginia), datadoghq.com.

Use the host's native selector with US1 (default) first. Wait for the user's reply before continuing; a plain acceptance ("ok", "default", "sure") means US1.

↳ Reprint the baseline with 1. Confirm region ● once the user answers.

2. Ask "The choice" before touching any credential

An ambient DD_API_KEY may belong to a different org or account than the user intends, and the region can't reveal which — so let the user decide rather than inferring it. Ask via the host's native selector, header "Connect to Da

Полный SKILL.md на GitHub

Установить dd-account-setup в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/troubleshooting.mdscripts/account-setup.sh

FAQ

Что делает скилл dd-account-setup?

Ensure the user has an authenticated Datadog account with a valid DD_API_KEY on the right region before any Datadog setup or instrumentation. Detects existing DD_API_KEY / DD_APP_KEY / DD_SITE, validates them against the Datadog API, and fixes the common wrong-region 403. If no usable key exists, signs the user in (OAuth) or creates a new account, then obtains and validates a key. Use this whenever a user needs a Datadog account or API key, hits a 403 / wrong-region error, or is about to run any Datadog *-setup or instrumentation skill.

Как установить скилл dd-account-setup?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dd-account-setup запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить dd-account-setup с