Official agent skill

Find Regression Risk

by dotnet in dotnet/maui

Checks a pull request for lines that undo a recent bug fix by comparing what the PR removes with what labeled bug-fix PRs added to the same files.

OfficialMITAuto-check passedDevelopment

Install Find Regression Risk

skills CLI
$ npx skills add dotnet/maui --skill find-regression-risk -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dotnet/maui find-regression-risk --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dotnet/maui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/find-regression-risk .claude/skills/find-regression-risk && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
find-regression-risk
GitHub stars
23k
Token cost
~1.1k tokens
SKILL.md length
372 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

Checks a pull request for lines that undo a recent bug fix by comparing what the PR removes with what labeled bug-fix PRs added to the same files.

  • Works in 5 steps: PR diff — collects lines REMOVED by the… → Git history — git log --follow… → Label filter — keeps PRs (or their… → …
  • Checking whether a pull request reverts an earlier bug fix
  • SKILL.md covers How It Works, Standalone Invocation, Parameters and Outputs, plus 3 more sections
  • Calls pwsh, git and dotnet

What it does

This skill runs a mechanical, script-based check with no AI or LLM involved. It collects the lines a PR removes, uses git log over a recent window to find earlier PRs that touched the same files, keeps those labeled i/regression, t/bug, p/0 or p/1, and compares the lines those fixes added with what the current PR deletes, ignoring whitespace.

The verdict is REVERT when a removed line matches a line a fix added, OVERLAP when the same file was changed without an exact match, and CLEAN when no bug-fix PR touched the files. With an output directory it writes result.txt, risks.json, a content.md summary for a PR comment and optionally inline-findings.json. Parameters set the repository, file list, history window in months, a per-file cap on recent PRs and the base branch.

It runs through Find-RegressionRisks.ps1 and is wired into the dotnet/maui review script as a step after UI test detection and before the Gate step; when a REVERT is found, the regression tests from the reverted fixes are executed. It is not meant for release-readiness checks, CI failure investigation or general code review.

When your agent uses it

  • Checking whether a pull request reverts an earlier bug fix
  • Adding a regression cross-reference step to an automated PR review
  • Producing a summary comment of regression risks for a PR

Example prompts

  • “Does PR 33908 revert a previous fix? Check it for regression risk.”
  • “Run the regression risk script on my PR and write the results to ./out.”
  • “Look at the files this change touches and tell me whether any recent bug-fix PRs overlap.”

Requirements

  • PowerShell (pwsh)
  • git
  • GitHub CLI (gh) authenticated against the target repository
  • Compatibility (from SKILL.md): Requires PowerShell (pwsh), git, and GitHub CLI (gh) authenticated against the target repository.

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. PR diff — collects lines REMOVED by the PR under review.
  2. Git history — git log --follow --since=6mo finds recent PRs that touched the same files.
  3. Label filter — keeps PRs (or their linked issues) labeled i/regression, t/bug, p/0, or p/1.
  4. Fix diff — fetches each fix PR's diff and collects lines it ADDED to the same file.
  5. Compare — whitespace-insensitive string equality

What it can do on your machine

Read from SKILL.md and the folder at commit b926f05. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pwsh
    • git
    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires PowerShell (pwsh), git, and GitHub CLI (gh) authenticated against the target repository.

    From compatibility in the SKILL.md frontmatter.

Context cost

Find Regression Risk loads about 1.1k tokens when it runs. Until then it costs about 164 tokens; SKILL.md has 372 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~164
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dotnet/maui at commit b926f05, republished under its MIT licence (© dotnet). 372 words, ~1,122 tokens.

Download SKILL.mdSave it as .claude/skills/find-regression-risk/SKILL.md (or your agent's skills folder).
name
find-regression-risk
description
Detects potential regression risks in a PR by cross-referencing lines the PR REMOVES against lines ADDED by recent labeled bug-fix PRs (`i/regression`, `t/bug`, `p/0`, `p/1`) touching the same files. Purely mechanical — no AI/LLM. Emits a CLEAN / OVERLAP / REVERT verdict plus structured findings. Triggers on: "does this PR revert a previous fix", "check PR for regression risk", "find regression risks in PR", "is this change reverting a bug fix". Do NOT use for: assessing ship-readiness of a release branch (use release-readiness), investigating CI failures (use azdo-build-investigator), or general code review (use code-review).
compatibility
Requires PowerShell (pwsh), git, and GitHub CLI (gh) authenticated against the target repository.
metadata.author
dotnet-maui
metadata.version
1.0

find-regression-risk

Detects potential regression risks in a PR by cross-referencing removed lines against lines added by recent labeled bug-fix PRs.

How It Works

Purely mechanical — no AI/LLM. Five-step algorithm:

  1. PR diff — collects lines REMOVED by the PR under review.
  2. Git history — git log --follow --since=6mo finds recent PRs that touched the same files.
  3. Label filter — keeps PRs (or their linked issues) labeled i/regression, t/bug, p/0, or p/1.
  4. Fix diff — fetches each fix PR's diff and collects lines it ADDED to the same file.
  5. Compare — whitespace-insensitive string equality:
    • 🔴 REVERT — removed line matches a line a fix PR added (highest risk).
    • 🟡 OVERLAP — same file modified, but no exact line revert.
    • 🟢 CLEAN — no bug-fix PRs touch the same files.

Standalone Invocation

powershell
# Analyze a specific PR (auto-detects files)
pwsh -NoProfile -Command '& ./.github/scripts/Find-RegressionRisks.ps1 -PRNumber 33908 -OutputDir /tmp/out'

# Analyze specific files only
pwsh -NoProfile -Command '& ./.github/scripts/Find-RegressionRisks.ps1 -PRNumber 33908 -OutputDir /tmp/out -FilePaths @("src/Core/src/Platform/Android/MauiWindowInsetListener.cs")'

Parameters

ParameterRequiredDefaultDescription
-PRNumberYes—PR number to analyze
-RepoNodotnet/mauiRepository in owner/name form
-FilePathsNoauto-detectImplementation files to check
-MonthsBackNo6History window for git log
-MaxRecentPRsPerFileNo20Rate-limit guard per file
-BaseBranchNomainBase branch for git log scope
-OutputDirNo—Directory for output files
-WriteInlineFindingsNooffEmit inline-findings.json

Outputs

When -OutputDir is specified:

  • result.txt — single token: CLEAN, OVERLAP, or REVERT
  • risks.json — structured findings for downstream agents
  • content.md — markdown summary for the PR comment
  • inline-findings.json — (only with -WriteInlineFindings) inline annotations
Show full SKILL.md (158 more words)Show less

Integration

The script runs as STEP 4 in Review-PR.ps1 (Regression Cross-Reference, after UI test detection and before the Gate step). Its content.md is assembled into the AI summary review by post-ai-summary-comment.ps1.

When REVERT risks are detected, the regression tests from the reverted fix PRs are executed:

  • UI tests → BuildAndRunHostApp.ps1 -Platform <plat> -TestFilter <filter>
  • Device tests → Run-DeviceTests.ps1 -Project <proj> -Platform <plat> -TestFilter <filter>
  • Unit/XAML tests → dotnet test <project> --filter <filter>

The expert reviewer agent (maui-expert-reviewer.md, dimension #6) reads risks.json to check for REVERT entries.

Known Limitations

  • Inline findings: The -WriteInlineFindings flag emits deletion-side (LEFT) annotations, but post-inline-review.ps1 currently only posts RIGHT-side comments. LEFT-side findings are silently dropped. This is documented as future work.
  • Whitespace-only changes: By design, an indent-only change to a fix line won't trigger a REVERT (the normalization collapses whitespace). This avoids false positives from reformatting.
  • pwsh -File array parameters: When invoking standalone from bash, use pwsh -Command '& ./script.ps1 -FilePaths @(...)' syntax. pwsh -File doesn't evaluate @() expressions.

Tests

powershell
pwsh -NoProfile -File .github/scripts/tests/Test-FindRegressionRisks.ps1

© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/find-regression-risk of dotnet/maui.

Open the folder on GitHubat commit b926f05

Compare with similar skills

Find Regression Risk next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Find Regression Risk compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Find Regression Risk this skilldotnet/maui23k—~1.1kAutomated safety check: PassMIT
PR Deep VerificationQwenLM/qwen-code28k—~18kAutomated safety check: PassApache-2.0
PR Review State Fetchprisma/orm48k—~767Automated safety check: PassApache-2.0
Greploop Appsmichaelshimeles/skills1.3k1 repos~3.6kAutomated safety check: PassMIT
PR Triagertk-ai/rtk83k—~2.5kAutomated safety check: NotesApache-2.0
Difit Reviewyoshiko-pg/difit3.2k—~1.2kAutomated safety check: PassMIT

Similar skills

  • PR Deep Verification

    QwenLM/qwen-code

    Runs a sandboxed, evidence-based check of one qwen-code pull request, proving its main change against the base build and writing a report with a machine-readable verdict.

    28k GitHub stars~18k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.

    48k GitHub stars~767 tokensUpdated today
    DevelopmentAuto-check passed
  • Greploop Apps

    michaelshimeles/skills

    Loops on a large pull request, merge request or Perforce changelist, fixing Greptile findings until it scores 5/5 with no unresolved comments.

    1.3k GitHub starsUsed in 1 repo~3.6k tokens
    DevelopmentAuto-check passed
  • PR Triage

    rtk-ai/rtk

    Audits a repository's open pull requests, deep-reviews chosen ones and drafts review comments that are only posted after you approve them.

    83k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Difit Review

    yoshiko-pg/difit

    Review a specific diff (branch, commit, or GitHub PR) and show the findings as comments inside difit, the local diff viewer.

    3.2k GitHub stars~1.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Addresses unresolved pull request review threads and suppressed (low-confidence) Copilot review comments on the current branch, folds each fix into the…

    1.8k GitHub stars~657 tokensUpdated 7 days ago
    DevelopmentAuto-check passed

More from dotnet/maui

All 27 skills in this repo
  • Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.

    23k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Official

    Reviews the tests added in a pull request for fix coverage, quality, edge cases and test type, and recommends lighter test types where they would do.

    23k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Official

    Produces evidence-backed ship-readiness verdicts for .NET MAUI Servicing Releases and Previews, and drafts public-safe release handoff pages from the result.

    23k GitHub stars~15k tokensUpdated yesterday
    Auto-check passed
  • Official

    Interprets pinned managed benchmark evidence for a dotnet/maui pull request and writes a narrative for the performance review workflow, without running or publishing anything.

    23k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • PR Finalize

    dotnet/maui

    Official

    Checks that a pull request's title and description match its implementation and reviews the code for best practices before merge, without posting anything.

    23k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Official

    Adds MAUI-specific guardrails on top of the maestro-cli skill and Maestro MCP tools for darc, BAR, and channel or feed lookups in dotnet/maui.

    23k GitHub stars~10k tokensUpdated yesterday
    Auto-check passed

Questions about Find Regression Risk

What does Find Regression Risk do?

Checks a pull request for lines that undo a recent bug fix by comparing what the PR removes with what labeled bug-fix PRs added to the same files. This skill runs a mechanical, script-based check with no AI or LLM involved. It collects the lines a PR removes, uses git log over a recent window to find earlier PRs that touched the same files, keeps those labeled i/regression, t/bug, p/0 or p/1, and compares the lines those fixes added with what the current PR deletes, ignoring whitespace.

When should I use Find Regression Risk?

Find Regression Risk fits situations like: checking whether a pull request reverts an earlier bug fix; adding a regression cross-reference step to an automated PR review; producing a summary comment of regression risks for a PR.

How do I install Find Regression Risk in Claude Code?

Run `npx skills add dotnet/maui --skill find-regression-risk -a claude-code`. Or copy the skill folder (.github/skills/find-regression-risk in dotnet/maui) into .claude/skills/find-regression-risk in your project. Claude Code loads it when a task matches its description.

How do I install Find Regression Risk in Codex?

Run `npx skills add dotnet/maui --skill find-regression-risk -a codex`. Or copy the skill folder (.github/skills/find-regression-risk in dotnet/maui) into .agents/skills/find-regression-risk in your project. Codex loads it when a task matches its description.

Can I use Find Regression Risk in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/maui --skill find-regression-risk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/find-regression-risk, .gemini/skills/find-regression-risk, .github/skills/find-regression-risk and .opencode/skills/find-regression-risk in your project.

What does Find Regression Risk need to run?

Going by SKILL.md and its folder, Find Regression Risk needs the command-line tools its instructions call (pwsh, git and dotnet). Our summary lists: PowerShell (pwsh); git; GitHub CLI (gh) authenticated against the target repository. Compatibility (from SKILL.md): Requires PowerShell (pwsh), git, and GitHub CLI (gh) authenticated against the target repository..

Does Find Regression Risk access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Find Regression Risk safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Find Regression Risk use?

Find Regression Risk is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Find Regression Risk use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Find Regression Risk?

Skills that share tags, products or a category with Find Regression Risk: PR Deep Verification (QwenLM/qwen-code, 28k stars), PR Review State Fetch (prisma/orm, 48k stars), Greploop Apps (michaelshimeles/skills, 1.3k stars) and PR Triage (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Find Regression Risk?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/maui, which has 23,321 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 8, 2026.

Source: dotnet/maui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.