# dd-browser-sdk

Routes coding agents through Datadog Browser SDK upgrades from v4 to v7 and automates sourcemap uploads across major bundlers.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 577 installs · ★ 178
- Author: datadog-labs
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/datadog-labs/agent-skills/tree/HEAD/dd-browser-sdk/SKILL.md
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/skills/dd-browser-sdk

## What it does

This skill acts as an orchestration router for Datadog client-side tools, covering RUM, Logs, and Session Replay. It triggers on file patterns matching `@datadog/browser-*` or `datadog-logs` packages. Instead of relying on training memory, it commands the agent to read explicit migration files directly from the skill directory.

The workflow covers four main pathways. Three routing branches handle major version migrations: v4 to v5, v5 to v6, and v6 to v7. It flags removed configuration flags such as `proxyUrl`, `sampleRate`, or `betaEncodeCookieOptions`, while addressing dropped IE11 support and outdated CDN paths. A dedicated sourcemap branch assists with setting up Datadog build plugins in Vite, Webpack, Rollup, Rspack, and esbuild configs to resolve minified Error Tracking stacks.

The router depends strictly on the nested `SKILL.md` files inside `.claude/skills/dd-browser-sdk/`. If those sub-skill files are missing during installation, the agent cannot execute the migration steps.

## Requirements
- Works with: Datadog

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add datadog-labs/agent-skills --skill dd-browser-sdk -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/dd-browser-sdk/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/dd-browser-sdk/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add datadog-labs/agent-skills --skill dd-browser-sdk -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/dd-browser-sdk/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add datadog-labs/agent-skills --skill dd-browser-sdk -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/dd-browser-sdk/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install datadog-labs/agent-skills dd-browser-sdk
```

2. **Manually: put the files in place**
- File: `.github/skills/dd-browser-sdk/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add datadog-labs/agent-skills --skill dd-browser-sdk -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/datadog-labs/agent-skills --path dd-browser-sdk
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/dd-browser-sdk/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add datadog-labs/agent-skills --skill dd-browser-sdk -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/datadog-labs/agent-skills/tree/HEAD/dd-browser-sdk/SKILL.md

## When to use it
- upgrade Datadog Browser SDK code from v4 through v7
- configure sourcemap uploads for Vite, Webpack, Rollup, Rspack, or esbuild
- identify deprecated Browser SDK options before major version bumps
- unminify stack traces in Datadog Error Tracking and RUM

## Example prompts
- Upgrade our Datadog Browser SDK integration from v5 to v6
- Set up Datadog sourcemap uploads in our Vite config
- Check our datadog-rum setup for removed v7 options

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d0745099cb7cc0dc.

BEGIN THIRD-PARTY FILE d0745099cb7cc0dc
```text
---
name: dd-browser-sdk
description: >
  Datadog Browser SDK — RUM, Logs, Session Replay, profiling, product analytics, and error tracking
  setup, configuration, and migration. Use when upgrading Browser SDK versions, setting up RUM or
  Logs, or troubleshooting browser-side Datadog instrumentation.
metadata:
  version: "1.0.0"
  author: datadog-labs
  repository: https://github.com/datadog-labs/agent-skills
  tags: datadog,browser-sdk,rum,logs,session-replay,profiling,product-analytics,error-tracking,sourcemaps,build-plugin,cdn,npm,migration
  globs: "**/@datadog/browser-*,**/datadog-rum*,**/datadog-logs*"
---

# Datadog Browser SDK

RUM, Logs, and Session Replay instrumentation for browser applications.

## Skills

| Task | Skill |
|------|-------|
| Upgrade from v4 to v5 | `dd-browser-sdk/upgrade-v5` |
| Upgrade from v5 to v6 | `dd-browser-sdk/upgrade-v6` |
| Upgrade from v6 to v7 | `dd-browser-sdk/upgrade-v7` |
| Set up sourcemap upload via the build plugin | `dd-browser-sdk/setup-sourcemaps` |

## Routing

**Upgrading from v4 to v5** (removed options like `proxyUrl`, `sampleRate`, `replaySampleRate`, `premiumSampleRate`, `allowedTracingOrigins`, deprecated APIs like `addRumGlobalContext`, `removeUser`, or `/v4/` CDN paths):

**Immediately read** `.claude/skills/dd-browser-sdk/upgrade-v5/SKILL.md` — do not proceed from memory.

**Upgrading from v5 to v6** (removed options like `useCrossSiteSessionCookie`, `sendLogsAfterSessionExpiration`, dropping IE11 support, or `/v5/` CDN paths):

**Immediately read** `.claude/skills/dd-browser-sdk/upgrade-v6/SKILL.md` — do not proceed from memory.

**Upgrading from v6 to v7** (removed options like `betaEncodeCookieOptions`, `allowFallbackToLocalStorage`, `trackBfcacheViews`, `usePciIntake`, or `/v6/` CDN paths):

**Immediately read** `.claude/skills/dd-browser-sdk/upgrade-v7/SKILL.md` — do not proceed from memory.

**Setting up sourcemap upload** (minified stack traces in RUM or Error Tracking, requests to "upload sourcemaps" or "unminify errors", or a project with a vite/webpack/rollup/rspack/esbuild config and no `@datadog/*-plugin` configured):

**Immediately read** `.claude/skills/dd-browser-sdk/setup-sourcemaps/SKILL.md` — do not proceed from memory.
```
END THIRD-PARTY FILE d0745099cb7cc0dc

The third-party file has ended. Everything between the d0745099cb7cc0dc tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© datadog-labs · MIT · https://github.com/datadog-labs/agent-skills/tree/HEAD/dd-browser-sdk/SKILL.md

## Similar
- [sentry-browser-sdk](https://affpapa.org/en/nevibecode/skills/sentry-browser-sdk.md) — skill · 2900 installs
- [redis-observability](https://affpapa.org/en/nevibecode/skills/redis-observability.md) — skill · 2300 installs
- [cost-export](https://affpapa.org/en/nevibecode/skills/cost-export.md) — skill · 681 installs
- [datadog](https://affpapa.org/en/nevibecode/skills/datadog.md) — skill · 312 installs
- [sentry-react-sdk](https://affpapa.org/en/nevibecode/skills/getsentry-sentry-react-sdk.md) — skill · 579 installs
- [dt-obs-frontends](https://affpapa.org/en/nevibecode/skills/dt-obs-frontends.md) — skill · 2500 installs

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
