segment-customers — Claude Code command for customer segmentation
segment-customers is a Claude Code command that builds customer segments, scoring logic, and an activation brief for goals such as retention, upsell, or adoption.
Apache-2.0 ★ 450 updated 2026-04-03
.claude/commands/segment-customers.mdWhat segment-customers does
Provide a business goal, data sources, and a segmentation method: rules, clustering, or a hybrid approach. The command assesses the selected data’s quality and coverage, then designs segments and checks their stability and interpretability. Results depend on the inputs you choose.
Outputs include a segmentation matrix with criteria, size, and metrics; scoring logic with weights and thresholds; and an activation brief that maps segments to channels and plays. You can also focus activation on sales, customer success, marketing, or product.
The workflow covers data profiling, segment design, scoring rules, persona descriptions, and an activation plan. It can call segmentation-architect, retention-analyst, and customer-insights-partner, alongside the segmentation-framework and activation-map skills.
What it helps with
- Group customers around a retention or upsell goal
- Assess the quality and coverage of data sources
- Define weights and thresholds for segment scoring
- Map customer segments to channels and actions
Example prompts for the agent
- Create five upsell segments from usage and revenue data:
/customer-analytics:segment-customers --goal "upsell" --inputs usage,revenue --method hybrid --segments 5 - Use usage and support data to build retention segments:
/customer-analytics:segment-customers --goal "retention" --inputs usage,support --method clustering --segments 4 - Build marketing segments from survey and firmographic data:
/customer-analytics:segment-customers --goal "marketing efficiency" --inputs survey,firmographic --method rules --segments 3 --activation marketing
How to install segment-customers
Manually: put the files in place
.claude/commands/segment-customers.mdCall it with /segment-customers. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/segment-customers.mdCall it with /prompts:segment-customers. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/segment-customers.prompt.mdManually: put the files in place
.gemini/commands/segment-customers.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about segment-customers
How do I install segment-customers in Claude Code?
Add the command file at .claude/commands/segment-customers.md.
What does segment-customers do?
It designs customer segments, defines scoring logic, and links the segments to an activation plan.
Which data sources can segment-customers use?
You can supply usage, firmographic, revenue, support, or survey data, along with a goal, method, and target segment count.
Source text
segment-customers.md · Apache-2.0
--- name: segment-customers description: Generates customer segmentation models, scoring logic, and activation briefs. usage: /customer-analytics:segment-customers --goal "upsell" --inputs usage,firmographic --method hybrid --segments 5 --- # Command: segment-customers ## Inputs - **goal** – business goal (upsell, retention, adoption, marketing efficiency). - **inputs** – comma-separated data sources (usage, firmographic, revenue, support, survey). - **method** – rules | clustering | hybrid. - **segments** – target number of segments/personas to output. - **activation** – optional channel focus (sales, cs, marketing, product). ## Workflow 1. **Data Profiling** – evaluate selected inputs, quality, and coverage. 2. **Segmentation Design** – run clustering/heuristics, score stability, and interpretability. 3. **Scoring Logic** – define rules/weights for RevOps/data teams to implement. 4. **Persona Packaging** – craft segment personas with value props, risks, and KPIs. 5. **Activation Plan** – map segments to GTM plays, reporting, and refresh cadence. ## Outputs - Segmentation matrix (definition, criteria, size, key metrics). - Scoring workbook/API spec with weights and thresholds. - Activation brief aligning segments to plays/channels. ## Agent/Skill Invocations - `segmentation-architect` – leads modeling + documentation. - `retention-analyst` – supplies usage/retention signals. - `customer-insights-partner` – injects qualitative proof. - `segmentation-framework` skill – provides templates + guardrails. - `activation-map` skill – links segments to GTM workflows. ---
© gtmagents · Apache-2.0 · gtmagents/gtm-agents