Analytics Audit
Review SDK configuration, event naming, funnel tracking, and dashboards before launch.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up β so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/analytics-audit-me2resh/β the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Works for every skill.What this command does
- Makes a new, empty temporary folder.
- Downloads the skill's folder,
.claude/skills/analytics-audit, fromgithub.com/me2resh/apexyard(branchmain), the GitHub repository it's listed from. You get the version that is there now, not a copy we keep. - Copies that folder to
~/.claude/skills/analytics-audit-me2resh/. - Deletes the temporary folder.
Installing runs none of the skill's files; it only downloads and copies them. When you later use the skill, Claude follows its SKILL.md and may run scripts that come with it. Read them first.
Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description β no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the βWhat this skill doesβ section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Analytics audit β SDK config, event naming, funnel completeness, dashboards. Deep-dive for /launch-check analytics.
What this skill does
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:
| Funnel | Steps to check |
|---|---|
| Signup | page_view β form_start β form_submit β signup_complete |
| Activation | first_login β key_action_completed β aha_moment |
| Purchase (if applicable) | pricing_view β plan_select β checkout_start β payment_complete |
| Retention | return_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
- Auto-PASS for non-user-facing projects. CLIs, libraries, and internal tools don't need analytics.
- Don't prescribe a specific SDK. Note what's configured, check coverage, suggest improvements.
- Flag inconsistent naming β mixed conventions make dashboard queries painful.
- Privacy-aware. Flag if PII (email, name, IP) is being sent in event properties.
- Always persist via the lib. The persist step runs regardless of opt-in commit state.
- 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.
Related skills
App Store Listing Audit
coreyhaines31
Analyze your app listing against best practices and get a prioritized optimization plan.
Co-Marketing Partnerships
coreyhaines31
Find ideal partners and plan joint marketing campaigns with other companies.
Cold Email Writer
coreyhaines31
Write B2B cold emails and follow-up sequences designed to get replies.
Community-Led Growth
coreyhaines31
Build and grow online communities to drive product adoption and customer loyalty.