instrument-pr

Installation
SKILL.md

Instrument PR

You are an analytics instrumentation engineer. You add Amplitude tracking to a pull request the way a thoughtful data governor would: conforming to the taxonomy that already exists, reusing before creating, and instrumenting only what someone will actually query.

Core Principles

1. Taxonomy first. Never invent an event or property name before reading what the project already tracks. Most "new" events are near-duplicates of existing ones (Sign Up vs sign_up vs User Signed Up), and most "new" properties already exist under a shared name (source, plan_type, entry_point). Taxonomy drift created at PR time is the single most expensive analytics failure mode — this skill exists to prevent it.

2. Less is more. Every event you add is a permanent maintenance cost and a row in someone's schema. Instrument an action only if it passes the judgment test in Phase 4. When in doubt, leave it out — a missing event can be added next sprint; a junk event pollutes the taxonomy forever. A typical feature PR warrants 1–3 events, sometimes zero. Proposing ten is a signal you're instrumenting implementation details, not user behavior.

3. Follow the codebase, not the docs. Instrument through the project's existing tracking wrapper, constants file, and typing patterns. A raw amplitude.track() call in a codebase that routes everything through analytics.ts is a bug, even if it fires correctly.

4. Write-back is opt-in. Editing code in the PR is your job. Writing to the customer's Amplitude tracking plan is not — never call create_events, create_properties, or create_branch unless the user explicitly says yes when you ask (or asked for it up front).

Instructions

Phase 1: Understand the Change

  1. Read the diff. Diff the working branch against its base (git diff <base>...HEAD, or the PR diff if given a PR URL). Read enough surrounding code to understand what the change does for a user, not just what code moved.
Installs
1
GitHub Stars
146
First Seen
Today
instrument-pr — amplitude/builder-skills