# Add analytics instrumentation

> Add analytics instrumentation is an open-source agent skill for analytics and data. Turns code changes in a PR, branch, file or feature into an analytics tracking plan. 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/add-analytics-instrumentation
- **Repository:** https://github.com/amplitude/mcp-marketplace
- **GitHub stars:** 50
- **License:** MIT
- **Skill name:** add-analytics-instrumentation
- **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 orchestrates an end-to-end analytics instrumentation workflow. Given a pull request, branch, file, directory or a natural-language feature description, it gathers the relevant code, reads what changed or what the code does, and identifies user-facing moments that deserve tracking.

The workflow runs in stages: it captures what the user wants instrumented, builds a summary of the change, discovers candidate events worth tracking, and then produces a concrete plan listing where each tracking call should go, the file and function involved, and the properties it should send. For feature requests it searches git history and the codebase for matching files, and for files it reads them directly while scanning for existing tracking calls.

The skill expects a git repository that the agent can read, and it relies on helper skills named diff-intake, discover-event-surfaces and instrument-events. It is distributed as part of the Amplitude plugin marketplace and is licensed under MIT.

## When your agent uses it

> End-to-end analytics instrumentation workflow for a PR, branch, file, directory, or feature. Reads the code, discovers what events should be tracked, and produces a concrete instrumentation plan — all in one shot. Use this skill whenever a user wants to add analytics to a PR, asks "instrument this PR", "add tracking to this branch", "what analytics does this file need", "instrument the checkout flow", "run the full instrumentation workflow", or any request that implies going from code changes to a tracking plan. Also trigger when the user gives you a PR link, branch name, file path, or feature description and mentions analytics, events, or instrumentation. This is the main entry point for the analytics workflow — prefer it over calling the individual steps (diff-intake, discover-event-surfaces, instrument-events) separately.

## 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/add-analytics-instrumentation)
- [License: MIT](https://github.com/amplitude/mcp-marketplace/tree/HEAD/plugins/amplitude/skills/add-analytics-instrumentation)

## Features

- **Input type detection:** Works out whether the request refers to a PR, branch, file, directory or feature and routes it accordingly.
- **Change summarization:** Reads the code and summarizes user-facing behavior and existing tracking calls for each affected file.
- **Feature code search:** Searches git history and the codebase with keywords, globs and route definitions to locate a described feature.
- **Event candidate discovery:** Identifies which user actions and flows are worth tracking as analytics events.
- **Tracking plan output:** Produces a plan with file locations, tracking code and property definitions for each critical event.
- **Error stop handling:** Halts and reports clearly when a PR, git command or file input fails instead of continuing with partial data.

## Good for

- Instrument the analytics events for an open pull request
- Add tracking to the checkout flow in my current branch
- Work out what analytics a specific component file needs
- Plan event tracking for the onboarding experience
- Review which events a directory of code should emit

## 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/add-analytics-instrumentation`:

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

For one project only, put the folder in `.claude/skills/add-analytics-instrumentation` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/add-analytics-instrumentation` 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/add-analytics-instrumentation &&
cp -R "$tmp/plugins/amplitude/skills/add-analytics-instrumentation" ~/.agents/skills/add-analytics-instrumentation &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/add-analytics-instrumentation` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/add-analytics-instrumentation` 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/add-analytics-instrumentation &&
cp -R "$tmp/plugins/amplitude/skills/add-analytics-instrumentation" ~/.cursor/skills/add-analytics-instrumentation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/add-analytics-instrumentation` 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/add-analytics-instrumentation
```

Or copy the folder to `~/.gemini/skills/add-analytics-instrumentation` yourself.

### VS Code

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

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

For one project only, put the folder in `.github/skills/add-analytics-instrumentation` 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/add-analytics-instrumentation` into your agent's skills folder as `add-analytics-instrumentation`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs access to the repository, since it reads code and runs git commands such as git log to find related commits.

### What does Add analytics instrumentation produce?

It produces a tracking plan with exact file locations, tracking code and property definitions for each critical event, and then asks whether to adjust or proceed to implementation.

### Does Add analytics instrumentation change my code?

The workflow as written builds a plan and asks whether to proceed to implementation; it does not describe editing files itself.

### When does Add analytics instrumentation trigger?

It triggers on requests to instrument or add analytics to a PR, branch, file, directory or feature, including phrases such as instrument this PR or add tracking to this branch.

### How do I install Add analytics instrumentation in Claude Code?

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

### Does Add analytics instrumentation 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 Add analytics instrumentation?

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 Add analytics instrumentation?

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

## Where this comes from

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

## Alternatives

- [Discover event surfaces](https://ai-powered.com/skills/discover-event-surfaces): Discover event surfaces is an open-source agent skill for analytics and data.
- [Instrument events](https://ai-powered.com/skills/instrument-events): Instrument events 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.
- [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.
- [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.
- [Live data forensics](https://ai-powered.com/skills/live-data-forensics): Live data forensics 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/add-analytics-instrumentation
