跳到正文
cccskills
免费在 GitHub 公开

analytics-audit

Analytics audit — SDK config, event naming, funnel completeness, dashboards. Deep-dive for /launch-check analytics.

中文简介正在准备中。当前显示原文说明。

me2resh/apexyard星标 538(GitHub 538 + cccskills 0)
集成工具Google Analytics

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md4.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Writing: read docs/skills/shared/writing-rule.md before you write a durable artifact.

/analytics-audit — Event Taxonomy & Coverage

Deep-dive analytics analysis. Checks that tracking is configured, events follow a naming convention, key user funnels are instrumented, and dashboards exist. Invoke when /launch-check's analytics row shows WARN or FAIL.

Process

Step 1: SDK detection

Grep for analytics SDK initialization:

  • Google Analytics / GA4: gtag, G-, UA-, analytics.js, @google-analytics
  • Mixpanel: mixpanel.init, @mixpanel
  • Amplitude: amplitude.init, @amplitude
  • PostHog: posthog.init, posthog-js
  • Plausible: plausible.io, data-domain
  • Segment: analytics.load, @segment
  • Custom: any track(, capture(, logEvent( patterns

Step 2: Event inventory

Find all tracking calls in the codebase and list them:

  • Event name
  • Where it fires (file + component/handler)
  • Properties sent with the event
  • Whether it has a consistent naming convention (snake_case, camelCase, verb_noun)

Step 3: Funnel coverage

Identify the core user funnels and check if each step is tracked:

FunnelSteps to check
Signuppage_view → form_start → form_submit → signup_complete
Activationfirst_login → key_action_completed → aha_moment
Purchase (if applicable)pricing_view → plan_select → checkout_start → payment_complete
Retentionreturn_visit → feature_usage → session_duration

Step 4: Output

ANALYTICS AUDIT — <project> @ <sha>

SDK: <GA4 / Mixpanel / PostHog / none>
Total events found: <N>
Naming convention: <consistent / inconsistent / none>

| # | Area | Status | Finding |
|----|------|--------|---------|
| E1 | SDK | PASS | GA4 initialized in _app.tsx |
| E2 | Events | WARN | 8 events found, 3 use camelCase, 5 use snake_case |
| E3 | Signup funnel | FAIL | form_submit tracked but signup_complete missing |
| E4 | Dashboard | WARN | No dashboard URL found in config or docs |

Event inventory:
  signup_start (pages/signup.tsx:42)
  form_submit (components/SignupForm.tsx:89)
  page_view (auto, GA4 enhanced measurement)
  ...

Persist the run + render trend

After printing the findings table, persist via the shared audit-history lib so the analytics trend across runs becomes legible. See docs/agdr/AgDR-0019-audit-artefact-persistence.md.

Resolve project name + score + verdict

<project-name> from apexyard.projects.yaml (or basename + /handover reminder if unregistered).

Score: score = max(0, 100 - 25*critical - 10*high - 3*medium - 1*low). Verdict by worst-severity: critical/high → fail, medium → conditional, low/none → pass.

Persist + render

source "$(git rev-parse --show-toplevel)/.claude/hooks/_lib-audit-history.sh"

# Lowercase severity in the payload — the lib expects critical/high/medium/low/info.
payload=$(mktemp); cat > "$payload" <<'EOF'
{
  "schema_version": 1,
  "findings": [
    {"id": "E2", "severity": "medium", "status": "open", "summary": "Mixed event-naming conventions (snake_case + camelCase + Title Case)"},
    {"id": "E3", "severity": "high",   "status": "open", "summary": "signup_complete event missing — can't measure conversion"},
    {"id": "E4", "severity": "medium", "status": "open", "summary": "No dashboard URL found in config or docs"}
  ]
}
EOF

# Body: per templates/audits/analytics-audit.md
body=$(mktemp); cat > "$body" <<'EOF'
... (filled-in body — findings table + Event taxonomy gap + Recommended priority) ...
EOF

ts=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
audit_run_persist "<project-name>" "analytics-audit" "$ts" "fail" 60 "$body" < "$payload"
rm -f "$payload" "$body"

audit_render_trend "<project-name>" "analytics-audit" 5

Opt-in commit

touch projects/<name>/audits/analytics-audit/.audit-history-tracked

Rules

  1. Auto-PASS for non-user-facing projects. CLIs, libraries, and internal tools don't need analytics.
  2. Don't prescribe a specific SDK. Note what's configured, check coverage, suggest improvements.
  3. Flag inconsistent naming — mixed conventions make dashboard queries painful.
  4. Privacy-aware. Flag if PII (email, name, IP) is being sent in event properties.
  5. Always persist via the lib. The persist step runs regardless of opt-in commit state.
  6. Severity vocabulary in the JSON is lowercase. The lib expects critical/high/medium/low/info.

Part of ApexYard — multi-project SDLC framework for Claude Code · MIT.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

WCAG 2.1 AA audit — perceivable, operable, understandable, robust criteria. Deep-dive for /launch-check accessibility.

中文简介正在准备中。当前显示原文说明。

me2resh/apexyard5382026年10月26日 更新

WCAG 2.2 AA audit — perceivable, operable, understandable, robust criteria. Deep-dive for /launch-check accessibility.

中文简介正在准备中。当前显示原文说明。

me2resh/apexyard5382026年10月26日 更新

agdr

免费

Browse / search / show / stats AgDRs across the portfolio — recalls "have we decided this before?".

中文简介正在准备中。当前显示原文说明。

me2resh/apexyard5382026年10月26日 更新

Record per-PR architecture-review approval for design-artifact PRs (required by the architecture gate). ONLY on an explicit per-PR architect "approved".

中文简介正在准备中。当前显示原文说明。

me2resh/apexyard5382026年10月26日 更新

Record per-PR design-review approval (UI merge gate). ONLY on an explicit per-PR designer "approved".

中文简介正在准备中。当前显示原文说明。

me2resh/apexyard5382026年10月26日 更新

Record per-PR CEO approval and merge in one turn. ONLY on an explicit per-PR "approved" — never on umbrella "go".

中文简介正在准备中。当前显示原文说明。

me2resh/apexyard5382026年10月26日 更新

查看 me2resh 的全部技能

报告此技能的问题