dotnet/maui/rebalance-ui-test-categories

Claude Code and agent skill by dotnet/maui

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Rebalances a UI-test umbrella category into additive method-level CI shards using historical Azure DevOps test durations.

Install

npx vskill@latest install dotnet/maui/rebalance-ui-test-categories

SKILL.md

The same SKILL.md was published earlier as dotnet/maui/rebalance-ui-test-categories.

Rebalance UI Test Categories

Use this skill when a category in maui-pr-uitests needs multiple ordinary matrix legs and each leg must fit a target duration.

Rules

  • Historical Azure test results are required. Never substitute source test

counts for timing evidence.

  • Use one method-level

[ShardedTestCategory(UITestCategories.Category, shard: N)] attribute. It exposes both the umbrella and exactly one numbered shard category to NUnit. Never put sharded categories on a class.

  • Use a conservative per-test/platform p80 of recent valid run totals.
  • Aggregate measured fixed job overhead with nearest-rank p80.
  • Reserve a configurable safety margin (2 minutes by default), so every

projection is strictly below TargetMinutes - SafetyMarginMinutes.

  • Assignment is deterministic multidimensional longest-processing-time

scheduling over individual methods and cohesive ordered fixtures. It minimizes the worst projected platform/shard duration.

  • Fail if one test plus overhead exceeds the target or if -MaxShards cannot

satisfy the target.

  • Applying a category maintains the analyzer's reusable shard-prefix set,

preserving previously registered umbrellas, and performs mandatory plan-to-source validation after editing.

  • Before splitting methods from one fixture across shards, ensure fixture setup

independently reaches the state required by every selected method. Never rely on an Order(1) test to initialize the remaining shard.

  • Dedicated configuration stages that use testConfigurationArgs, such as

ios_ui_tests_mono_cv1, reuse the numbered shard filters but remain outside ordinary category-matrix projection data. Their samples and overhead are recorded separately so they cannot make ordinary shard projections look artificially cheaper.

Commands

Gather, plan, report, and apply in one operation:

powershell
pwsh .github/skills/rebalance-ui-test-categories/scripts/Rebalance-UITestCategories.ps1 `
-Mode All -Category CollectionView -TargetMinutes 60 `
-SafetyMarginMinutes 2 -BuildId 1561395,1563447 `
-UnmeasuredTestPolicy ClassPlatformMax `
-OutputPath artifacts/CollectionView-rebalance.json -Apply

Use -RecentBuildCount N instead of -BuildId to query recent completed builds from pipeline definition 313. To work offline, explicitly pass -EvidencePath path/to/evidence.json; absence of Azure access or an evidence file is an error.

Use -MinimumShards N -MaxShards N when rebalancing an existing matrix without changing its job count.

Separate deterministic phases are also available:

powershell
# Azure -> evidence JSON
... -Mode Gather -Category CollectionView -BuildId 1563447 `
-OutputPath artifacts/CollectionView-evidence.json
# Evidence -> assignment report
... -Mode Plan -Category CollectionView `
-EvidencePath artifacts/CollectionView-evidence.json `
-OutputPath artifacts/CollectionView-plan.json
# Existing report -> source/YAML/constants
... -Mode Apply -Category CollectionView `
-PlanPath artifacts/CollectionView-plan.json -Apply

Review the JSON report's projectedShardMinutes, fixedOverheadMinutes, safetyMarginMinutes, separately recorded configuration-stage evidence, unmatched evidence, and source mapping before accepting the result.

The planner fails when active source tests have no historical sample. For a known-complete historical run where such methods were not reported, the explicit -UnmeasuredTestPolicy ClassPlatformMax option conservatively imputes the maximum measured method duration from the same class/platform (falling back to the platform-wide maximum) and records every imputation in the report.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
23,322
Repository forks
1,985
7-day trend score
50

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dotnet/maui/rebalance-ui-test-categories/badge)](https://verified-skill.com/skills/dotnet/maui/rebalance-ui-test-categories)

Something wrong with this skill or its page? Tell us.