analytics-tracking — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited analytics-tracking (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are in AUTONOMOUS MODE. Do NOT ask questions. Detect everything from the codebase and proceed.
PURPOSE: Set up production-ready analytics event tracking. Auto-detect the project's framework and the requested analytics provider. Install the SDK, create a framework-agnostic analytics service, define a core event taxonomy, and instrument key user flows.
TASK: $ARGUMENTS
============================================================ PHASE 0: DETECTION ============================================================
============================================================ PHASE 1: SDK INSTALLATION ============================================================
Install the correct SDK for the detected provider and framework:
AMPLITUDE:
@amplitude/analytics-browser (web), @amplitude/analytics-node (server)amplitude_flutter@amplitude/analytics-react-nativeMIXPANEL:
mixpanel-browser (web), mixpanel (server)mixpanel_fluttermixpanel-react-nativePOSTHOG:
posthog-js (web), posthog-node (server)posthog_flutterposthog-react-nativeGA4:
@google-analytics/data (server), gtag.js snippet (web)firebase_analytics@react-native-firebase/analyticsAfter installing:
ANALYTICS_API_KEY, ANALYTICS_PROJECT_ID.============================================================ PHASE 2: ANALYTICS SERVICE ============================================================
Create a framework-agnostic analytics service wrapper. This abstraction lets the team swap providers without touching feature code.
FILE LOCATION:
src/lib/analytics.ts or src/services/analytics.tslib/services/analytics_service.dartapp/services/analytics.pyinternal/analytics/analytics.goTHE SERVICE MUST EXPOSE:
init(config) -- Initialize the SDK with API key and options. identify(userId, properties) -- Set the current user identity and traits. track(eventName, properties) -- Track a named event with arbitrary properties. page(name, properties) -- Track a page/screen view. reset() -- Clear the user identity on logout. setUserProperties(properties) -- Update user-level properties without an event. group(groupType, groupId) -- Associate user with a group/company (if supported). flush() -- Force-send queued events (for server-side or before app close).
IMPLEMENTATION REQUIREMENTS:
ANALYTICS_ENABLED=false, all methods become no-ops.============================================================ PHASE 3: EVENT TAXONOMY ============================================================
Create a typed event catalog. This prevents typo-driven event sprawl.
FILE: src/lib/analytics-events.ts (or framework equivalent)
CORE EVENTS (define all of these):
page_view -- { page_name, referrer?, duration_ms? } sign_up -- { method: "email" | "google" | "github" | "apple", referral_source? } login -- { method, success: boolean } logout -- {} purchase -- { item_id, item_name, price, currency, quantity } subscription_start -- { plan, billing_period, trial: boolean } feature_used -- { feature_name, context? } search -- { query, results_count, filters? } error_occurred -- { error_type, error_message, screen?, severity } cta_clicked -- { cta_name, location, destination? } onboarding_step -- { step_number, step_name, completed: boolean } share -- { content_type, method } feedback_submitted -- { rating?, comment?, screen? }
RULES:
AnalyticsEvents enum or const object for autocompletion.============================================================ PHASE 4: INSTRUMENTATION ============================================================
Wire tracking into the application's key flows:
============================================================ PHASE 5: PRIVACY AND COMPLIANCE ============================================================
navigator.doNotTrack (web) before initializing.consentGranted() method that initializes tracking after user consent.consentRevoked() that calls reset() and disables future tracking.deleteUser(userId) helper that calls the provider's deletion API.============================================================ PHASE 6: VALIDATION ============================================================
============================================================ SELF-EVOLUTION TELEMETRY ============================================================
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
~/.claude/projects/skill-telemetry.md in that memory directoryEntry format:
### /analytics-tracking — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.
============================================================ DO NOT ============================================================
============================================================ SELF-HEALING VALIDATION (max 3 iterations) ============================================================
After completing the integration, validate:
IF STILL FAILING after 3 iterations:
============================================================ OUTPUT ============================================================
NEXT STEPS:
After analytics tracking is set up:
/ship to continue building features with tracking already wired in."/search to add full-text search -- tracking search queries gives great product insight."/qa to verify analytics events fire correctly in all user flows."/perf to ensure the analytics SDK does not degrade page load or app startup times."~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.