/agent-skills:dd-git-taggingfrom agent-skills
Tags a Datadog service's traces with Git commit SHA and repository URL for source code integration. Checks current tagging, sets DD_GIT_COMMIT_SHA and DD_GIT_REPOSITORY_URL at build/launch, and confirms tagged traces arrive.
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.
Source code integration has two halves: connecting the Git provider to Datadog, and tagging telemetry with the commit and repository it came from. This skill does the second half for one service. A service counts as tagged when its spans carry both git.commit.sha and git.repository_url.
Inputs: the service name and, optionally, the env. Use them if the caller passed them. Otherwise read DD_SERVICE and DD_ENV from the project's config; with several services and no name given, ask which one.
user:token@ never lands in an image or in telemetry.python3 -I -B <this-skill-dir>/scripts/check_git_tags.py --service <service> [--env <env>] --json
It authenticates with the signed-in pup session, or with DD_API_KEY, DD_APP_KEY, and DD_SITE when pup isn't signed in. Without either, run the same search with the Datadog MCP aggregate_spans tool (count, last 15 minutes; widen the window only if that finds nothing, since older spans are searchable only when indexed), using the query the script would print:
@_top_level:1 service:<service> [env:<env>] (git.commit.sha:* OR @git.commit.sha:* OR @_dd.git.commit.sha:*) (git.repository_url:* OR @git.repository_url:* OR @_dd.git.repository_url:*)
A non-zero count means tagged; zero means search again without the two Git clauses to tell untagged from no spans.
| Exit | Status | Do |
|---|---|---|
| 0 | tagged | Nothing to change. Report the commit and repository it found, and stop. If source is tracer, the service sends both values but Datadog hasn't turned them into git.* tags, which happens when traces skip the Agent: add the agentless DD_TAGS entries from step 3. |
| 2 | untagged | Spans arrive without one or both values (has_commit_sha, has_repository_url). Go to step 2. |
| 3 | no_spans | Nothing from this service in the last 15 minutes, nor in a day of indexed spans. If the service isn't instrumented or running yet (for example, another skill is setting it up), go to step 2 and check again once it runs. Otherwise confirm the service name and env with the user before editing. |
| 1 | error | Report the message. A 403 means the key or session can't read APM data. |
Find every place the service is built and started: Dockerfile ARG/ENV/CMD, compose, Kubernetes or Helm manifests, platform config (Procfile, app.yaml, fly.toml, render.yaml), CI workflows that build images or deploy, and launch scripts (package.json scripts.start, a gunicorn or uvicorn command).
Look for existing DD_GIT_COMMIT_SHA and DD_GIT_REPOSITORY_URL. If they exist but the check says untagged, they aren't reaching the running process. Common causes:
ARG with no matching ENV, so the value exists at build time only.<repo-url>..git directory is excluded from the build (.dockerignore), so a git call inside the image returns nothing.DD_AGENTLESS_ENABLED=true) and sets only DD_GIT_*. Without an Agent, Datadog keeps the tracer's raw values but never turns them into git.* tags, so the values must also be in DD_TAGS.If every build and launch path already sets both DD_GIT_* variables correctly (and, without an Agent, their DD_TAGS entries), change nothing: the running service was built or started another way, or before this config existed. Skip to step 5 and tell the user to rebuild or redeploy through that path.
Get the values from the checkout:
git rev-parse HEAD
git config --get remote.origin.url | sed -E 's#://[^/@]*@#://#'
Then set both in the environment of the running process, wherever the project defines it, matching what the project already uses. Have the build or deploy compute them each time; never paste the values in by hand:
Environment=, or an EnvironmentFile= the deploy writes), or the env file its process manager loads.env in the manifest or chart values, filled by the CI step that deploys.ARG and an ENV for each in the final (runtime) stage, so the build value carries into the running container:
ARG DD_GIT_REPOSITORY_URL
ARG DD_GIT_COMMIT_SHA
ENV DD_GIT_REPOSITORY_URL=${DD_GIT_REPOSITORY_URL} DD_GIT_COMMIT_SHA=${DD_GIT_COMMIT_SHA}
Pass them at build time: --build-arg DD_GIT_COMMIT_SHA=$(git rev-parse HEAD) --build-arg DD_GIT_REPOSITORY_URL=$(git config --get remote.origin.url | sed -E 's#://[^/@]*@#://#'), and update every script, compose build.args, or CI step that builds the image.git, which may be a shallow or detached checkout. GitHub Actions: ${{ github.sha }} and ${{ github.server_url }}/${{ github.repository }}. GitLab CI: $CI_COMMIT_SHA and $CI_PROJECT_URL. CircleCI: $CIRCLE_SHA1 and $CIRCLE_REPOSITORY_URL.VERCEL_GIT_COMMIT_SHA or Render RENDER_GIT_COMMIT; set the repository URL as a plain config value since it doesn't change.sha="$(git rev-parse HEAD)" url="$(git config --get remote.origin.url | sed -E 's#://[^/@]*@#://#')"; DD_GIT_COMMIT_SHA="$sha" DD_GIT_REPOSITORY_URL="$url" <existing start command>
No code change is needed. Set DD_TAGS only when the service sends traces without an Agent (DD_AGENTLESS_ENABLED=true, see step 2): there, add git.commit.sha:<sha>,git.repository_url:<url> from the same values, appending to an existing DD_TAGS rather than replacing it. With an Agent, leave DD_TAGS alone.
Restart the service with the new config (or rebuild the image), send it a few requests, and wait for tagged spans:
python3 -I -B <this-skill-dir>/scripts/check_git_tags.py --service <service> [--env <env>] --from now-15m --wait 300 --json
If the service only runs through a deploy you can't trigger, skip this and tell the user the change applies from the next deploy, with the check command to run afterward.
Tagged: <service> (env <env>) spans carry commit <sha> from <repository_url>., or Already tagged: …, or Not verified: <reason>. <What to do>.dd-github-onboarding for GitHub.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
datadog, git-tagging, source-code-integration, apm, trace-tagging
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)./agent-observability-eval-bootstrapBootstrap evaluators from production traces — by default propose online LLM-judge evaluators and, after you confirm, create them in Datadog as disabled drafts (never auto-enabled); on request emit Python SDK code or a framework-agnostic JSON spec instead. Use when user says "bootstrap evaluators", "generate evaluators", "create evals from traces", "eval bootstrap", "write evaluators", "build eval suite", "publish evaluators", or wants to generate BaseEvaluator/LLMJudge code or online judge configs from production LLM trace data. Works with ml_app and optional RCA report or failure hypothesis./agent-observability-eval-pipelineEnd-to-end Agent Observability pipeline for an instrumented ml_app — classify production traces, root-cause failures, bootstrap evaluators, then (optionally) sample + publish a dataset, generate + run an experiment, and analyze results. Six narrated phases with a standardized banner and a "continue" checkpoint between each. Pure orchestration over the agent-observability sub-skills (`agent-observability-session-classify`, `agent-observability-trace-rca`, `agent-observability-eval-bootstrap`, `agent-observability-experiment-bootstrap`, `agent-observability-experiment-analyzer`). Use when user says "run the eval pipeline", "go from traces to evals", "bootstrap evals end to end", "classify then RCA then bootstrap", "build an eval set from scratch", "onboard me to datasets and experiments", "walk me through experiments", "I have an ml_app, now what", "Agent Observability onboarding", "guided experiment setup", "from traces to experiments", or wants a deterministic, narrated tour from production data through evaluators, datasets, and experiments. Stop early with `--stop-after <phase>` to short-circuit at evaluators or dataset, or resume mid-flow with `--start-at <phase>`./agent-observability-experiment-analyzerAnalyze LLM experiment results. Handles single or comparative experiments, exploratory or Q&A modes. Use when user says "analyze experiment", "compare experiments", "analyze against baseline", or provides one or two experiment IDs for analysis./agent-observability-experiment-bootstrapBootstrap a reproducible LLM Observability experiment through the Python ddtrace SDK or the Node dd-trace SDK. Use for experiment, dataset, evaluator, benchmark, regression, or LLM-as-a-judge scaffolding. The legacy Python invocation remains supported.Other plugins' skills for the same job