Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/clamp-sh/analytics-skillsnpx agentmods add skills/clamp-sh/analytics-skills/event-schema-authorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/clamp-sh/analytics-skills/event-schema-author)<a href="https://agentmods.dev/skills/clamp-sh/analytics-skills/event-schema-author"><img src="https://agentmods.dev/badge/skills/clamp-sh/analytics-skills/event-schema-author/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/clamp-sh/analytics-skills/event-schema-author"><img src="https://agentmods.dev/badge/skills/clamp-sh/analytics-skills/event-schema-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00087 | $0.03108 |
| Opus 5 | $0.00044 | $0.01554 |
| Sonnet 5 | $0.00017 | $0.00622 |
| Haiku 4.5 | $0.00009 | $0.00311 |
Grade A, and why
event-schema-author scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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), 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.yamland 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 "analytics\.track\(|posthog\.capture\(|mixpanel\.track\(|amplitude\.track\(|gtag\(|window\._mtm" --type ts --type tsx --type js
Build a table in scratch:
| Event name | Call sites | Properties seen | Required? (in every call) |
|---|---|---|---|
signup |
2 | plan, source |
both |
cta_click |
5 | location, destination, variant? |
first two only |
Two important judgments here:
- Required vs optional: a property is required only if every call site passes it. If 4/5 do, it's optional with examples. Don't mark something required that the codebase doesn't actually guarantee.
- Property type: infer from the observed values.
"pro"is astring.5is anumber.{ amount, currency }ismoney. A small, fixed set of values like"free" | "pro" | "growth"is anenum. Don't invent enum values you didn't see.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 232 lines · 87 tokens per session scan A dfb56cd139df
event-schema-author is a skill published in the GitHub repository clamp-sh/analytics-skills (8 stars, last pushed 3mo ago), licensed MIT. It adds 87 tokens to every session and 3,108 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
treat
Prune bloated session with a prescription. Removes progress ticks, stale reads, duplicate content, and more.
guard
Protect Claude Code sessions from context overflow by running a background daemon that monitors session size and auto-prunes before compaction hits. Use when the user says "guard", "protect session", "context getting long", "prevent compaction", "session management", or is running agent teams that need continuous…
cozempic-doctor
Run health checks on Claude Code configuration and sessions. Use when troubleshooting Claude Code issues. (cozempic — does not shadow Claude Code's built-in /doctor).
diagnose
Analyze Claude Code session bloat — shows token count, context usage %, and bloat breakdown. Use when the user asks about session size, context usage, or when you notice the context window is getting full.
reload
Treat the current session and auto-resume in a new terminal window.
radin-execute
Work through a project's whole backlog: prioritize every task, execute each via a sub-agent, commit after each. Use when the user wants the entire backlog processed ("work through my backlog"), not one named task. Delegates all implementation to sub-agents; clarifies ambiguity by asking the user rather than guessing.