# Instrument events

> Instrument events is an open-source agent skill for analytics and data. Turns event candidates into a concrete, placed analytics tracking plan for an agent. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/amplitude/mcp-marketplace/tree/main/plugins/amplitude/skills/instrument-events
- **Repository:** https://github.com/amplitude/mcp-marketplace
- **GitHub stars:** 50
- **License:** MIT
- **Skill name:** instrument-events
- **Collection:** https://github.com/amplitude/mcp-marketplace
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data)
- **Listing updated:** 2026-12-03

## About

This skill takes a YAML list of event candidates from an earlier analytics discovery step and narrows it to the highest-priority events. For each one, it reads the file hinted at in the candidate, locates the exact handler or callback where the tracking call belongs, and records a stable anchor alongside the line number.

The skill is written to fit the existing codebase. It looks at which variables are in scope at the insertion point, keeps only a few primitive properties that would be useful in a chart, and matches the tracking function, import path and call shape already used in the repo. It can also read an optional repo context file and a routing config that maps folders to Amplitude project IDs, and it flags events whose project cannot be confirmed.

The output is a structured JSON tracking plan. After the user confirms the scope, the skill can create the events and their properties in Amplitude through the MCP tools, but only for events whose project mapping is confirmed. It expects an Amplitude MCP connection and a repository with the candidate list available.

## When your agent uses it

> Given event_candidates YAML (output from discover-event-surfaces), generates a concrete instrumentation plan for priority-3 (critical) events. Acts as a Software Architect: discovers existing analytics patterns in the codebase, reads the hinted files to determine what variables are in scope, designs minimal chart-useful properties, and identifies the exact insertion point for each tracking call. Outputs a structured JSON trackingPlan. Use this as step 3 of the analytics instrumentation workflow, after discover-event-surfaces. Trigger whenever a user has event_candidates and wants to generate tracking code, asks "instrument these events", "generate tracking plan", "add analytics for these events", "where should I put the tracking calls", or any request to turn event candidates into concrete implementation guidance.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/amplitude/mcp-marketplace/tree/HEAD/plugins/amplitude/skills/instrument-events)
- [License: MIT](https://github.com/amplitude/mcp-marketplace/tree/HEAD/plugins/amplitude/skills/instrument-events)

## Features

- **Priority event filtering:** Selects only the highest-priority candidates so the plan covers release-blocking events.
- **Insertion point discovery:** Finds the function or callback where the outcome is confirmed and records a stable anchor.
- **Minimal property design:** Chooses a few primitive properties that each support a specific chart or filter.
- **Existing pattern matching:** Reuses the tracking function, import path and call shape already in the codebase.
- **Project routing by path:** Maps code locations to Amplitude project IDs using a repo config file.
- **Amplitude write-back:** Creates confirmed events and properties in Amplitude via MCP tools after approval.

## Good for

- Generate a tracking plan for critical events found in a codebase audit
- Find where to place track calls for a checkout success flow
- Propose minimal event properties that support dashboard charts
- Check which Amplitude project a tracked event should be routed to
- Create approved events and properties in an Amplitude project

## Install

### Claude Code

This skill ships in the `amplitude` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add amplitude/mcp-marketplace
/plugin install amplitude@amplitude
```

Or copy only this skill to `~/.claude/skills/instrument-events`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/instrument-events &&
cp -R "$tmp/plugins/amplitude/skills/instrument-events" ~/.claude/skills/instrument-events &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/instrument-events` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/instrument-events` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/instrument-events &&
cp -R "$tmp/plugins/amplitude/skills/instrument-events" ~/.agents/skills/instrument-events &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/instrument-events` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/instrument-events` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/instrument-events &&
cp -R "$tmp/plugins/amplitude/skills/instrument-events" ~/.cursor/skills/instrument-events &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/instrument-events` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/amplitude/mcp-marketplace.git --path plugins/amplitude/skills/instrument-events
```

Or copy the folder to `~/.gemini/skills/instrument-events` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/instrument-events`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/instrument-events &&
cp -R "$tmp/plugins/amplitude/skills/instrument-events" ~/.copilot/skills/instrument-events &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/instrument-events` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/amplitude/mcp-marketplace.git
```

Then copy `mcp-marketplace/plugins/amplitude/skills/instrument-events` into your agent's skills folder as `instrument-events`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Instrument events need before it can run?

It needs event_candidates YAML from the discover-event-surfaces step. The skill also asks for a .amplitude/instrumentation-agent.yaml file to route events to projects, and it can work without the optional context file.

### Does Instrument events change my code?

The skill produces a plan with file paths, line numbers and suggested tracking code for an engineer to implement. It writes to Amplitude only after explicit confirmation and only for events with confirmed project IDs.

### When does Instrument events trigger?

It triggers when a user has event candidates and asks to instrument them, generate a tracking plan, or find where tracking calls should go.

### How do I install Instrument events in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/instrument-events to use it in all your projects, or to .claude/skills/instrument-events in one project. Or install the amplitude plugin, which includes it: /plugin marketplace add amplitude/mcp-marketplace, then /plugin install amplitude@amplitude.

### Does Instrument events run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Instrument events?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Instrument events?

The closest alternatives to Instrument events are Add analytics instrumentation, Discover event surfaces, Discover analytics patterns, Tracking plan audit and Taxonomy.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Add analytics instrumentation](https://ai-powered.com/skills/add-analytics-instrumentation): Add analytics instrumentation is an open-source agent skill for analytics and data.
- [Discover event surfaces](https://ai-powered.com/skills/discover-event-surfaces): Discover event surfaces is an open-source agent skill for analytics and data.
- [Discover analytics patterns](https://ai-powered.com/skills/discover-analytics-patterns): Discover analytics patterns is an open-source agent skill for analytics and data.
- [Tracking plan audit](https://ai-powered.com/skills/tracking-plan-audit): Tracking plan audit is an open-source agent skill for analytics and data.
- [Taxonomy](https://ai-powered.com/skills/taxonomy): Taxonomy is an open-source agent skill for analytics and data.
- [Product tracking edho ferdian](https://ai-powered.com/skills/product-tracking-edho-ferdian): Product tracking edho ferdian is an open-source agent skill for analytics and data.
- [Copy tracking plan to projects](https://ai-powered.com/skills/copy-tracking-plan-to-projects): Copy tracking plan to projects is an open-source agent skill for analytics and data.
- [Event description generator](https://ai-powered.com/skills/event-description-generator): Event description generator is an open-source agent skill for analytics and data.

---
Source: https://ai-powered.com/skills/instrument-events
