[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CGBT4FEKA4H7XW9A1ZHH6J":3,"skill-same:01M6CGBT4FEKA4H7XW9A1ZHH6J":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M6CGBT4FEKA4H7XW9A1ZHH6J","instrumentation",null,"Create and update Sentry spans, MetaMetrics events, and Segment events — methodology, policies, common pitfalls","MetaMask\u002Fskills","MetaMask","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11744586?v=4","01M6CGATQAN8ZP8HWEZH2379WJ","01M6CGATVJDE1ZMSRM20CFJ5S8",25,"MIT","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fobservability\u002Fskills\u002Finstrumentation\u002Fskill.md",[],[5,18,19,20,21,22,23,24,25,26],"create","update","sentry","methodology","common","events","segment","common pitfalls","pitfalls","2026-11-10 10:12:30",false,"---\nmaturity: experimental\nname: instrumentation\ndescription: Create and update Sentry spans, MetaMetrics events, and Segment events — methodology, policies, common pitfalls\n---\n\n# Analytics Instrumentation\n\n## When To Use\n\n- Adding or modifying a MetaMetrics (Segment) event\n- Adding or modifying a Sentry performance span\n- Estimating event or span volume from production data\n- Auditing existing instrumentation for correctness\n\n---\n\n## Do Not Use When\n\n- Adding local debug logging with no telemetry destination\n- Investigating an existing Sentry error report (use `sentry-mcp-queries`)\n- Internal feature flag evaluation not surfaced as an analytics event\n\n---\n\n## Sentry Spans\n\n### Creating a Span\n\n1. **Register a named trace entry** in the repo's trace name enum before writing any span code. Unnamed spans are invisible in Sentry filters.\n2. **Use the repo's `trace()` wrapper**, not raw `Sentry.startSpan()`. Wrappers handle cross-process context propagation, active-span inheritance, and consistent tag injection.\n3. **Inherit parent automatically** — when no `parentContext` is provided, the wrapper inherits from `Sentry.getActiveSpan()`, making the new span a child of the active parent (e.g., a `pageload` span). That parent is whichever span is active at the call, not necessarily the one that caused the work, which metamask-extension#45527 (stop spans silently attaching to whatever trace happens to be active) proposes to fix. A span started by `trace()` without a callback is active only inside that call, so spans created before its `endTrace()` do not nest under it.\n\n### Updating a Span\n\n- Adding a tag: no governance required\n- Renaming a trace name enum entry: grep all callsites; update enum and references atomically\n- Changing an `op` value: breaks saved queries and dashboards — coordinate with whoever owns them\n- Moving a span's start (`trace()`) or end (`endTrace()`): changes what its duration measures, so a release-over-release delta mixes a performance change with a definition change\n\n---\n\n## MetaMetrics \u002F Segment Events\n\n### Creating an Event\n\n1. **Check the event name enum** — event may already exist under a different phrasing.\n2. **Check the segment tracking plan** — event may be registered under a different name than the enum key.\n3. **Add to the enum**, then implement the `trackEvent` call.\n4. **Pass `excludeMetaMetricsId: true` only for an event that must not carry the user's identity.** It sends the event under the shared anonymous id and drops the profile ids, for every user, not only those who have not opted in. Event names matching `\u002F^send|^confirm\u002Fiu` get it by default unless the caller passes `excludeMetaMetricsId: false` (see data domain `knowledge\u002Fmetrametrics-identity.md`).\n5. **Open a data governance review** before merging. There is usually no CI enforcement on schema registration — this step is easy to skip (see data domain `knowledge\u002Fsegment-governance.md`).\n6. **Register in the team's segment tracking plan** before shipping.\n\n### Updating an Event\n\n- Adding a property: requires governance review and schema update\n- Renaming an event: deprecate old + add new in tracking plan; coordinate on migration window\n- Removing an event: confirm no active dashboards depend on it before removing\n\n---\n\n## Volume Estimation via Sentry\n\nWhen direct Segment access is unavailable, estimate from Sentry production span data:\n\n1. **Find a correlated HTTP endpoint** — one that fires 1:1 with the event.\n2. **Query Sentry Traces Explorer** (aggregate mode):\n   ```\n   span.op:http.client span.description:*{endpoint}*\n   ```\n3. **Read the `count()` aggregate.** Span datasets already extrapolate it by each span's sample weight, so it is the estimate. Do not multiply it by `1 \u002F tracesSampleRate`, which extrapolates twice.\n4. **Interpret as upper bound** — endpoint may have callers outside the event path.\n\nCaveats: sample population is MetaMetrics opted-in users only. The extension's Sentry integration drops every event unless `consentDecisionMade && optedIn`, and Segment gates differently, so attribution across the two pipelines holds at install granularity, not per session. For longer-range (30D+) or release-over-release queries, the sampled count is **not** comparable at face value — older releases are downsampled \u002F retention-truncated and `.0` releases are sample-thin; see `sentry-mcp-queries` (Longer-Range Queries and Percentile Fidelity) and the `performance-attribution` skill.\n\n---\n\n## Common Pitfalls\n\n| Mistake | Correct Approach |\n|---------|-----------------|\n| `excludeMetaMetricsId: true` on an event that needs user identity | It sends the event under the shared anonymous id for every user. Reserve it for events that must be anonymous |\n| Ship event without tracking-plan registration | No CI gate — add governance review explicitly to PR checklist |\n| Raw `Sentry.startSpan()` instead of the repo's `trace()` wrapper | Use the wrapper — handles cross-process context and active-span inheritance |\n| New span with no trace name enum entry | Register enum entry first; unnamed spans are invisible in Sentry filters |\n| Multiply a span `count()` by `1 \u002F tracesSampleRate` | `count()` is already extrapolated, so read it as the estimate |\n| Treat Sentry estimates as exact counts | Probabilistic sample — state sample size and confidence |\n","# Analytics Instrumentation\n\n## When To Use\n\n- Adding or modifying a MetaMetrics (Segment) event\n- Adding or modifying a Sentry performance span\n- Estimating event or span volume from production data\n- Auditing existing instrumentation for correctness\n\n---\n\n## Do Not Use When\n\n- Adding local debug logging with no telemetry destination\n- Investigating an existing Sentry error report (use `sentry-mcp-queries`)\n- Internal feature flag evaluation not surfaced as an analytics event\n\n---\n\n## Sentry Spans\n\n### Creating a Span\n\n1. **Register a named trace entry** in the repo's trace name enum before writing any span code. Unnamed spans are invisible in Sentry filters.\n2. **Use the repo's `trace()` wrapper**, not raw `Sentry.startSpan()`. Wrappers handle cross-process context propagation, active-span inheritance, and consistent tag injection.\n3. **Inherit parent automatically** — when no `parentContext` is provided, the wrapper inherits from `Sentry.getActiveSpan()`, making the new span a child of the active parent (e.g., a `pageload` span). That parent is whichever span is active at the call, not necessarily the one that caused the work, which metamask-extension#45527 (stop spans silently attaching to whatever trace happens to be active) proposes to fix. A span started by `trace()` without a callback is active only inside that call, so spans created before its `endTrace()` do not nest under it.\n\n### Updating a Span\n\n- Adding a tag: no governance required\n- Renaming a trace name enum entry: grep all callsites; update enum and references atomically\n- Changing an `op` value: breaks saved queries and dashboards — coordinate with whoever owns them\n- Moving a span's start (`trace()`) or end (`endTrace()`): changes what its duration measures, so a release-over-release delta mixes a performance change with a definition change\n\n---\n\n## MetaMetrics \u002F Segment Events\n\n### Creating an Event\n\n1. **Check the event name enum** — event may already exist under a different phrasing.\n2. **Check the segment tracking plan** — event may be registered under a different name than the enum key.\n3. **Add to the enum**, then implement the `trackEvent` call.\n4. **Pass `excludeMetaMetricsId: true` only for an event that must not carry the user's identity.** It sends the event under the shared anonymous id and drops the profile ids, for every user, not only those who have not opted in. Event names matching `\u002F^send|^confirm\u002Fiu` get it by default unless the caller passes `excludeMetaMetricsId: false` (see data domain `knowledge\u002Fmetrametrics-identity.md`).\n5. **Open a data governance review** before merging. There is usually no CI enforcement on schema registration — this step is easy to skip (see data domain `knowledge\u002Fsegment-governance.md`).\n6. **Register in the team's segment tracking plan** before shipping.\n\n### Updating an Event\n\n- Adding a property: requires governance review and schema update\n- Renaming an event: deprecate old + add new in tracking plan; coordinate on migration window\n- Removing an event: confirm no active dashboards depend on it before removing\n\n---\n\n## Volume Estimation via Sentry\n\nWhen direct Segment access is unavailable, estimate from Sentry production span data:\n\n1. **Find a correlated HTTP endpoint** — one that fires 1:1 with the event.\n2. **Query Sentry Traces Explorer** (aggregate mode):\n   ```\n   span.op:http.client span.description:*{endpoint}*\n   ```\n3. **Read the `count()` aggregate.** Span datasets already extrapolate it by each span's sample weight, so it is the estimate. Do not multiply it by `1 \u002F tracesSampleRate`, which extrapolates twice.\n4. **Interpret as upper bound** — endpoint may have callers outside the event path.\n\nCaveats: sample population is MetaMetrics opted-in users only. The extension's Sentry integration drops every event unless `consentDecisionMade && optedIn`, and Segment gates differently, so attribution across the two pipelines holds at install granularity, not per session. For longer-range (30D+) or release-over-release queries, the sampled count is **not** comparable at face value — older releases are downsampled \u002F retention-truncated and `.0` releases are sample-thin; see `sentry-mcp-queries` (Longer-Range Queries and Percentile Fidelity) and the `performance-attribution` skill.\n\n---\n\n## Common Pitfalls\n\n| Mistake | Correct Approach |\n|---------|-----------------|\n| `excludeMetaMetricsId: true` on an event that needs user identity | It sends the event under the shared anonymous id for every user. Reserve it for events that must be anonymous |\n| Ship event without tracking-plan registration | No CI gate — add governance review explicitly to PR checklist |\n| Raw `Sentry.startSpan()` instead of the repo's `trace()` wrapper | Use the wrapper — handles cross-process context and active-span inheritance |\n| New span with no trace name enum entry | Register enum entry first; unnamed spans are invisible in Sentry filters |\n| Multiply a span `count()` by `1 \u002F tracesSampleRate` | `count()` is already extrapolated, so read it as the estimate |\n| Treat Sentry estimates as exact counts | Probabilistic sample — state sample size and confidence |\n",{"name":5,"maturity":32,"description":7},"experimental","main","a0ec29ada8d53edf5a3f24370bec058767157433","domains\u002Fobservability\u002Fskills\u002Finstrumentation",11,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills","https:\u002F\u002Fgithub.com\u002FMetaMask","https:\u002F\u002Fmetamask.io","MetaMask brings Ethereum to your web browser","2026-11-14 02:01:03",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add MetaMask\u002Fskills --skill instrumentation",{"tool":48,"command":49},"bunx","bunx skills add MetaMask\u002Fskills --skill instrumentation",{"tool":51,"command":52},"pnpm","pnpm dlx skills add MetaMask\u002Fskills --skill instrumentation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fobservability\u002Fskills\u002Finstrumentation\u002Fskill.md",true,[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"repos\u002Fmetamask-extension.md","REFERENCE","参考文档",3325,"https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fobservability\u002Fskills\u002Finstrumentation\u002Frepos\u002Fmetamask-extension.md",[63,71,79,105,125,132],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7B6HMM9ND19MSEXPDW7Q3F8","recipe-plan-and-dispatch","Plan a ticket with the engineer before a recipe fix-bug or dev run. Agree the acceptance criteria and an implementation plan, write it as an approved plan file, and print the prompt that starts the run with any agent and model. Never edits product code or starts the run.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fagentic\u002Fskills\u002Frecipe-plan-and-dispatch\u002Fskill.md",[],[],"2026-11-15 14:19:17",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":78},"01M72GPQFVTGCPVK22DSDJXEJY","recipe-library-audit","Run every recipe of a team recipe library on one client with mm-harness, classify each result with the failing node and exact error, and review naming and composability. Produces a per-client table; changes nothing.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fagentic\u002Fskills\u002Frecipe-library-audit\u002Fskill.md",[],[],"2026-11-10 22:39:42",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":27},"01M70PKJH3WSTFMSA8VYQWNDW9","recipe-performance","Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold\u002Fwarm\u002Fbackground-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout\u002Fpaint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fagentic\u002Fskills\u002Frecipe-performance\u002Fskill.md",[],[86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,20],"recipe","recipe performance","performance","analysis","app","cold","critical","tasks","react","browser","layout","screen","network","metamask","flow","recipes","deterministic","harness","mm",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":27},"01M6CGJ7AEJCZSRGF3PBE6EWBG","x402-payments","Build x402 payment flows using MetaMask Smart Accounts Kit, machine to machine payments over HTTP with ERC-7710 delegations and ERC-7715 Advanced Permissions","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fweb3-tools\u002Fskills\u002Fx402-payments\u002Fskill.md",[],[112,113,114,115,116,117,118,119,99,120,121,122,123,124],"x402","x402 payments","payments","with","payment","advanced","flows","machine","kit","build","permissions","smart accounts kit","http",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":27},"01M6CGJ4AEKJZJWJ704SZTWQ5T","smart-accounts-kit","Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fweb3-tools\u002Fskills\u002Fsmart-accounts-kit\u002Fskill.md",[],[120,123,122,121,115,117,99],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":27},"01M6CGJ11KGB6862Z1ADYTMKYZ","oh-my-opencode","Multi-agent orchestration plugin for OpenCode. Use when the user wants to install, configure, or operate oh-my-opencode — including agent delegation, ultrawork mode, Prometheus planning, background tasks, category-based task routing, model resolution, tmux integration, or any oh-my-opencode feature. Covers installation, configuration, all agents (Sisyphus, Oracle, Librarian, Explore, Atlas, Prometheus, Metis, Momus), all categories, slash commands, hooks, skills, MCPs, and troubleshooting.","https:\u002F\u002Fgithub.com\u002FMetaMask\u002Fskills\u002Fblob\u002Fmain\u002Fdomains\u002Fweb3-tools\u002Fskills\u002Foh-my-opencode\u002Fskill.md",[],[139,140,141,142,143,144,145,146,93,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164],"oh my opencode","my","opencode","hooks","explore","model","momus","code","ultrawork","install","multi-agent","tmux","prometheus","planning","use","orchestration","categories","operate","mode","metis","configure","when","oracle","agent orchestration","librarian","delegation"]