/wire:add-analytics-instrumentationfrom wire
End-to-end analytics instrumentation workflow for a PR, branch, file, directory, or feature. Reads code, discovers events to track, and produces a concrete instrumentation plan.
Ships in wire. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before proceeding, append a one-line entry to .wire/execution_log.md:
| YYYY-MM-DD HH:MMZ | skill | add-analytics-instrumentation | end-to-end analytics instrumentation of a codebase triggered this skill | <by> | <session> | n/a | n/a | n/a |
If .wire/execution_log.md does not exist, create it with the standard header first (see specs/utils/execution_log.md). If no .wire/ directory exists in the current repo, skip this step.
You are the orchestrator for the analytics instrumentation pipeline. Your job is to figure out what the user wants to instrument, gather the relevant code, and run the pipeline to produce a tracking plan.
Before running anything, determine what the user wants to instrument. There are four input types — infer the type from what the user has already provided in the conversation. Only ask if it's genuinely ambiguous.
| Input type | How to recognize it | Example |
|---|---|---|
| PR | A PR URL, PR number, or phrases like "this PR", "my PR" | instrument PR #42, https://github.com/org/repo/pull/42 |
| Branch | A branch name or "this branch", "my branch", "current branch" | instrument feature/checkout, add tracking to this branch |
| File / Directory | A file path, directory path, or glob pattern | instrument src/components/Checkout.tsx, add analytics to src/payments/ |
| Feature | A natural-language description of functionality, not a specific code reference | instrument the onboarding flow, add tracking to the checkout experience |
Inference rules:
#number → PR/, no file extension, matches a git branch) → BranchIf ambiguous, ask the user:
What would you like to instrument?
- A specific file or directory
- A PR
- A branch
- A feature (describe it and I'll find the relevant code)
Once you know the input type, proceed to the appropriate step:
Invoke the diff-intake skill with the user's PR or branch reference.
It produces a change_brief YAML block.
Capture the full YAML output — step 2 consumes it verbatim. Skip to Step 2.
Skip diff-intake entirely — there's no diff to analyze. Instead, build the
change_brief YAML yourself by reading the files directly.
track(, trackEvent(, logEvent(, amplitude.track(, ampli., and
analytics-related imports.change_brief YAML with analytics_scope: high (the user
explicitly asked to instrument these files, so assume they want tracking).
Set primary: feat and classification.types: [feat]. Populate
file_summary_map with each file's summary, layer, and existing
instrumentation.Proceed to Step 2 with the YAML you built.
The user described a feature in natural language. Your job is to find the
relevant code, then build a change_brief.
git log --all --grep="<patterns>". This will find relevant commits. Then read the git commit body to understand the feature and relevant files. If the results are good, then proceed to generating the change_brief YAML**/checkout/**, **/onboarding/**)change_brief YAML.Proceed to Step 2 with the YAML you built.
Invoke the discover-event-surfaces skill, passing the change_brief YAML
from step 1.
It produces an event_candidates YAML block. If there are zero candidates,
stop and tell the user the change has user-facing impact but no events worth
instrumenting were identified.
If event_candidates is empty, stop here and tell the user there's nothing to instrument.
Capture the full YAML output — step 3 consumes it.
Invoke the instrument-events skill, passing the event_candidates YAML from
step 2.
It produces a trackingPlan JSON with exact file locations, tracking code, and
property definitions for every critical (priority 3) event.
After step 3 completes, present the tracking plan to the user. Walk through each event briefly:
Then ask if they want to adjust anything or proceed to implementation.
If any step fails (e.g., the PR doesn't exist, git commands error, no files to analyze), surface the error clearly and stop. Don't try to continue with incomplete data.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rittmananalytics/wire-plugin --plugin wire74 skills in this plugin
/agents-schemaPublish and read warehouse metadata through dbt Labs' Agents Schema (the AGENTS schema inside Snowflake, Databricks or BigQuery, written by the agents-schema CLI from a dbt manifest, LookML, Omni, OSI, Sigma and markdown skills). Activates when the user mentions Agents Schema, agents_schema, AGENTS.ROOT, the agents-schema CLI or its GitHub workflows, warehouse-delivered skills, or asks how an AI agent should find governed context for a warehouse. Used by /wire:agents_schema-generate, -validate and -review, and for ad-hoc work against an AGENTS schema./airbyteSkill for managing Airbyte connections and data ingestion via the Airbyte Agent MCP server at mcp.airbyte.ai. Activates when the user mentions Airbyte, an Airbyte connection, Airbyte source / destination, or wants to audit / build / migrate an Airbyte deployment. Distinguishes between the hosted Agent MCP (for AI agents using connectors) and managing an existing Airbyte Cloud / OSS workspace./airflowProactive skill for Apache Airflow 2.x and Cloud Composer work in a client's existing Airflow repo. Auto-activates when writing or changing a DAG file, a DAG helper, or the config a DAG reads; when deploying DAG files to a dev environment; when checking whether a DAG parsed or a run succeeded; when tasks are stuck in queued; and when the pipeline or orchestration artifact uses Airflow. Covers the Airflow rule set (lint_conventions.py --domain airflow), safe dev deploy through airflow_deploy.py, sync and parse checks, run and task checks through Cloud Logging, causes of queued tasks and a list of known faults. Every environment value comes from .wire/engagement/airflow_environments.yml./analyze-account-healthSummarizes B2B account health by analyzing usage patterns, engagement trends, risk signals, and expansion opportunities. Use for customer success reviews, renewal preparation, QBRs, or account prioritization./analyze-ai-topicsAnalyzes what users ask AI agents about and how well each topic is served. Only use when the user has Amplitude Agent Analytics instrumented in their project. Use when the user asks "what are people asking the AI", "top AI topics", "where is the AI struggling", "AI coverage gaps", "what should we improve in our AI", or wants product insights from AI conversation patterns.
/analyze-chartPerforms deep analysis of a specific Amplitude chart to explain trends, anomalies, and likely drivers. Use when a metric looks unusual, investigating a spike or drop, or understanding the "why" behind numbers.