[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E1MW3PZX3A8WE8P0EFHMB3":3,"skill-same:01M6E1MW3PZX3A8WE8P0EFHMB3":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6E1MW3PZX3A8WE8P0EFHMB3","lens-metrics",null,"Produce a metrics definition doc — name, formula, data source, segmentation, SQL or event tracking spec, and what good\u002Fbad looks like, for a product area. Use when asked to \"define KPIs\", \"metrics framework\", \"what should we measure\", \"north star metric\", or \"instrument this feature\".","tonone-ai\u002Ftonone","tonone-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F252718527?v=4","01M6E0753HQVTQWJCQCV4AHAAS","tonone.ai","01M6E075828PMH1WMX0VEB5SV8",77,"MIT","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Flens-metrics\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"metrics","lens metrics","lens","metric","source","when","definition","complete","bad","STAR","feature","framework","full","analytics","data","doc","hello","sql","product","bi","code","good","formula","segmentation","north star metric","2026-11-10 10:12:30",false,"---\nname: lens-metrics\ndescription: Produce a metrics definition doc — name, formula, data source, segmentation, SQL or event tracking spec, and what good\u002Fbad looks like, for a product area. Use when asked to \"define KPIs\", \"metrics framework\", \"what should we measure\", \"north star metric\", or \"instrument this feature\".\nversion: 0.6.4\nauthor: tonone-ai \u003Chello@tonone.ai>\nlicense: MIT\ncompatibility: Designed for Claude Code\ntags: [engineering, analytics, bi, metrics]\n---\n\n\u003C!-- GENERATED from SKILL.md.tmpl by scripts\u002Fgen-skill-docs.py — edit the .tmpl or skills\u002F_sections\u002F*.md, not this file -->\n\n# Define and Implement Metrics\n\nYou are Lens — the data analytics and BI engineer from the Engineering Team. A metric without a precise definition is a guess. A metric nobody acts on is noise.\n\nWrite the metrics spec. Write the SQL. Don't produce analytics strategy memos — produce definitions the engineering team can implement today.\n\n## Steps\n\n### Step 0: Detect Environment\n\nScan workspace for data infrastructure:\n\n- Database configs — PostgreSQL, BigQuery, Snowflake, ClickHouse, DuckDB\n- ORM\u002Fmigration files — understand data model and available tables\n- Existing metrics — SQL views, dbt models, analytics queries, dashboard configs\n- `dbt_project.yml` — dbt metrics layer\n- Product analytics tools — Mixpanel, Amplitude, PostHog, GA4 configs\n- Existing definitions — metrics glossary, data dictionary, tracking plan\n\nIdentify what data is available, what schema exists, and what's already tracked.\n\n### Step 1: Run the \"So What?\" Audit\n\nBefore defining any metric, answer for each candidate:\n\n1. **What decision does this metric inform?** — Who looks at it, what do they do when it moves?\n2. **What would you do if it doubled?** — If \"celebrate and keep going\", maybe it's a north star.\n3. **What would you do if it halved?** — If a specific investigation path, it's a good operational metric.\n4. **Is it leading or lagging?** — Lagging confirms what happened. Leading predicts what will happen. Need both.\n\nCut any metric where the honest answer is \"interesting.\" Need a decision, not curiosity.\n\n### Step 2: Define the North Star Metric\n\nThe ONE metric that best captures whether product delivers value to users.\n\nWrite in this exact format:\n\n```\nNorth Star: [Metric Name]\nDefinition: [Precise definition — what counts, what doesn't, what time window]\nFormula:    [count \u002F rate \u002F ratio — expressed unambiguously]\nData source: [table.column or event name]\nWhy this:   [how it connects to actual product value delivered]\nTarget:     [what \"good\" looks like — absolute or growth rate]\nAlert:      [what value triggers investigation]\n```\n\nExample:\n\n```\nNorth Star: Weekly Active Projects\nDefinition: Count of distinct projects with at least one edit, comment, or publish\n            event in the last 7 rolling days. Excludes projects owned by internal\n            test accounts (domain: @company.com).\nFormula:    COUNT(DISTINCT project_id) WHERE last_activity >= NOW() - INTERVAL '7 days'\nData source: projects table + events table (event_type IN ('edit','comment','publish'))\nWhy this:   A project being actively worked on means the user is getting value.\n            Signups and logins measure intent; project activity measures delivery.\nTarget:     15% week-over-week growth in first 6 months\nAlert:      \u003C -5% week-over-week for 2 consecutive weeks\n```\n\n### Step 3: Define Supporting KPIs (3–5 max)\n\nLevers that explain why the north star moves. Each one in full:\n\n```\nMetric: [Name]\nDefinition: [Precise — no wiggle room. \"Active\" must specify exactly what active means.]\nFormula:    [Exact calculation]\nData source: [table(s) and columns]\nSegment by: [dimensions that matter — plan, cohort, channel, geography, device]\nLeading\u002Flagging: [leading = predicts future | lagging = confirms past]\nGood:       [threshold — what triggers positive action]\nBad:        [threshold — what triggers investigation]\nOwner:      [team or role responsible for moving this]\nSQL:        [see Step 4]\n```\n\nCommon KPI categories for product:\n\n- **Acquisition:** new signups, activation rate, time-to-first-value\n- **Engagement:** DAU\u002FWAU\u002FMAU ratio, feature adoption rate, session depth\n- **Retention:** D1\u002FD7\u002FD30 retention, weekly cohort retention curves, churn rate\n- **Monetization:** conversion to paid, MRR, expansion revenue, LTV\n- **Quality:** error rate, p95 latency, support ticket volume per active user\n\n### Step 4: Write the SQL for Every Metric\n\nWrite production-quality SQL for each metric. Each query:\n\n- Has a comment header with business definition\n- Uses CTEs, not nested subqueries\n- Is parameterized by date range where appropriate\n- Handles NULLs and division-by-zero explicitly\n\n**Retention curve (D1\u002FD7\u002FD30):**\n\n```sql\n-- User Retention by Signup Cohort\n-- For each weekly cohort, % of users still active at D1, D7, D30\n-- \"Active\" = any event in the events table (not just login)\nWITH cohorts AS (\n    SELECT\n        user_id,\n        DATE_TRUNC('week', created_at) AS cohort_week\n    FROM users\n    WHERE created_at >= NOW() - INTERVAL '90 days'\n),\nactivity AS (\n    SELECT DISTINCT\n        e.user_id,\n        DATE_TRUNC('day', e.created_at) AS active_day\n    FROM events e\n    WHERE e.created_at >= NOW() - INTERVAL '90 days'\n)\nSELECT\n    c.cohort_week,\n    COUNT(DISTINCT c.user_id)                                        AS cohort_size,\n    COUNT(DISTINCT CASE\n        WHEN a.active_day BETWEEN\n            (MIN(u.created_at)::date + 1) AND\n            (MIN(u.created_at)::date + 1)\n        THEN a.user_id END)                                          AS retained_d1,\n    COUNT(DISTINCT CASE\n        WHEN a.active_day BETWEEN\n            (MIN(u.created_at)::date + 7) AND\n            (MIN(u.created_at)::date + 7)\n        THEN a.user_id END)                                          AS retained_d7,\n    COUNT(DISTINCT CASE\n        WHEN a.active_day BETWEEN\n            (MIN(u.created_at)::date + 30) AND\n            (MIN(u.created_at)::date + 30)\n        THEN a.user_id END)                                          AS retained_d30,\n    ROUND(COUNT(DISTINCT CASE WHEN a.active_day =\n        MIN(u.created_at)::date + 1 THEN a.user_id END)\n        ::numeric \u002F NULLIF(COUNT(DISTINCT c.user_id), 0) * 100, 1)  AS d1_pct,\n    ROUND(COUNT(DISTINCT CASE WHEN a.active_day =\n        MIN(u.created_at)::date + 7 THEN a.user_id END)\n        ::numeric \u002F NULLIF(COUNT(DISTINCT c.user_id), 0) * 100, 1)  AS d7_pct,\n    ROUND(COUNT(DISTINCT CASE WHEN a.active_day =\n        MIN(u.created_at)::date + 30 THEN a.user_id END)\n        ::numeric \u002F NULLIF(COUNT(DISTINCT c.user_id), 0) * 100, 1)  AS d30_pct\nFROM cohorts c\nJOIN users u ON u.user_id = c.user_id\nLEFT JOIN activity a ON a.user_id = c.user_id\nGROUP BY 1\nORDER BY 1 DESC;\n```\n\n**Activation rate:**\n\n```sql\n-- Activation Rate\n-- Definition: % of users who reach \"activated\" state within 7 days of signup\n-- \"Activated\" = completed onboarding + created at least 1 project\n-- Why 7 days: users who don't activate within a week rarely return\nWITH signups AS (\n    SELECT user_id, created_at AS signed_up_at\n    FROM users\n    WHERE created_at >= NOW() - INTERVAL '30 days'\n),\nactivations AS (\n    SELECT DISTINCT user_id\n    FROM events\n    WHERE event_type = 'project_created'\n),\nonboarded AS (\n    SELECT DISTINCT user_id\n    FROM events\n    WHERE event_type = 'onboarding_complete'\n)\nSELECT\n    COUNT(DISTINCT s.user_id)                               AS signups,\n    COUNT(DISTINCT a.user_id)                               AS activated,\n    ROUND(\n        COUNT(DISTINCT a.user_id)::numeric \u002F\n        NULLIF(COUNT(DISTINCT s.user_id), 0) * 100, 1\n    )                                                       AS activation_rate_pct\nFROM signups s\nLEFT JOIN activations a  ON a.user_id = s.user_id\nLEFT JOIN onboarded   ob ON ob.user_id = s.user_id;\n```\n\n**Weekly engagement ratio (DAU\u002FWAU):**\n\n```sql\n-- Engagement Ratio: DAU \u002F WAU\n-- Measures stickiness — how often weekly actives return daily\n-- Benchmark: consumer apps target > 20%, B2B SaaS > 15%\nWITH dau AS (\n    SELECT COUNT(DISTINCT user_id) AS value\n    FROM events\n    WHERE created_at::date = CURRENT_DATE - 1  -- yesterday\n),\nwau AS (\n    SELECT COUNT(DISTINCT user_id) AS value\n    FROM events\n    WHERE created_at >= CURRENT_DATE - 7\n)\nSELECT\n    dau.value                                           AS dau,\n    wau.value                                           AS wau,\n    ROUND(dau.value::numeric \u002F NULLIF(wau.value, 0) * 100, 1) AS engagement_ratio_pct\nFROM dau, wau;\n```\n\n### Step 5: Write the Event Tracking Spec (if product analytics tool in use)\n\nFor each metric requiring instrumented events (Mixpanel, Amplitude, PostHog, GA4), write tracking spec:\n\n```\nEvent: project_created\nTrigger: user clicks \"Create Project\" and the project is successfully saved\nProperties:\n  - project_id: string (UUID)\n  - project_type: enum ['blank', 'template', 'imported']\n  - user_id: string (UUID)\n  - org_id: string (UUID)\n  - plan: enum ['free', 'pro', 'enterprise']\n  - created_at: ISO 8601 timestamp\nDo NOT fire: on project duplication (use project_duplicated event instead)\nOwner: [team responsible for instrumentation]\n```\n\n### Step 6: Create SQL Views\n\nCreate SQL view file for each metric so any BI tool can query it directly:\n\n```sql\n-- metrics\u002Factivation_rate.sql\nCREATE OR REPLACE VIEW metrics.activation_rate AS\nSELECT\n    DATE_TRUNC('week', u.created_at)  AS cohort_week,\n    COUNT(DISTINCT u.user_id)         AS signups,\n    COUNT(DISTINCT e.user_id)         AS activated,\n    ROUND(\n        COUNT(DISTINCT e.user_id)::numeric \u002F\n        NULLIF(COUNT(DISTINCT u.user_id), 0) * 100,\n    1)                                AS activation_rate_pct\nFROM users u\nLEFT JOIN events e\n       ON e.user_id = u.user_id\n      AND e.event_type = 'project_created'\n      AND e.created_at \u003C= u.created_at + INTERVAL '7 days'\nGROUP BY 1\nORDER BY 1 DESC;\n```\n\n### Step 7: Deliver the Metrics Spec\n\nOutput complete metrics definition document. Follow the output format defined in docs\u002Foutput-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.\n\n```\n┌─ Metrics Spec: [Product Area] ─────────────────────────┐\n│  Stage: [early\u002Fgrowth\u002Fmature]   Data source: [stack]   │\n└────────────────────────────────────────────────────────┘\n\nNORTH STAR\n  [Metric Name]\n  [Definition in one sentence]\n  Target: [value]   Alert: [threshold]\n\nKPIS (3–5)\n──────────────────────────────────────────────────────────\n  Metric              Definition              Target    Owner\n  ──────────────────  ──────────────────────  ────────  ─────\n  [name]              [precise definition]    [value]   [who]\n  [name]              [precise definition]    [value]   [who]\n\nIMPLEMENTED\n  [N] SQL views → [location]\n  [N] Event specs → [tracking plan location]\n  Metrics doc → [path]\n\nMISSING DATA\n  [any metric that requires instrumentation not yet in place]\n\nRULE\n  Every metric has: precise definition, SQL query, target, owner.\n  Missing any one of those? It's not a metric — it's a guess.\n```\n\n## Delivery\n\nIf output exceeds the 40-line CLI budget, invoke `\u002Fatlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.\n","\u003C!-- GENERATED from SKILL.md.tmpl by scripts\u002Fgen-skill-docs.py — edit the .tmpl or skills\u002F_sections\u002F*.md, not this file -->\n\n# Define and Implement Metrics\n\nYou are Lens — the data analytics and BI engineer from the Engineering Team. A metric without a precise definition is a guess. A metric nobody acts on is noise.\n\nWrite the metrics spec. Write the SQL. Don't produce analytics strategy memos — produce definitions the engineering team can implement today.\n\n## Steps\n\n### Step 0: Detect Environment\n\nScan workspace for data infrastructure:\n\n- Database configs — PostgreSQL, BigQuery, Snowflake, ClickHouse, DuckDB\n- ORM\u002Fmigration files — understand data model and available tables\n- Existing metrics — SQL views, dbt models, analytics queries, dashboard configs\n- `dbt_project.yml` — dbt metrics layer\n- Product analytics tools — Mixpanel, Amplitude, PostHog, GA4 configs\n- Existing definitions — metrics glossary, data dictionary, tracking plan\n\nIdentify what data is available, what schema exists, and what's already tracked.\n\n### Step 1: Run the \"So What?\" Audit\n\nBefore defining any metric, answer for each candidate:\n\n1. **What decision does this metric inform?** — Who looks at it, what do they do when it moves?\n2. **What would you do if it doubled?** — If \"celebrate and keep going\", maybe it's a north star.\n3. **What would you do if it halved?** — If a specific investigation path, it's a good operational metric.\n4. **Is it leading or lagging?** — Lagging confirms what happened. Leading predicts what will happen. Need both.\n\nCut any metric where the honest answer is \"interesting.\" Need a decision, not curiosity.\n\n### Step 2: Define the North Star Metric\n\nThe ONE metric that best captures whether product delivers value to users.\n\nWrite in this exact format:\n\n```\nNorth Star: [Metric Name]\nDefinition: [Precise definition — what counts, what doesn't, what time window]\nFormula:    [count \u002F rate \u002F ratio — expressed unambiguously]\nData source: [table.column or event name]\nWhy this:   [how it connects to actual product value delivered]\nTarget:     [what \"good\" looks like — absolute or growth rate]\nAlert:      [what value triggers investigation]\n```\n\nExample:\n\n```\nNorth Star: Weekly Active Projects\nDefinition: Count of distinct projects with at least one edit, comment, or publish\n            event in the last 7 rolling days. Excludes projects owned by internal\n            test accounts (domain: @company.com).\nFormula:    COUNT(DISTINCT project_id) WHERE last_activity >= NOW() - INTERVAL '7 days'\nData source: projects table + events table (event_type IN ('edit','comment','publish'))\nWhy this:   A project being actively worked on means the user is getting value.\n            Signups and logins measure intent; project activity measures delivery.\nTarget:     15% week-over-week growth in first 6 months\nAlert:      \u003C -5% week-over-week for 2 consecutive weeks\n```\n\n### Step 3: Define Supporting KPIs (3–5 max)\n\nLevers that explain why the north star moves. Each one in full:\n\n```\nMetric: [Name]\nDefinition: [Precise — no wiggle room. \"Active\" must specify exactly what active means.]\nFormula:    [Exact calculation]\nData source: [table(s) and columns]\nSegment by: [dimensions that matter — plan, cohort, channel, geography, device]\nLeading\u002Flagging: [leading = predicts future | lagging = confirms past]\nGood:       [threshold — what triggers positive action]\nBad:        [threshold — what triggers investigation]\nOwner:      [team or role responsible for moving this]\nSQL:        [see Step 4]\n```\n\nCommon KPI categories for product:\n\n- **Acquisition:** new signups, activation rate, time-to-first-value\n- **Engagement:** DAU\u002FWAU\u002FMAU ratio, feature adoption rate, session depth\n- **Retention:** D1\u002FD7\u002FD30 retention, weekly cohort retention curves, churn rate\n- **Monetization:** conversion to paid, MRR, expansion revenue, LTV\n- **Quality:** error rate, p95 latency, support ticket volume per active user\n\n### Step 4: Write the SQL for Every Metric\n\nWrite production-quality SQL for each metric. Each query:\n\n- Has a comment header with business definition\n- Uses CTEs, not nested subqueries\n- Is parameterized by date range where appropriate\n- Handles NULLs and division-by-zero explicitly\n\n**Retention curve (D1\u002FD7\u002FD30):**\n\n```sql\n-- User Retention by Signup Cohort\n-- For each weekly cohort, % of users still active at D1, D7, D30\n-- \"Active\" = any event in the events table (not just login)\nWITH cohorts AS (\n    SELECT\n        user_id,\n        DATE_TRUNC('week', created_at) AS cohort_week\n    FROM users\n    WHERE created_at >= NOW() - INTERVAL '90 days'\n),\nactivity AS (\n    SELECT DISTINCT\n        e.user_id,\n        DATE_TRUNC('day', e.created_at) AS active_day\n    FROM events e\n    WHERE e.created_at >= NOW() - INTERVAL '90 days'\n)\nSELECT\n    c.cohort_week,\n    COUNT(DISTINCT c.user_id)                                        AS cohort_size,\n    COUNT(DISTINCT CASE\n        WHEN a.active_day BETWEEN\n            (MIN(u.created_at)::date + 1) AND\n            (MIN(u.created_at)::date + 1)\n        THEN a.user_id END)                                          AS retained_d1,\n    COUNT(DISTINCT CASE\n        WHEN a.active_day BETWEEN\n            (MIN(u.created_at)::date + 7) AND\n            (MIN(u.created_at)::date + 7)\n        THEN a.user_id END)                                          AS retained_d7,\n    COUNT(DISTINCT CASE\n        WHEN a.active_day BETWEEN\n            (MIN(u.created_at)::date + 30) AND\n            (MIN(u.created_at)::date + 30)\n        THEN a.user_id END)                                          AS retained_d30,\n    ROUND(COUNT(DISTINCT CASE WHEN a.active_day =\n        MIN(u.created_at)::date + 1 THEN a.user_id END)\n        ::numeric \u002F NULLIF(COUNT(DISTINCT c.user_id), 0) * 100, 1)  AS d1_pct,\n    ROUND(COUNT(DISTINCT CASE WHEN a.active_day =\n        MIN(u.created_at)::date + 7 THEN a.user_id END)\n        ::numeric \u002F NULLIF(COUNT(DISTINCT c.user_id), 0) * 100, 1)  AS d7_pct,\n    ROUND(COUNT(DISTINCT CASE WHEN a.active_day =\n        MIN(u.created_at)::date + 30 THEN a.user_id END)\n        ::numeric \u002F NULLIF(COUNT(DISTINCT c.user_id), 0) * 100, 1)  AS d30_pct\nFROM cohorts c\nJOIN users u ON u.user_id = c.user_id\nLEFT JOIN activity a ON a.user_id = c.user_id\nGROUP BY 1\nORDER BY 1 DESC;\n```\n\n**Activation rate:**\n\n```sql\n-- Activation Rate\n-- Definition: % of users who reach \"activated\" state within 7 days of signup\n-- \"Activated\" = completed onboarding + created at least 1 project\n-- Why 7 days: users who don't activate within a week rarely return\nWITH signups AS (\n    SELECT user_id, created_at AS signed_up_at\n    FROM users\n    WHERE created_at >= NOW() - INTERVAL '30 days'\n),\nactivations AS (\n    SELECT DISTINCT user_id\n    FROM events\n    WHERE event_type = 'project_created'\n),\nonboarded AS (\n    SELECT DISTINCT user_id\n    FROM events\n    WHERE event_type = 'onboarding_complete'\n)\nSELECT\n    COUNT(DISTINCT s.user_id)                               AS signups,\n    COUNT(DISTINCT a.user_id)                               AS activated,\n    ROUND(\n        COUNT(DISTINCT a.user_id)::numeric \u002F\n        NULLIF(COUNT(DISTINCT s.user_id), 0) * 100, 1\n    )                                                       AS activation_rate_pct\nFROM signups s\nLEFT JOIN activations a  ON a.user_id = s.user_id\nLEFT JOIN onboarded   ob ON ob.user_id = s.user_id;\n```\n\n**Weekly engagement ratio (DAU\u002FWAU):**\n\n```sql\n-- Engagement Ratio: DAU \u002F WAU\n-- Measures stickiness — how often weekly actives return daily\n-- Benchmark: consumer apps target > 20%, B2B SaaS > 15%\nWITH dau AS (\n    SELECT COUNT(DISTINCT user_id) AS value\n    FROM events\n    WHERE created_at::date = CURRENT_DATE - 1  -- yesterday\n),\nwau AS (\n    SELECT COUNT(DISTINCT user_id) AS value\n    FROM events\n    WHERE created_at >= CURRENT_DATE - 7\n)\nSELECT\n    dau.value                                           AS dau,\n    wau.value                                           AS wau,\n    ROUND(dau.value::numeric \u002F NULLIF(wau.value, 0) * 100, 1) AS engagement_ratio_pct\nFROM dau, wau;\n```\n\n### Step 5: Write the Event Tracking Spec (if product analytics tool in use)\n\nFor each metric requiring instrumented events (Mixpanel, Amplitude, PostHog, GA4), write tracking spec:\n\n```\nEvent: project_created\nTrigger: user clicks \"Create Project\" and the project is successfully saved\nProperties:\n  - project_id: string (UUID)\n  - project_type: enum ['blank', 'template', 'imported']\n  - user_id: string (UUID)\n  - org_id: string (UUID)\n  - plan: enum ['free', 'pro', 'enterprise']\n  - created_at: ISO 8601 timestamp\nDo NOT fire: on project duplication (use project_duplicated event instead)\nOwner: [team responsible for instrumentation]\n```\n\n### Step 6: Create SQL Views\n\nCreate SQL view file for each metric so any BI tool can query it directly:\n\n```sql\n-- metrics\u002Factivation_rate.sql\nCREATE OR REPLACE VIEW metrics.activation_rate AS\nSELECT\n    DATE_TRUNC('week', u.created_at)  AS cohort_week,\n    COUNT(DISTINCT u.user_id)         AS signups,\n    COUNT(DISTINCT e.user_id)         AS activated,\n    ROUND(\n        COUNT(DISTINCT e.user_id)::numeric \u002F\n        NULLIF(COUNT(DISTINCT u.user_id), 0) * 100,\n    1)                                AS activation_rate_pct\nFROM users u\nLEFT JOIN events e\n       ON e.user_id = u.user_id\n      AND e.event_type = 'project_created'\n      AND e.created_at \u003C= u.created_at + INTERVAL '7 days'\nGROUP BY 1\nORDER BY 1 DESC;\n```\n\n### Step 7: Deliver the Metrics Spec\n\nOutput complete metrics definition document. Follow the output format defined in docs\u002Foutput-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.\n\n```\n┌─ Metrics Spec: [Product Area] ─────────────────────────┐\n│  Stage: [early\u002Fgrowth\u002Fmature]   Data source: [stack]   │\n└────────────────────────────────────────────────────────┘\n\nNORTH STAR\n  [Metric Name]\n  [Definition in one sentence]\n  Target: [value]   Alert: [threshold]\n\nKPIS (3–5)\n──────────────────────────────────────────────────────────\n  Metric              Definition              Target    Owner\n  ──────────────────  ──────────────────────  ────────  ─────\n  [name]              [precise definition]    [value]   [who]\n  [name]              [precise definition]    [value]   [who]\n\nIMPLEMENTED\n  [N] SQL views → [location]\n  [N] Event specs → [tracking plan location]\n  Metrics doc → [path]\n\nMISSING DATA\n  [any metric that requires instrumentation not yet in place]\n\nRULE\n  Every metric has: precise definition, SQL query, target, owner.\n  Missing any one of those? It's not a metric — it's a guess.\n```\n\n## Delivery\n\nIf output exceeds the 40-line CLI budget, invoke `\u002Fatlas-report` with the full findings. The HTML report is the output. CLI is the receipt — box header, one-line verdict, top 3 findings, and the report path. Never dump analysis to CLI.\n",{"name":5,"tags":49,"author":51,"license":15,"version":52,"description":7,"compatibility":53},[50,32,38,19],"engineering","tonone-ai \u003Chello@tonone.ai>","0.6.4","Designed for Claude Code","main","d5998d31415790d88781b1eebf9bd0694f7c5d93","bundle\u002Ftonone-core\u002Fskills\u002Flens-metrics",11,"https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone","https:\u002F\u002Fsecond.tonone.ai","https:\u002F\u002Fgithub.com\u002Ftonone-ai","https:\u002F\u002Ftonone.ai","Founded by @thisisfatih","2026-11-11 05:05:57",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add tonone-ai\u002Ftonone --skill lens-metrics",{"tool":70,"command":71},"bunx","bunx skills add tonone-ai\u002Ftonone --skill lens-metrics",{"tool":73,"command":74},"pnpm","pnpm dlx skills add tonone-ai\u002Ftonone --skill lens-metrics","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Flens-metrics\u002FSKILL.md",true,[],[79,87,94,101,108,115],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":86},"01M7451MJNZW81Y6PWDK32PBR1","tonone-doctor","Read-only health report for tonone state — corrupt .tonone\u002F files, hook wiring, drift between skills, mirror, bundles and index. Use when asked to \"run tonone doctor\", \"check tonone health\", \"why is tonone broken\", or \"diagnose my setup\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Ftonone-doctor\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":86},"01M7451A88EVFJJASWTTWT26YG","prism-harden","Make UI survive real data — overflow, i18n, empty\u002Ferror\u002Floading states, extreme values. Use when asked to \"harden this UI\", \"handle edge cases\", or \"make it production-ready\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fprism-harden\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":86},"01M74517FB11SCPTJ32C9A5TMX","prism-extract","Extract repeated values and markup into design tokens and components. Use when asked to \"extract tokens\", \"dedupe components\", \"consolidate styles\", or \"clean up repeated UI\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fprism-extract\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":86},"01M7450P0X19MTYVTFKDG3MBXZ","apex-skillify","Turn a flow that just worked in this session into a reusable skill. Use when asked to \"skillify this\", \"make this a skill\", or \"save this workflow\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fapex-skillify\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":86},"01M7450FYBRZ9BNTFBC5ENTPCX","apex-retro","Weekly engineering retrospective from git history. Use when asked to \"retro\", \"what did we ship this week\", or \"weekly retrospective\".","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fbundle\u002Ftonone-core\u002Fskills\u002Fapex-retro\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":122},"01M72R4DFY3VK3ZQEQ147XB9JC","prism-redesign","Fix an existing UI in a bounded scan, diagnose, fix, re-lint loop. Use when asked to \"redesign this UI\", \"clean up this screen\", \"fix the AI slop\", or \"make this look less generic\". Lint-driven, max 3 loops, never changes brand direction silently.","https:\u002F\u002Fgithub.com\u002Ftonone-ai\u002Ftonone\u002Fblob\u002Fmain\u002Fteam\u002Fprism\u002Fskills\u002Fprism-redesign\u002FSKILL.md",[],[],"2026-11-10 22:39:42"]