analytics

analytics is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 80 tokens per session (2,892 once invoked), scanned A, original, MIT.

A coding guide for adding product and website analytics, such as GA4 or PostHog, to an application. It covers what events to record, how to name them, and how to handle consent and personal data.

In plain words
What is it for?
Use it to define an event taxonomy, connect an analytics SDK, add consent checks, remove sensitive data, and validate funnels. It does not create charts or decide which business metrics matter.
Why use it?
It helps prevent missing or duplicated events, unlawful tracking before consent, and accidental collection of personally identifying information.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ericrisco/rsc-harness/analytics
Any agent
npx skills add ericrisco/rsc-harness --skill analytics
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for analytics

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/analytics.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/analytics)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/analytics"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/analytics.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,892 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00080 $0.02892
Opus 5 $0.00040 $0.01446
Sonnet 5 $0.00016 $0.00578
Haiku 4.5 $0.00008 $0.00289

Measured 4d ago against content hash ad80b408ba37, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analytics 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/analytics/SKILL.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analytics — the instrumentation layer

This skill owns the capture side of analytics: deciding what to track, how to name it, where the SDK lives in the codebase, and how not to leak PII or break consent law. It produces three checkable artifacts — an event taxonomy, tracking code (GA4 and/or PostHog), and a consent wiring. Everything downstream of capture (charts, KPI choice, experiment stats, raw-event SQL, legal text) belongs to a sibling; see the routing table below.

The order of work is fixed: taxonomy → SDK wiring → consent gate → PII scrub → funnel + validation.

When NOT to use

The ask Route to
Chart the captured data on a board dashboard
Decide which metrics matter (North Star, AARRR) kpi-framework
Scheduled stakeholder reports / exports reporting
Variant assignment, significance, experiment design ab-testing (PostHog experiments live there; PostHog event capture lives here)
Query a warehouse of raw events with SQL clickhouse-analytics / duckdb / sql
App error/trace/uptime telemetry (Sentry, OpenTelemetry) observability
Cookie-banner legal text, DPA, ROPA, subject rights gdpr-privacy / data-policy
Predict future values from a series forecasting

The load-bearing line: analytics = events flow in; dashboard/reporting = events flow out.

Decision: GA4 vs PostHog vs both

You need Pick
Web/ads attribution, Google Ads conversions, marketing audiences GA4
Product behavior, funnels, feature flags, session replay, self-serve insights PostHog
Both marketing attribution and deep product analytics (very common) Both — GA4 for ads, PostHog for product

Running both is normal and fine. Keep one taxonomy shared across both so a purchase means the same thing everywhere. Do not let the two tools drift into two naming schemes.

Step 1 — Event taxonomy first, code second

An event name is a contract: design the taxonomy before you write a single SDK call, and never rename a live event in production. Every funnel, audience, dashboard, and saved insight downstream is keyed by the exact event name and property keys. Rename signup_completed to sign_up after launch and you silently fork the metric into two — the old funnel flatlines, the new one starts from zero, and nobody notices for a week. You can add events forever; you can never safely rename one.

Read the full file on GitHub · 198 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 4d ago First seen · 198 lines · 80 tokens per session scan A ad80b408ba37

Subscribe to this mod's changes

analytics is a skill published in the GitHub repository ericrisco/rsc-harness (60 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 2,892 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-30.

Related

Other skills, from other repositories

implementing-gdpr-data-protection-controls

The General Data Protection Regulation (EU) 2016/679 (GDPR) is the EU's comprehensive data protection law governing the collection, processing, storage, and transfer of personal data. This skill cover.

adriannoes/awesome-agentic-ai · 52 tokens

hns-workflow-ci-loop

Unified CI watch + auto-fix loop skill. Polls gh pr checks after /moai sync PR creation, classifies required vs auxiliary failures, attempts safe automated patches (max 3 iterations), and escalates semantic failures to the user. Use for CI loop workflow — NOT for general loop iteration patterns (see…

modu-ai/moai-adk · 76 tokens

moai-kanban-foreman

One unattended kanban foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…

modu-ai/moai-adk · 76 tokens

moai-harness-learner

Harness learning subsystem coordinator. Produces Tier 4 auto-update proposal payloads consumed by the orchestrator (which surfaces them via AskUserQuestion) and orchestrates Apply/Rollback flows. Triggers when harness learning proposals are pending or learning lifecycle management is needed.

modu-ai/moai-adk · 61 tokens

moai-domain-humanize

AI text humanization and 윤문 (post-editing) specialist that detects and removes AI tells while preserving meaning, facts, and figures. Covers Korean, English, Japanese, and Chinese with a shared severity model (S1/S2/S3), quality grades (A/B/C/D), and 30%/50% over-editing guardrails. Use to make AI-generated text read…

modu-ai/moai-adk · 101 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens