plugins/adobe-analytics/skills/aa-segment-performance-comparator/SKILL.md
Compares the performance of two or more audience segments across key metrics side by side. Use this skill when someone wants to compare audiences or visitor groups — for example, "how do mobile visitors compare to desktop on conversion," "compare new vs. returning visitors," "show me the difference between these two segments," "compare these audiences on our KPIs," or "which segment performs better." Also trigger for "segment comparison" or "audience comparison."
npx skillsauth add adobe/skills aa-segment-performance-comparatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Compare the performance of two or more audience segments across key metrics side by side to understand how different visitor groups behave. Uses direct segment-vs-segment comparison to determine a winner, loser, and spread for each metric, with a separate context panel showing segment sizing.
AA Call Budget: AA's
runReportaccepts a singlesegmentIdper call. For N segments × M metrics the comparison requires N×M calls, plus 1 baseline call for the segment-size context panel. For 3 segments × 5 metrics = 16 calls. Limit to 4 segments and 6 metrics for practical performance. Always confirm the segment/metric list with the user before starting.
findReportSuites — select report suitesetSessionDefaults — set session context (reportSuiteId + globalCompanyId)findSegments — discover and select comparison segmentsfindMetrics — resolve metric IDsrunReport — one call per segment per metric, plus one unsegmented call for sizing contextfindReportSuites / setSessionDefaults.findReportSuites(globalCompanyId: "<gcid>", page: 0, limit: 10)
setSessionDefaults(globalCompanyId: "<gcid>", reportSuiteId: "<rsid>")
Ask the user which segments to compare. If not specified, prompt:
"Which visitor audiences would you like to compare? For example: Mobile vs. Desktop, New vs. Returning, Paid Search vs. Organic, or specific named segments from your library."
Search for and confirm each segment:
findSegments(page: 0, limit: 50)
# Filter locally by name. Built-in IDs: "Paid_Search", "Purchasers", "Return_Visits"
Note:
findSegmentsdoes not accept asearchTermparameter. Retrieve all segments and filter by name locally. Built-in template segments have short IDs like "Paid_Search" that can be passed directly assegmentIdsinrunReport.
If the user requests a segment that doesn't exist by name, offer to build it first using the aa-segment-builder skill, or suggest the closest existing segment from search results.
Limit: 4 segments maximum per comparison. Advise this limit upfront.
Ask the user which metrics to compare. Suggest a balanced mix:
metrics/visitsmetrics/pageviews, metrics/bouncerate,
metrics/pagespervisitmetrics/orders, conversion rate calculated metricmetrics/revenueCall findMetrics to resolve each metric ID:
findMetrics(expansions: "componentType,categories", page: 0, limit: 200)
# Filter locally by name. Key IDs: metrics/visits, metrics/revenue, metrics/orders, metrics/bouncerate
Limit: 6 metrics maximum. Confirm the final list with the user:
"I'll compare these 3 segments across 5 metrics. This requires 16 report calls (3 segments × 5 metrics + 1 sizing call). OK to proceed?"
Ask for or confirm the analysis period:
Run a single unsegmented call for metrics/visits to get the total
population size, then one call per segment for metrics/visits to
compute each segment's share of total. These sizing values populate the
context panel — they are not used in the comparison matrix.
runReport(
dimensionId: "variables/page",
metricIds: "metrics/visits",
startDate: "<start>",
endDate: "<end>",
limit: 1
)
# allVisitorVisits = summaryData.totals[0]
runReport(
dimensionId: "variables/page",
metricIds: "metrics/visits",
segmentIds: "<segmentId>",
startDate: "<start>",
endDate: "<end>",
limit: 1
)
# segmentVisits = summaryData.totals[0]; shareOfTotal = segmentVisits / allVisitorVisits × 100
Reuse these results if
metrics/visitsis already a comparison metric.
For each segment × metric combination:
runReport(
dimensionId: "variables/page",
metricIds: "<metricId>", # note: "metricIds" not "metricId"
segmentIds: "<segmentId>", # note: "segmentIds" not "segmentId"
startDate: "<start>",
endDate: "<end>",
limit: 1
)
# Total = summaryData.totals[0]
Read totals from
summaryData.totals[0](notrows[]).dimensionIdis required — use any dimension withlimit: 1for aggregate totals. Segment IDs are the rawidfield fromfindSegments.
Track progress: "Fetching Segment 2 of 3, metric 3 of 5..."
The matrix compares segments directly to each other — no baseline column.
For each metric row, compute:
| Computed Value | Formula |
|---|---|
| Segment value | Raw from runReport |
| Winner | Segment with the best value for this metric |
| Loser | Segment with the worst value for this metric |
| Spread | (max − min) / max × 100 |
| Significant? | true if spread > 10% |
For metrics where lower is better (bounce rate, cost per acquisition), invert the winner/loser logic — the segment with the lowest value wins. Mark these metrics clearly in the report.
For each segment, compute an overall performance profile:
Build the comparison report inline and write to
/tmp/aa_segment_comparator_report_<YYYY-MM-DD_HHMMSS>.html.
Read template.html and use it verbatim. Do not improvise the
HTML structure or CSS — only fill in the {PLACEHOLDER} tokens ({ORG_NAME},
{DATE_RANGE}, {REPORT_SUITE}, {GENERATED_DATE}, {SEGMENT_NAMES_SUMMARY},
{SEGMENT_NAME}, {COLOR}, {VISITOR_COUNT}, {NUM_SEGMENTS}, {NUM_METRICS},
{NUM_SIGNIFICANT}, {OVERALL_WINNER}, {METRIC_NAME}, {VALUE},
{WINNER_SEGMENT}, {SPREAD}, {INSIGHT_TEXT}) and repeat segment chips,
matrix rows, and insight boxes once per data item. Use the cell-winner /
cell-loser classes per Phase 5 winner/loser rules.
Section titles — no phase prefix: Section headings in the HTML report must not include the phase number. Use the plain section name only (e.g., "Segment Comparison" not "Phase 2 — Segment Comparison", "Metric Details" not "Phase 3 — Metric Details").
Write to /tmp/aa_segment_comparator_report_<YYYY-MM-DD_HHMMSS>.html and open:
open /tmp/aa_segment_comparator_report_<YYYY-MM-DD_HHMMSS>.html
Always follow the HTML report with a text summary:
Segment Comparison — [Date Range] | Report Suite: [Name]
Segment Context: Mobile 48,200 visits (38.7%) Desktop 72,400 (58.2%)
Mobile Desktop Winner Spread
──────────────── ─────── ──────── ───────── ──────
Visits 48,200 72,400 Desktop 33%
Bounce Rate 61.4% 40.1% ✓ Desktop 35% ✦
Conversion Rate 1.2% 3.1% ✓ Desktop 61% ✦
Revenue $9,400 $31,200 Desktop 70% ✦
✦ = spread > 10% ✓ = winner
Key findings:
- Desktop converts 2.6× better (3.1% vs 1.2%). Prioritize mobile checkout.
- Paid Search (not shown) has highest CVR at 4.8% — most efficient channel.
"Compare our mobile and desktop visitors on conversion metrics."
tools
Use the run-workflow MCP to discover, compose, execute, publish, and save Adobe Firefly workflows. TRIGGER when: user asks what actions are available, what the MCP can do, how to process images/video/3D via workflow, wants to build/run/save/publish a workflow, OR pastes any workflow/batch/execution ID. BARE ID (UUID/workflowId/batchId) = INSPECT ONLY — call inspect_run, NEVER run_workflow_submit. ALWAYS call list_actions first for capability/discovery questions. DO NOT TRIGGER for direct Firefly API calls without MCP (use firefly-api-specs).
tools
Run predefined featured workflows via run-workflow MCP. TRIGGER when user names a featured workflow (retargeting, banners at scale, localization, packaging, banner advertising, etc.) or asks to run a known marketing/production workflow. Requires run-workflow MCP. ALWAYS call get_featured_workflow before compose_workflow. DO NOT TRIGGER for custom one-off workflows with no named template — use run-workflow skill.
tools
Migrate an Adobe Commerce App Builder project from the Integration Starter Kit or Checkout Starter Kit to the new App Management approach. Run from the root of the App Builder project to be migrated. Pass --auto to skip confirmation prompts (suitable for CI or batch use) — auto mode prints a summary of all Q&A questions answered with their defaults. Pass --doc-scan-only to scan README.md and env.dist for outdated content without modifying any files. Use when the user wants to migrate an App Builder project from the Integration Starter Kit or Checkout Starter Kit to the App Management approach, or mentions upgrading their Adobe Commerce extension architecture.
development
Add or modify webhook interceptors in an Adobe Commerce app. Use when the user wants to intercept Commerce operations to validate input, append data, or modify behavior — before or after execution. Requires a base app initialized with commerce-app-init.