# segment-cdp

Plan Segment event tracking across browser and server code, manage user identity, and define event schemas. Useful when building or reviewing a customer data pipeline.

- skill · `type=skill` · Claude Code · 51 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/web-development/segment-cdp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/segment-cdp

## What it does

This skill covers Segment Customer Data Platform patterns for browser-based and server-side analytics. Its Analytics.js guidance includes `track`, `identify`, `page`, and `group`, along with the relationship between an anonymous ID and a user profile after identification. These patterns help keep client-side tracking aligned with user identity.

For backend events, the skill covers `@segment/analytics-node` and its non-blocking batching behavior. The package is relevant to server-generated events and webhooks, including cases involving sensitive data. Node.js and `@segment/analytics-node` are needed for this server-side approach.

The tracking-plan material focuses on Object + Action event names, required properties, data types, and validation through Protocols. It also flags design mistakes such as changing event names dynamically, treating properties as events, and calling `track` before `identify`. Use these patterns when defining a consistent event contract for an application.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill web-development/segment-cdp
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill segment-cdp -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/segment-cdp/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/segment-cdp/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/segment-cdp/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/segment-cdp/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates segment-cdp
```

2. **Manually: put the files in place**
- File: `.github/skills/segment-cdp/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/web-development/segment-cdp
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/segment-cdp/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/web-development/segment-cdp

## When to use it
- Set up browser event collection with Analytics.js
- Send backend events and webhook data to Segment
- Define event schemas with required properties and types
- Associate anonymous activity with an identified user
- Spot inconsistent event names and incorrect call order

## Example prompts
- Design browser tracking with Analytics.js using `track`, `identify`, `page`, and `group`.
- Prepare server-side event delivery with `@segment/analytics-node` for backend events and webhooks.
- Draft a Segment tracking plan with Object + Action names, required properties, and Protocols validation.

## Similar
- [xlsx](https://affpapa.org/en/nevibecode/skills/xlsx.md) — skill · 187223 installs
- [google-agents-cli-observability](https://affpapa.org/en/nevibecode/skills/google-agents-cli-observability.md) — skill · 511300 installs
- [caveman-evidence-review](https://affpapa.org/en/nevibecode/skills/caveman-evidence-review.md) — skill · 104500 installs
- [migration](https://affpapa.org/en/nevibecode/skills/migration.md) — skill · 103900 installs
- [performance-optimization](https://affpapa.org/en/nevibecode/skills/performance-optimization.md) — skill · 65200 installs
- [supabase](https://affpapa.org/en/nevibecode/skills/supabase.md) — skill · 8 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
