Skip to content

✨ Add datadog-sdk-event-inspection skill for Claude Code#4263

Open
mormubis wants to merge 7 commits intomainfrom
adlrb/verify-skill
Open

✨ Add datadog-sdk-event-inspection skill for Claude Code#4263
mormubis wants to merge 7 commits intomainfrom
adlrb/verify-skill

Conversation

@mormubis
Copy link
Contributor

@mormubis mormubis commented Mar 2, 2026

Motivation

Adds a Claude Code skill for inspecting Browser SDK event payloads in the sandbox. This provides a reusable, documented workflow for verifying emitted events without relying on network request interception.

Changes

  • Adds .claude/skills/datadog-sdk-event-inspection/SKILL.md — a skill that guides Claude Code to use the window.__ddBrowserSdkExtensionCallback hook for event inspection, with two injection paths (console post-load vs CDP pre-load for initial view events).

Test instructions

Load the skill in a Claude Code session and verify it correctly guides event inspection in the sandbox (yarn devhttp://localhost:8080).

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@mormubis mormubis requested a review from a team as a code owner March 2, 2026 16:26
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebd1ce9c1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Mar 2, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 174.43 KiB 174.43 KiB 0 B 0.00%
Rum Profiler 6.16 KiB 6.16 KiB 0 B 0.00%
Rum Recorder 25.24 KiB 25.24 KiB 0 B 0.00%
Logs 56.84 KiB 56.84 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 130.11 KiB 130.11 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0094 0.0042 -55.32%
RUM - add action 0.0489 0.0144 -70.55%
RUM - add error 0.0379 0.0137 -63.85%
RUM - add timing 0.0061 0.0029 -52.46%
RUM - start view 0.0217 0.0117 -46.08%
RUM - start/stop session replay recording 0.0012 0.0007 -41.67%
Logs - log message 0.0283 0.0182 -35.69%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 25.95 KiB 26.60 KiB +664 B
RUM - add action 50.84 KiB 51.59 KiB +770 B
RUM - add timing 26.68 KiB 26.44 KiB -245 B
RUM - add error 56.47 KiB 54.13 KiB -2.34 KiB
RUM - start/stop session replay recording 25.80 KiB 25.94 KiB +137 B
RUM - start view 451.32 KiB 450.04 KiB -1.28 KiB
Logs - log message 44.45 KiB 44.87 KiB +435 B

🔗 RealWorld

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 2, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 76.76% (+0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2cc1269 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Comment on lines +26 to +34
```dot
digraph injection {
"Need initial view event\nor events from init()?" [shape=diamond];
"Path B: CDP pre-load injection" [shape=box];
"Path A: Console injection" [shape=box];
"Need initial view event\nor events from init()?" -> "Path B: CDP pre-load injection" [label="yes"];
"Need initial view event\nor events from init()?" -> "Path A: Console injection" [label="no"];
}
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ question: can we use mermaid diagram instead? they are commonly rendered in markdown previews

```mermaid
flowchart TD
    Q["Need initial view event<br/>or events from init()?"]
    Q -- "yes" --> B["Path B: CDP pre-load injection"]
    Q -- "no" --> A["Path A: Console injection"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already applied — the mermaid flowchart is in the skill file (commit 279517d).

AGENTS.md Outdated
Comment on lines +152 to +153
- Use it when you need to confirm a RUM, log, or telemetry event contains the expected fields
- Use it when unit tests alone are not sufficient to validate serialized event output
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 thought: ‏I found the sandbox useful for reproducing customer escalations. However, if unit test is not enough, then maybe what we want is an e2e test, which is doing the same thing but stays in the repo to prevent regression.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Added a note to AGENTS.md: 'this skill is a debugging and spot-check tool, not a regression gate. If you need to prevent regressions, write an E2E test instead (see test/e2e/).' (commit 3ec3534)

**Never manually edit** files with a `DO NOT MODIFY IT BY HAND` header (e.g., `telemetryEvent.types.ts`). Changes require a PR in the upstream schema repo first, then regeneration.

## Commit Messages
## Unit Tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔨 warning: ‏It's missing mention of Jasmine and Karma. Without that Claude used to be confused in test APIs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already there — AGENTS.md has - **Test framework**: Jasmine + Karma in the Unit Tests section.

@mormubis mormubis requested a review from thomas-lebeau March 6, 2026 14:45
@mormubis mormubis force-pushed the adlrb/verify-skill branch from d981a16 to 2cc1269 Compare March 9, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants