/agent-skills:dd-instrument-rumfrom agent-skills
Instruments browser apps with Datadog Browser RUM across React, Next.js, Angular, Vue, Nuxt, and Svelte, detecting framework and avoiding duplicate init.
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.
Instrument only the browser application in scope. Do not add Datadog APM, tracing, LLM Observability, Logs, source-map upload, user identification, Vercel metadata, Shopify, Salesforce, or unrelated Datadog products.
Use normal file inspection, editing, and command tools for every step except optional RUM application creation. Use only CreateRumApplication for that operation, as described in references/common-credentials.md; never invent Datadog tool names.
init() in a component render, lifecycle hook, route handler, or repeated callback.applicationId, clientToken, site, service tags, sampling, privacy, tracking, and every other existing option as immutable. Credentials supplied by the task are for a new init only; they are not an override for an existing valid init. In this branch, do not rewrite credential lines while adding plugin wiring.site is invalid, framework/plugin prerequisites are unmet, permissions prevent the work, or multiple conflicting init calls cannot be safely consolidated.@datadog/browser-rum and every @datadog/browser-rum-* integration package on the same exact SDK version.node_modules.Identify the project root that produces browser code. In a monorepo, inspect workspace configuration, scripts, Dockerfiles, and CI/deployment configuration to find the frontend manifest used by the real build rather than editing the repository root by assumption. Record that manifest path and its package manager before editing. If several independent browser applications are plausible and the user did not select one, ask which application to instrument.
Reject non-browser applications such as Ink CLIs and projects with no HTML/browser build target.
Inspect dependencies and source layout in this order so meta-frameworks win over their underlying UI library:
nuxt -> Nuxtnext -> Next.js; distinguish App Router from Pages Router by source layout@angular/core -> Angular; distinguish standalone bootstrap from NgModulevue -> Vuesvelte or @sveltejs/kit -> Svelte or SvelteKitreact -> ReactAlso detect:
tsconfig.json or TypeScript dependency is present; otherwise preserve JavaScript.packageManager field first, then its adjacent lockfile: bun.lock or bun.lockb, pnpm-lock.yaml, yarn.lock, or package-lock.json. Use npm only when no stronger project signal exists, and never mix managers.react-scripts). Treat unmanaged HTML as CDN only when no package/bundler build owns it.Read references/rum-core.md, then read exactly the applicable framework reference:
| Target | Reference |
|---|---|
| React, React Router, TanStack Router | references/rum-react.md |
| Next.js App or Pages Router | references/rum-nextjs.md |
| Angular | references/rum-angular.md |
| Vue | references/rum-vue.md |
| Nuxt | references/rum-nuxt.md |
| Svelte, vanilla, generic SPA, iframe-hosted app | references/rum-other-frameworks.md |
Validate every prerequisite in the selected reference before provisioning credentials or editing. Do not upgrade a framework and do not silently fall back to core-only RUM when a detected framework plugin is incompatible.
Search source, HTML, and configuration files while excluding dependency, build, generated, and coverage directories such as node_modules, dist, build, .next, .nuxt, and coverage.
Check for:
@datadog/browser-rum, including renamed and namespace bindings.@datadog/browser-rum-* integration package.datadogRum.init, including aliases and local wrapper modules.DD_RUM.init, window.DD_RUM.init, DD_RUM.onReady, and Datadog CDN loader URLs.Treat package presence alone as insufficient: a dependency may be unused.
Resolve credentials through references/common-credentials.md only after analysis succeeds. If analysis found one valid existing init, reuse its existing credentials and skip credential replacement entirely. Supplied task credentials may be used only when creating a new init. Then:
references/rum-core.md. For an existing valid init, apply only missing compatible fields to that same object; do not copy credential or canonical-option placeholders over existing values.lint:fix, fix, or format and from ESLint/Prettier configuration. Run the project's formatter or fix command only for files changed by this work.Do not add allowedTracingUrls or any backend/CORS/tracing configuration; those belong to an APM onboarding workflow.
Follow references/common-verify-report.md. Before reporting success, inspect the final diff against the pre-edit project. When an existing valid init was found, verify that every pre-existing init value—including both credentials—remains byte-for-byte unchanged and that the only setup changes are the required missing integration wiring (plus any strictly necessary dependency/lockfile change). If an existing value changed, restore it before reporting success. Do not report success unless required packages are persisted, the resulting setup contains exactly one init, and the normal build succeeds.
references/common-credentials.md (opens in a new tab)references/common-verify-report.md (opens in a new tab)references/rum-angular.md (opens in a new tab)references/rum-core.md (opens in a new tab)references/rum-nextjs.md (opens in a new tab)references/rum-nuxt.md (opens in a new tab)references/rum-other-frameworks.md (opens in a new tab)references/rum-react.md (opens in a new tab)references/rum-vue.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
datadog, browser-rum, session-replay, instrumentation, monitoring
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