analyze-variants — Claude Code skill: process variant analysis
analyze-variants — a skill for investigating business process execution variants: common and slow paths, rework cases, specific instances.
MIT ★ 1,167 updated 2026-10-29
/plugin marketplace add microsoft/power-platform-skills
/plugin install process-intelligence@power-platform-skillsWhat analyze-variants does
Queries Process Mining API for variants by case count or mean duration (get_variants_with_metrics_v2), filters cases with rework via CaseReworkCount > 0, retrieves a specific case by key attribute. Each task follows a single query branch without running an overview pass before a targeted lookup.
Uses only Read and AskUserQuestion tools: reads data and asks the user for parameters. If metadata lacks a case-key attribute, the skill stops searching for a specific case rather than scanning all rows or inventing caseId. Activity presence does not prove a business outcome: the skill checks outcome definitions and available metrics, routing missing measures to derive-metric.
What it helps with
- find the most common or slowest process variants
- show cases where rework occurred
- retrieve a specific case by identifier
- check transitions between steps for rework cases
- distinguish an observed event from a verified business outcome
Example prompts for the agent
- Show the five most common application flow variants
- Find cases with repeated steps, sort by rework count
- Pull case
Demo-17and show its activities
How to install analyze-variants
1Plugin marketplace
/plugin marketplace add microsoft/power-platform-skills/plugin install process-intelligence@power-platform-skillsThis installs the whole process-intelligence plugin with all its skills
2Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill analyze-variants -a claude-code3Manually: put the files in place
~/.claude/skills/analyze-variants/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/analyze-variants/
1Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill analyze-variants -a codex2Manually: put the files in place
.agents/skills/analyze-variants/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill analyze-variants -a cursor2Manually: put the files in place
.cursor/skills/analyze-variants/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install microsoft/power-platform-skills plugins/process-intelligence/skills/analyze-variants2Manually: put the files in place
.github/skills/analyze-variants/SKILL.md1Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill analyze-variants -a gemini-cli2Platform CLI
gemini skills install https://github.com/microsoft/power-platform-skills --path plugins/process-intelligence/skills/analyze-variantsManually: put the files in place
.devin/skills/analyze-variants/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about analyze-variants
How to install analyze-variants in Claude Code?
Run /plugin marketplace add microsoft/power-platform-skills, then /plugin install process-intelligence@power-platform-skills. Or via npx: npx skills add microsoft/power-platform-skills --skill analyze-variants -a claude-code. The skill will be at ~/.claude/skills/analyze-variants/SKILL.md.
What does analyze-variants do?
Investigates business process variants via Process Mining API: queries common and slow paths, filters cases with rework, finds a specific case by key. Each task follows one query branch without extra overview calls.
Which tools does analyze-variants use?
Only Read and AskUserQuestion. The skill reads data and asks the user for parameters, but cannot plot charts or check conformance — no tools exist for that.
Source text
SKILL.md · MIT
---
name: analyze-variants
description: Use when investigating common or slow variants, repeated work, unusual paths, or a specific Process Mining case.
allowed-tools: Read, AskUserQuestion
---
# Variants, rework and exact cases
Use the [shared contract](../../references/analysis-contract.md) and
[filters/units](../../references/filters-and-units.md).
Choose the branch answering the question; do not run a variant overview before an exact-case or rework request.
## Ordered traces
**Common or slow variants**
1. `get_variants_with_metrics_v2 {S,filterOptions:F,itemsPerPage:5,itemsToSkip:0,metricToSortBy:"CaseCount",sortOrder:"Descending"}`.
2. Only if mean-case slowness still needs comparison, repeat with `metricToSortBy:"CaseDuration"`.
If the first complete result already answers it, stop. `CaseDuration` is a mean;
variant `Duration` is not its substitute.
**Cases with repeated work**
1. Copy F, appending to `caseMetricConditionFilters`:
`{metric:"CaseReworkCount",comparisonOperator:"GreaterThan",values:[0],isInclusive:true}`.
2. `get_cases_with_metrics_v2 {S,filterOptions:Fplus,itemsPerPage:5,itemsToSkip:0,metricToSortBy:"ReworkCount",sortOrder:"Descending"}`.
A native count suffices; no formula or saved metric is needed.
3. Only for unresolved transition evidence:
`get_edges_with_metrics_v2 {S,filterOptions:Fplus,itemsPerPage:10,itemsToSkip:0}`.
No edge sort exists; mark incomplete evidence page-local.
**A specific case**
1. Reuse details to identify the metadata-proven case-key attribute K and its type T.
Bind the exact user/returned value X, e.g. synthetic `"Demo-17"`.
2. Append `{attributeName:K,dataType:T,attributeValues:[X],isInclusive:true}` to F's
`attributeValueFilters`; call
`get_cases_with_metrics_v2 {S,filterOptions:Fcase,itemsPerPage:5,itemsToSkip:0}`.
3. An optional same-cohort bottleneck/edge query can summarize activities/handoffs.
If no exposed key expresses the case, stop; do not scan all cases or invent `caseId`.
## Guardrails
Continue relevant pages or drilldowns until the question is answered or evidence cannot discriminate;
no fixed call/total-row quota or automatic repeated queries. Show at most five headline rows by default.
Use `filterOptions`, `itemsPerPage` and `itemsToSkip`, not `filters`, `metrics`, `limit` or `offset`.
No `variantId` filter exists. For a user-specified sequence use only discovered attribute values
and the advertised sequence-filter schema; do not reconstruct unavailable variant `Values`.
No event-timeline or conformance-check tool exists. Rework/variation alone proves neither
event order nor a conformance violation. Retain scope, versions, metric units and partial coverage.
Activity occurrence is not full payment, successful dismissal, business closure or compliance.
Check the business outcome definition and available attributes/measures; route missing measures
to derive-metric, never infer success from an event name.
Missing events or terminal-looking traces may be censored, ongoing, legitimately ended or
incompletely recorded. Do not choose without closure, recording and observation-coverage evidence.
Use the [investigation method](../../references/investigation-method.md): distinguish observed
presence/counts from tested outcomes; mark an unresolved outcome **inconclusive** and retain
definition provenance, baseline/test filters, evidence references and the next discriminating check.
© Microsoft · MIT · microsoft/power-platform-skills