[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BHCQVT8G2Q4JQR4MXQ6TKM":3,"skill-same:01M7BHCQVT8G2Q4JQR4MXQ6TKM":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":13,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":48},"01M7BHCQVT8G2Q4JQR4MXQ6TKM","instrument-feature-analytics",null,"Plan analytics instrumentation for a feature. Use when implementing any feature — every feature must ship with telemetry. Decides which events and properties the metrics need (funnels, adoption, status flows), checks compatibility with the existing datalake and event registry, and walks through local, staging, and production verification.","elaf0016\u002Fmistral-vibe-ek-python-elective","elaf0016","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F163859375?v=4","01M7BHCHAX0T30236JC6QH2JYQ","01M7BHCHC0T61ZAD2HD1QH888B",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Felaf0016\u002Fmistral-vibe-ek-python-elective\u002Fblob\u002Fmain\u002F.vibe\u002Fskills\u002Finstrument-feature-analytics\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: instrument-feature-analytics\ndescription: Plan analytics instrumentation for a feature. Use when implementing any feature — every feature must ship with telemetry. Decides which events and properties the metrics need (funnels, adoption, status flows), checks compatibility with the existing datalake and event registry, and walks through local, staging, and production verification.\nmetadata:\n  author: datascience-team\n  version: \"1.0\"\n  display-name: Instrument Feature Analytics\n  short-description: Plan and verify analytics instrumentation for features\n  default-prompt: Use $instrument-feature-analytics to plan the telemetry for a feature before writing tracking code.\nuser-invocable: true\n---\n\n# Instrument a Feature for Analytics\n\nAnswer the tracking questions a software engineer would normally take to a data scientist or data engineer. When they bring one here, answer it the way a data person would, and proactively cover what they didn't think to ask.\n\nThe software engineer already knows how to emit an event technically. The hard part — and the reason they'd normally ask a data person — is deciding *which* events and properties matter for the metrics, and making sure they fit what already exists so the data is actually usable. Events land in `mistral-data.lake_eu.logs_events`.\n\nUse the steps below as the full picture to reason from, not a rigid script: if the software engineer arrives with a specific question, answer that first, then pull in whatever other steps are relevant. If they arrive with \"I'm adding feature X, help me track it\", walk it in order.\n\n## Process\n\n### 1. Understand the feature and the metrics behind it\n\nAsk the software engineer a few questions before anything else:\n\n- **What is the feature?** (a new onboarding step, a way to discover a feature, a status\u002Flifecycle change, an action users repeat…)\n- **What will product and data want to measure about it?** Adoption? A funnel and where people drop off? How often a status changes? Whether a surface gets noticed?\n\nThen translate those questions into the events and properties that would answer them. Common patterns:\n\n- **Funnel (e.g. onboarding):** one event per step (`started`, `step_completed`, `completed`), with a property identifying the step and its order, plus a shared id to stitch the steps of one user together.\n- **Discoverability:** distinguish *seen* from *acted on* — an impression event when the thing is shown and an interaction event when the user engages, so you can compute a noticed→used rate.\n- **Status \u002F lifecycle updates:** one event per transition carrying `from_status` and `to_status` (and what triggered it), so changes can be reconstructed over time.\n- **Repeated action \u002F engagement:** one event per occurrence with enough context (what, where) to segment it.\n\nThe goal of this step is coverage: make sure every question the software engineer named maps to at least one event + the properties needed to slice it. Naming comes after.\n\n### 2. Check what already exists — reuse first, create second\n\nBefore defining any new event, search for existing events that already capture the same (or similar) user action. A new event that duplicates an existing one fragments the data and makes downstream queries harder.\n\nCheck `datalake-dbt` on the software engineer's behalf (they never have to open that repo):\n\n- Read the event registry (`datalake-dbt\u002Fevent_registry\u002F\u003Cservice>.yml`) for the software engineer's service **and for neighboring services that touch the same domain**. Grep broadly — the event you need may already exist under a slightly different name or in a different service's namespace.\n- If an existing event covers the action but is missing a property, **extend it** (add the property) rather than creating a parallel event.\n- If no existing event fits, create a new one — but **reuse property names and types** from related events so the new data composes with the old instead of fragmenting it.\n- Keep one stable type per property and avoid nesting deeper than two levels — these are what let the data be modeled cleanly and stay queryable over time.\n\nFlag anything that would force an awkward downstream change or that won't age well, and propose the compatible shape instead.\n\n### 3. Naming\n\nNames are a data-consistency concern, so keep them conventional: `\u003Cprefix>.\u003Cnoun>.\u003Cverb>`, snake_case, dot-namespaced, at least two segments — the prefix maps to the service (e.g. `vibe.session_initialized`, `harmattan.completion.done`). Reuse the wording of existing similar events rather than inventing a parallel vocabulary.\n\n### 4. Standardized metadata\n\nEvery event must populate the standardized metadata block (`properties.metadata`): `call_source`, `call_type`, `session_id`... Look at existing events in the registry to see which metadata fields are used for the service and carry them over.\n\n### 5. Cover every surface\n\nThe same user action on web, cli, mobile, and api must emit the **same event with the same properties**. List the surfaces in step 1 and confirm each one emits.\n\n### 6. PII\n\nIf any property carries personally identifiable data (raw user content, email, file path, names), flag it explicitly to the data team before shipping — it changes how the field must be stored and queried. Prefer sending an ID over the raw value.\n\n### 7. Verify locally\n\nRun the app with `DEBUG_LEVEL=1 uv run vibe` — every telemetry event is logged right before the API call. If the log line appears, the event will reach the pipeline. Use this to confirm the event fires with the expected properties before deploying.\n\n### 8. Verify in staging\n\nAfter deploying to the staging environment, trigger the action a few times per surface, then run the verification queries below against `mistral-data.lake_eu.logs_events_staging`. Confirm events fire with the right properties and values before promoting to production.\n\n### 9. Verify in production\n\nAfter shipping to production, repeat the same manual tests and run the queries against `mistral-data.lake_eu.logs_events`.\n\n### Verification queries\n\nRun these in Metabase or via the BigQuery connector. Use `logs_events_staging` when verifying in staging, `logs_events` in production.\n\n**Volumetry + completeness of every property** — fill in your event name(s):\n\n```sql\nWITH events AS (\n  SELECT event, properties\n  FROM `mistral-data.lake_eu.logs_events`\n  WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR)\n    AND event IN UNNEST(['vibe.session_initialized'])   -- \u003C- your event name(s)\n),\ntotals AS (\n  SELECT event, COUNT(*) AS total_events\n  FROM events\n  GROUP BY event\n),\nproperty_presence AS (\n  SELECT event, key AS property, COUNT(*) AS present\n  FROM events, UNNEST(JSON_KEYS(properties, 2)) AS key   -- depth 2 = includes metadata.*\n  GROUP BY event, key\n)\nSELECT\n  t.event,\n  t.total_events,\n  p.property,\n  p.present,\n  ROUND(p.present \u002F t.total_events, 3) AS completeness   -- 1.0 = present on every event\nFROM totals t\nLEFT JOIN property_presence p USING (event)\nORDER BY t.event, completeness DESC;\n```\n\nRead it as: `total_events` non-zero and roughly matching your manual test count means the event reaches the lake. Every property you meant to always send should read `1.0`; below that, some code path or surface isn't sending it. A property you expected but don't see at all never fired.\n\n**Distinct values of each property** — this catches what completeness misses (a field always present but always the same wrong constant, an enum sending an unexpected value, an ID coming through empty). List the properties worth inspecting (categorical \u002F enum-like ones; skip high-cardinality IDs):\n\n```sql\nWITH events AS (\n  SELECT properties\n  FROM `mistral-data.lake_eu.logs_events`\n  WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR)\n    AND event IN UNNEST(['vibe.session_initialized'])   -- \u003C- your event name(s)\n)\n-- one block per property you want to inspect; add\u002Fremove blocks as needed:\nSELECT 'surface'      AS property, JSON_VALUE(properties, '$.surface')      AS value, COUNT(*) AS n FROM events GROUP BY value\nUNION ALL\nSELECT 'warm_claimed' AS property, JSON_VALUE(properties, '$.warm_claimed') AS value, COUNT(*) AS n FROM events GROUP BY value\nORDER BY property, n DESC;\n```\n\nEach row is a value and how often it appeared. Check the set of values is what you expect (e.g. `surface` shows `web` and `cli` and nothing weird) and that nothing is unexpectedly `NULL` or empty.\n\nTo confirm per-surface coverage from step 5, break volumetry down by surface:\n\n```sql\nSELECT event, JSON_VALUE(properties, '$.surface') AS surface, COUNT(*) AS n\nFROM `mistral-data.lake_eu.logs_events`\nWHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR)\n  AND event IN UNNEST(['vibe.session_initialized'])\nGROUP BY event, surface\nORDER BY n DESC;\n```\n\nEvery surface you expected should appear with a non-zero count.\n","# Instrument a Feature for Analytics\n\nAnswer the tracking questions a software engineer would normally take to a data scientist or data engineer. When they bring one here, answer it the way a data person would, and proactively cover what they didn't think to ask.\n\nThe software engineer already knows how to emit an event technically. The hard part — and the reason they'd normally ask a data person — is deciding *which* events and properties matter for the metrics, and making sure they fit what already exists so the data is actually usable. Events land in `mistral-data.lake_eu.logs_events`.\n\nUse the steps below as the full picture to reason from, not a rigid script: if the software engineer arrives with a specific question, answer that first, then pull in whatever other steps are relevant. If they arrive with \"I'm adding feature X, help me track it\", walk it in order.\n\n## Process\n\n### 1. Understand the feature and the metrics behind it\n\nAsk the software engineer a few questions before anything else:\n\n- **What is the feature?** (a new onboarding step, a way to discover a feature, a status\u002Flifecycle change, an action users repeat…)\n- **What will product and data want to measure about it?** Adoption? A funnel and where people drop off? How often a status changes? Whether a surface gets noticed?\n\nThen translate those questions into the events and properties that would answer them. Common patterns:\n\n- **Funnel (e.g. onboarding):** one event per step (`started`, `step_completed`, `completed`), with a property identifying the step and its order, plus a shared id to stitch the steps of one user together.\n- **Discoverability:** distinguish *seen* from *acted on* — an impression event when the thing is shown and an interaction event when the user engages, so you can compute a noticed→used rate.\n- **Status \u002F lifecycle updates:** one event per transition carrying `from_status` and `to_status` (and what triggered it), so changes can be reconstructed over time.\n- **Repeated action \u002F engagement:** one event per occurrence with enough context (what, where) to segment it.\n\nThe goal of this step is coverage: make sure every question the software engineer named maps to at least one event + the properties needed to slice it. Naming comes after.\n\n### 2. Check what already exists — reuse first, create second\n\nBefore defining any new event, search for existing events that already capture the same (or similar) user action. A new event that duplicates an existing one fragments the data and makes downstream queries harder.\n\nCheck `datalake-dbt` on the software engineer's behalf (they never have to open that repo):\n\n- Read the event registry (`datalake-dbt\u002Fevent_registry\u002F\u003Cservice>.yml`) for the software engineer's service **and for neighboring services that touch the same domain**. Grep broadly — the event you need may already exist under a slightly different name or in a different service's namespace.\n- If an existing event covers the action but is missing a property, **extend it** (add the property) rather than creating a parallel event.\n- If no existing event fits, create a new one — but **reuse property names and types** from related events so the new data composes with the old instead of fragmenting it.\n- Keep one stable type per property and avoid nesting deeper than two levels — these are what let the data be modeled cleanly and stay queryable over time.\n\nFlag anything that would force an awkward downstream change or that won't age well, and propose the compatible shape instead.\n\n### 3. Naming\n\nNames are a data-consistency concern, so keep them conventional: `\u003Cprefix>.\u003Cnoun>.\u003Cverb>`, snake_case, dot-namespaced, at least two segments — the prefix maps to the service (e.g. `vibe.session_initialized`, `harmattan.completion.done`). Reuse the wording of existing similar events rather than inventing a parallel vocabulary.\n\n### 4. Standardized metadata\n\nEvery event must populate the standardized metadata block (`properties.metadata`): `call_source`, `call_type`, `session_id`... Look at existing events in the registry to see which metadata fields are used for the service and carry them over.\n\n### 5. Cover every surface\n\nThe same user action on web, cli, mobile, and api must emit the **same event with the same properties**. List the surfaces in step 1 and confirm each one emits.\n\n### 6. PII\n\nIf any property carries personally identifiable data (raw user content, email, file path, names), flag it explicitly to the data team before shipping — it changes how the field must be stored and queried. Prefer sending an ID over the raw value.\n\n### 7. Verify locally\n\nRun the app with `DEBUG_LEVEL=1 uv run vibe` — every telemetry event is logged right before the API call. If the log line appears, the event will reach the pipeline. Use this to confirm the event fires with the expected properties before deploying.\n\n### 8. Verify in staging\n\nAfter deploying to the staging environment, trigger the action a few times per surface, then run the verification queries below against `mistral-data.lake_eu.logs_events_staging`. Confirm events fire with the right properties and values before promoting to production.\n\n### 9. Verify in production\n\nAfter shipping to production, repeat the same manual tests and run the queries against `mistral-data.lake_eu.logs_events`.\n\n### Verification queries\n\nRun these in Metabase or via the BigQuery connector. Use `logs_events_staging` when verifying in staging, `logs_events` in production.\n\n**Volumetry + completeness of every property** — fill in your event name(s):\n\n```sql\nWITH events AS (\n  SELECT event, properties\n  FROM `mistral-data.lake_eu.logs_events`\n  WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR)\n    AND event IN UNNEST(['vibe.session_initialized'])   -- \u003C- your event name(s)\n),\ntotals AS (\n  SELECT event, COUNT(*) AS total_events\n  FROM events\n  GROUP BY event\n),\nproperty_presence AS (\n  SELECT event, key AS property, COUNT(*) AS present\n  FROM events, UNNEST(JSON_KEYS(properties, 2)) AS key   -- depth 2 = includes metadata.*\n  GROUP BY event, key\n)\nSELECT\n  t.event,\n  t.total_events,\n  p.property,\n  p.present,\n  ROUND(p.present \u002F t.total_events, 3) AS completeness   -- 1.0 = present on every event\nFROM totals t\nLEFT JOIN property_presence p USING (event)\nORDER BY t.event, completeness DESC;\n```\n\nRead it as: `total_events` non-zero and roughly matching your manual test count means the event reaches the lake. Every property you meant to always send should read `1.0`; below that, some code path or surface isn't sending it. A property you expected but don't see at all never fired.\n\n**Distinct values of each property** — this catches what completeness misses (a field always present but always the same wrong constant, an enum sending an unexpected value, an ID coming through empty). List the properties worth inspecting (categorical \u002F enum-like ones; skip high-cardinality IDs):\n\n```sql\nWITH events AS (\n  SELECT properties\n  FROM `mistral-data.lake_eu.logs_events`\n  WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR)\n    AND event IN UNNEST(['vibe.session_initialized'])   -- \u003C- your event name(s)\n)\n-- one block per property you want to inspect; add\u002Fremove blocks as needed:\nSELECT 'surface'      AS property, JSON_VALUE(properties, '$.surface')      AS value, COUNT(*) AS n FROM events GROUP BY value\nUNION ALL\nSELECT 'warm_claimed' AS property, JSON_VALUE(properties, '$.warm_claimed') AS value, COUNT(*) AS n FROM events GROUP BY value\nORDER BY property, n DESC;\n```\n\nEach row is a value and how often it appeared. Check the set of values is what you expect (e.g. `surface` shows `web` and `cli` and nothing weird) and that nothing is unexpectedly `NULL` or empty.\n\nTo confirm per-surface coverage from step 5, break volumetry down by surface:\n\n```sql\nSELECT event, JSON_VALUE(properties, '$.surface') AS surface, COUNT(*) AS n\nFROM `mistral-data.lake_eu.logs_events`\nWHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 24 HOUR)\n  AND event IN UNNEST(['vibe.session_initialized'])\nGROUP BY event, surface\nORDER BY n DESC;\n```\n\nEvery surface you expected should appear with a non-zero count.\n",{"name":5,"metadata":23,"description":7,"user-invocable":29},{"author":24,"version":25,"display-name":26,"default-prompt":27,"short-description":28},"datascience-team","1.0","Instrument Feature Analytics","Use $instrument-feature-analytics to plan the telemetry for a feature before writing tracking code.","Plan and verify analytics instrumentation for features",true,"main","2001d366b178607ef294bebadd247ea88d7f7807",".vibe\u002Fskills\u002Finstrument-feature-analytics","https:\u002F\u002Fgithub.com\u002Felaf0016\u002Fmistral-vibe-ek-python-elective","https:\u002F\u002Fgithub.com\u002Felaf0016","2026-09-10 18:40:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":29},[38,41,44],{"tool":39,"command":40},"npx","npx skills add elaf0016\u002Fmistral-vibe-ek-python-elective --skill instrument-feature-analytics",{"tool":42,"command":43},"bunx","bunx skills add elaf0016\u002Fmistral-vibe-ek-python-elective --skill instrument-feature-analytics",{"tool":45,"command":46},"pnpm","pnpm dlx skills add elaf0016\u002Fmistral-vibe-ek-python-elective --skill instrument-feature-analytics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Felaf0016\u002Fmistral-vibe-ek-python-elective\u002Fblob\u002Fmain\u002F.vibe\u002Fskills\u002Finstrument-feature-analytics\u002FSKILL.md",[],[50,56,63,70],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7BHD6JWT7N0DS7Z9805D8D6","prompts","https:\u002F\u002Fgithub.com\u002Felaf0016\u002Fmistral-vibe-ek-python-elective\u002Fblob\u002Fmain\u002Fvibe\u002Fcore\u002Ftools\u002Fbuiltins\u002Fprompts\u002Fskill.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M7BHD2B1NJM29FQ2QGD7Y3C9","write-vibe-tests","Write or refactor Mistral Vibe tests with proper decoupling. Use when adding behavior coverage, testing ports\u002Fadapters, replacing brittle mocks, creating fakes, adding characterization tests before refactors, or changing tests under tests\u002F for vibe\u002Fcore, vibe\u002Fcli, vibe\u002Facp, tools, config, sessions, skills, hooks, MCP, or setup.","https:\u002F\u002Fgithub.com\u002Felaf0016\u002Fmistral-vibe-ek-python-elective\u002Fblob\u002Fmain\u002F.vibe\u002Fskills\u002Fwrite-vibe-tests\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M7BHCY81N4Q1J082F3B7V18W","write-vibe-adr","Create or update Architecture Decision Records for the Mistral Vibe Python CLI. Use when a design discussion creates a new architectural constraint, when an undocumented convention causes confusion or review feedback, or when architecture guidance in docs\u002Fadr or AGENTS.md must be changed.","https:\u002F\u002Fgithub.com\u002Felaf0016\u002Fmistral-vibe-ek-python-elective\u002Fblob\u002Fmain\u002F.vibe\u002Fskills\u002Fwrite-vibe-adr\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M7BHCKS2BQTPHV31REX0XE45","create-vibe-feature","Add or modify a feature in the Mistral Vibe Python CLI while following the app architecture ADRs. Use when working in vibe\u002Fcore, vibe\u002Fcli, vibe\u002Facp, vibe\u002Fsetup, built-in tools, config, sessions, skills, hooks, MCP, connectors, or other Vibe feature code.","https:\u002F\u002Fgithub.com\u002Felaf0016\u002Fmistral-vibe-ek-python-elective\u002Fblob\u002Fmain\u002F.vibe\u002Fskills\u002Fcreate-vibe-feature\u002FSKILL.md",[],[]]