compare-cohorts — скилл для Claude Code: сравнение когорт процессов
Скилл compare-cohorts для сравнения когорт процессов, департаментов, периодов или результатов до и после изменений при совпадающих определениях метрик.
MIT ★ 1 167 обновлён 2026-10-29
/plugin marketplace add microsoft/power-platform-skills
/plugin install process-intelligence@power-platform-skillsЧто делает compare-cohorts
Скилл фиксирует определение результата, метрику, агрегацию и единицы измерения, затем копирует базовую линию фильтров дважды и меняет только одно условие когорты. Для атрибутов добавляет значение A в один фильтр и B — в другой, затем вызывает get_process_overall_metrics_v2 с каждым набором. Если нужна группировка, запрашивает get_attribute_statistics с теми же фильтрами.
Для периодов меняет одну пару timeframeFilters, окна кейсов трактуются как Contained. Если версия процесса изменилась между запросами, скилл помечает результат как **inconclusive** и останавливается или перезапускает оба вызова. Без FFmpeg или других внешних зависимостей не работает — требуется API Process Intelligence.
Выводит количество кейсов, средние метрики, абсолютную разницу и относительное изменение при ненулевой базе. Пустая когорта означает недостаточно данных, а не нулевую длительность.
Какие задачи решает
- сравнить департаменты по средней длительности кейсов
- проверить эффект изменений процесса на двух периодах
- выявить разницу метрик между когортами атрибутов
Примеры запросов агенту
- Сравни длительность кейсов отдела A и отдела B за последний квартал
- Покажи разницу времени ожидания до и после внедрения изменений
- Сопоставь топ-5 групп атрибута Region по TotalDuration для двух когорт
Как установить compare-cohorts
1Через маркетплейс плагинов
/plugin marketplace add microsoft/power-platform-skills/plugin install process-intelligence@power-platform-skillsКоманда ставит плагин process-intelligence целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill compare-cohorts -a claude-code3Вручную: положить файлы
~/.claude/skills/compare-cohorts/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/compare-cohorts/
1Через Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill compare-cohorts -a codex2Вручную: положить файлы
.agents/skills/compare-cohorts/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill compare-cohorts -a cursor2Вручную: положить файлы
.cursor/skills/compare-cohorts/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install microsoft/power-platform-skills plugins/process-intelligence/skills/compare-cohorts2Вручную: положить файлы
.github/skills/compare-cohorts/SKILL.md1Через Skills CLI (Vercel)
npx skills add microsoft/power-platform-skills --skill compare-cohorts -a gemini-cli2Командой платформы
gemini skills install https://github.com/microsoft/power-platform-skills --path plugins/process-intelligence/skills/compare-cohortsВручную: положить файлы
.devin/skills/compare-cohorts/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о compare-cohorts
Как установить compare-cohorts в Claude Code?
Выполни /plugin marketplace add microsoft/power-platform-skills, затем /plugin install process-intelligence@power-platform-skills, далее npx skills add microsoft/power-platform-skills --skill compare-cohorts -a claude-code. Файл скилла появится в ~/.claude/skills/compare-cohorts/SKILL.md.
Что делает compare-cohorts?
Скилл сравнивает когорты процессов, периоды или департаменты при фиксированных определениях метрик, копируя базовую линию фильтров и меняя одно условие когорты для каждого запроса.
Что значит inconclusive результат в compare-cohorts?
Если версия процесса изменилась между двумя запросами когорт, скилл помечает сравнение как inconclusive, поскольку данные перестали быть сопоставимыми.
Исходный текст
SKILL.md · MIT
---
name: compare-cohorts
description: Use when comparing process cohorts, departments, periods or before-and-after results under matched definitions.
allowed-tools: Read, AskUserQuestion
---
# Matched cohort comparisons
Use the [shared contract](../../references/analysis-contract.md) and
[filters/units](../../references/filters-and-units.md).
Fix the outcome definition/provenance, metric, aggregation, units, timezone and one selector S.
Freeze the user's agreed baseline F, separately from current exploratory filters.
Reuse metadata versions and exact typed cohort values. Use the
[investigation method](../../references/investigation-method.md) for findings/status.
## Ordered trace
1. Copy baseline F twice. For attribute cohorts append
`{attributeName:A,dataType:T,attributeValues:[X],isInclusive:true}` to
`attributeValueFilters` for A's cohort value, and the same shape with Y for B.
Preserve other agreed baseline conditions; retain rework restrictions only if part of that
baseline. Do not leak an exploratory/outcome-only subset into a full-population comparison.
Change only the intended cohort condition. If values are unknown, request
`get_attribute_values_v2 {S,attributeName:A,itemsPerPage:20,itemsToSkip:0,filterOptions:F}`;
it returns values, not frequencies.
2. `get_process_overall_metrics_v2 {S,filterOptions:F_A}` ->
`get_process_overall_metrics_v2 {S,filterOptions:F_B}`.
No `metrics`, `groupBy` or aggregation parameter exists. Use the same returned metric definitions;
native `CaseDuration`/`CaseWaitingTime` are means.
3. Only if a grouped explanation is needed and statistics is advertised, make a **matched pair**:
`get_attribute_statistics {S,attributeName:A,filterOptions:F_A,itemsPerPage:5,itemsToSkip:0,metricToSortBy:"TotalDuration",sortOrder:"Descending"}`,
then exactly the same call with F_B. Do not treat independent top-five pages as a complete aligned population.
Continue relevant value/group pages or matched follow-ups when needed, without fixed call quotas.
Stop at sufficient evidence, no new information or a capability/error boundary; no blind sweeps.
Do not create views or use two inclusive timeframes in one query as an A/B comparison.
## Time and reproducibility
For periods, change only one explicit `timeframeFilters` start/end pair in each copied F.
Case windows mean **Contained**, not cases Started/Completed/Intersecting or all events during the period.
If completed-only membership including earlier starts is essential, stop/reframe or route
to derive-metric/a user-confirmed existing matching view. Never invent a date-mode field
or promise unknown end-boundary behavior.
If refresh is reported or reproducibility is at risk, recheck details.
Changed PV/PMV invalidates the pair: mark **inconclusive**, stop or deliberately rerun both,
not just the second.
Process selection resolves latest; no direct version selector or atomic comparison snapshot exists.
Views pin version context but their configuration is mutable/cached.
Report A/B counts, mean metrics, absolute delta and relative change only for a nonzero baseline.
Empty cohorts mean insufficient evidence, not zero duration/infinite improvement.
State scope/version and unmatched-group coverage; at most five headline rows.
Recorded means do not establish closure, equal maturity or complete lifecycles. Report those
as unknown unless supported; qualify the comparison, not an assumed causal improvement.
Retain baseline/cohort filters, evidence references, status and alternatives. Overlapping groups
cannot be added as unique-case totals.
Object-centric comparisons belong in analyze-objects, not case-filter fallbacks.
© Microsoft · MIT · microsoft/power-platform-skills