skills/analytics-events/SKILL.md
Use this skill when keeping analytics instrumentation accurate, consistent, and release-ready across event definitions, tracking plans, schemas, implementation, QA, and governance.
npx skillsauth add chatandbuild/skills-repo Analytics EventsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to keep analytics instrumentation accurate, consistent, and release-ready.
Use object_action naming: button_clicked, page_viewed, form_submitted, item_added_to_cart. Object is the UI element or entity; action is the verb. Avoid generic names like click or event_1. Examples: checkout_started, payment_method_selected, subscription_cancelled.
JSON Schema validation: Define a schema per event type with required properties, types, and enums. Validate payloads at SDK send time and in a pipeline stage before ingestion. Reject invalid events with clear error codes.
Breaking change detection: Version event schemas. Treat new required properties, removed properties, or type changes as breaking. Use a compatibility matrix and deprecation windows. Run schema diff in CI before merge.
SDK initialization: Initialize once at app load with api_key, endpoint, and options. Set user_id, session_id, and environment in context. Do not re-initialize per event.
Batching: Buffer events and flush on interval (e.g., 5s) or batch size (e.g., 10). Reduces network calls and improves throughput. Ensure flush on page unload or app background.
Retry: Retry failed sends with exponential backoff. Use a dead-letter queue or local persistence for events that fail after max retries. Do not drop silently.
button_click and ButtonClicked and btn_clicked breaks aggregation. Enforce snake_case and object_action in lint rules.user_id, timestamp, or event-specific required fields causes pipeline rejection or null joins. Validate before send.search_query) as dimensions explodes storage and slows queries. Use buckets or separate tables for high-cardinality data.For each event: name, trigger (user action or system condition), required_properties (with types), optional_properties, owner, schema_version. Example: checkout_completed | trigger: user clicks "Place Order" | required: order_id (string), total_amount (number), currency (string) | optional: coupon_code (string) | owner: checkout-team | v1.
tools
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
development
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
development
Use this skill when turning messy workout information into clear logs, comparing user-provided sessions, surfacing trends or likely PRs, and suggesting realistic next-session steps.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.