Skip to main content
skill

segment-cdp — Claude Code skill for Segment analytics

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.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill web-development/segment-cdp
Open on GitHub

What segment-cdp 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.

What it helps with

  • 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 for the agent

  • 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.

How to install segment-cdp

1claude-code-templates

npx claude-code-templates@latest --skill web-development/segment-cdp

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill segment-cdp -a claude-code

3Manually: put the files in place

~/.claude/skills/segment-cdp/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/segment-cdp/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about segment-cdp

How do I install segment-cdp in Claude Code?

Choose one installation method. With Claude Code Templates, run npx claude-code-templates@latest --skill web-development/segment-cdp. With the skills installer, run npx skills add davila7/claude-code-templates --skill segment-cdp -a claude-code. The skill file path is ~/.claude/skills/segment-cdp/SKILL.md.

What does the segment-cdp skill do?

It guides browser and server tracking with Segment, user identification, and event schema design. It also covers common tracking mistakes that can make event data inconsistent.

How should I define and validate Segment tracking events?

Use Object + Action naming, specify required properties and their types, and connect validation rules to Protocols. The skill also warns against dynamic event names and calling track before identify.

Similar skills

All skills for Data and databases →

From the same set804

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor