← ClaudeAtlas

event-schema-authorlisted

Author and maintain an event-schema.yaml file. A portable, typed declaration of every product analytics event the codebase fires (event names, properties, types, intent). The CLI generates a TypeScript type from it so tracking calls are autocompleted and type-checked at build time. Vendor-neutral; works with any analytics SDK (Clamp, GA4, Mixpanel, Amplitude, PostHog, Segment).
clamp-sh/analytics-skills · ★ 6 · API & Backend · score 81
Install: claude install-skill clamp-sh/analytics-skills
# Event schema author A repo without a declared event schema is one where the source of truth for "what events do we fire and what do they carry" is grep. That breaks two things: (1) typo'd event names ship to production and silently fragment your data; (2) AI agents and new teammates have to reverse-engineer intent from call sites. This skill produces (or updates) `event-schema.yaml` at the repo root, runs the CLI to generate a TypeScript type, and wires it into the tracking call sites. The format is an open spec ([clamp-sh/event-schema](https://github.com/clamp-sh/event-schema)), and the generated type works with any analytics SDK. ## When NOT to run this - The codebase has zero `track()`-style calls. There's nothing to declare. Nudge the user to instrument first. - The user fires exactly one event. Hand-rolling a 3-line `type Events = { ... }` at the call site is fine. Schema is for projects with growth ahead, not toy projects. - The codebase already has an `event-schema.yaml` and the user is asking a different question (e.g. "what should I track next?"). Don't re-author from scratch; answer the actual question. ## Method ### Phase 1. Discover what's already tracked Before writing anything, build a picture of the existing tracking surface. Run searches that catch the common patterns: ``` # Generic; most analytics SDKs expose a track() function rg -n "track\(" --type ts --type tsx --type js --type jsx # Common SDK-specific shapes (broaden as needed) rg -n "analytic