# Discover analytics patterns

> Discover analytics patterns is an open-source agent skill for analytics and data. Finds how existing analytics tracking calls are written so new events match the codebase. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/amplitude/mcp-marketplace/tree/main/plugins/amplitude/skills/discover-analytics-patterns
- **Repository:** https://github.com/amplitude/mcp-marketplace
- **GitHub stars:** 50
- **License:** MIT
- **Skill name:** discover-analytics-patterns
- **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 searches a codebase for the concrete ways analytics events are sent, such as direct SDK calls, typed Ampli methods, and custom tracking wrappers. It groups the matches into distinct patterns, lists the files where each appears, and works out the dominant event and property naming conventions.

The workflow starts by checking for a repository instrumentation context file that may hold customer naming rules. If an Amplitude MCP server is connected, it samples real non-system event names from the project and then uses Grep to locate their call sites. Without the MCP, it searches for tracking method names, Amplitude imports and HTTP API endpoints, and looks for wrapper functions or hooks that call into the SDK. Test and mock files are skipped unless they are the only occurrence.

It expects access to the codebase through search tools and is aimed at developers preparing to add instrumentation. Its output is meant to be read by other instrumentation skills so they follow the same coding style.

## When your agent uses it

> Discovers how analytics tracking calls are actually written in this codebase — the concrete SDK calls, function signatures, and import patterns used to send events. Use this skill whenever you need to understand the existing analytics instrumentation patterns before adding new tracking, when someone asks "how do we track events here?", "show me the analytics setup", "what's the analytics pattern in this codebase?", or any time the instrument-events or discover-event-surfaces skills are about to run and you need to know the correct coding style to follow. Outputs a deduplicated list of patterns with generalized examples and the file paths where each pattern appears, plus the dominant event and property naming conventions inferred from those call sites. Always use this skill before writing any analytics instrumentation code.

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

## Features

- **Tracking pattern discovery:** Locates analytics calls across the codebase using search patterns for SDKs, typed clients and HTTP endpoints.
- **Wrapper detection:** Identifies custom tracking functions and hooks that wrap the underlying analytics SDK.
- **Naming convention inference:** Infers dominant event and property naming styles from real call sites and project samples.
- **Deduplicated pattern listing:** Groups matching calls by library, method and argument structure with file paths for each.
- **MCP-aware sampling:** Uses a connected Amplitude catalog to pick representative events before searching the code.

## Good for

- Show me how we track events in this codebase
- Find the analytics wrapper our frontend uses before I add a new event
- Check the naming style for event and property names before instrumenting a feature
- List every file where we call the Amplitude SDK

## 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/discover-analytics-patterns`:

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

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

### Codex

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

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

### Cursor

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

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

Or copy the folder to `~/.gemini/skills/discover-analytics-patterns` yourself.

### VS Code

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

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

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

## FAQ

### When should Discover analytics patterns be used?

Before writing any analytics instrumentation code, and when someone asks how tracking is set up in the codebase.

### What does Discover analytics patterns output?

A set of conventions for event and property naming, followed by deduplicated tracking patterns with generalized examples and relevant file paths.

### What happens if no tracking calls are found?

It reports that clearly and suggests checking whether Amplitude or another analytics library is set up, offering to search for other libraries such as Segment, Mixpanel or PostHog.

### How do I install Discover analytics patterns in Claude Code?

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

### Does Discover analytics patterns 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 Discover analytics patterns?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Discover analytics patterns?

The closest alternatives to Discover analytics patterns are Add analytics instrumentation, Instrument events, Use MCP analytics, Discover event surfaces 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.
- [Instrument events](https://ai-powered.com/skills/instrument-events): Instrument events is an open-source agent skill for analytics and data.
- [Use MCP analytics](https://ai-powered.com/skills/use-mcp-analytics): Use MCP analytics 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.
- [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.
- [Tracking plan audit](https://ai-powered.com/skills/tracking-plan-audit): Tracking plan audit is an open-source agent skill for analytics and data.
- [Analyze chart](https://ai-powered.com/skills/analyze-chart): Analyze chart is an open-source agent skill for analytics and data.

---
Source: https://ai-powered.com/skills/discover-analytics-patterns
