Analyze a dotnet/runtime PR's CI failures, skip failures already known to Build Analysis, find matching Known Build Errors, and create or draft new KBEs for the remaining failures. Supports dry-run output to local markdown files instead of creating GitHub issues.
67
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./.github/skills/pr-failure-scan/SKILL.mdUse this skill for requests like:
/pr-failure-scan <PR URL>/pr-failure-scan <PR URL> dryruncreate KBEs for PR <number>This skill is PR-targeted and local-account-aware. It complements the scheduled CI failure scan workflow but does not try to reproduce the workflow's safe-output or follow-up PR behavior.
Before triaging any failure candidate, read and follow:
.github/workflows/shared/create-kbe.instructions.mdThat file owns the shared KBE lookup flow, KBE body template, signature specificity guidance, verification checklist, and the rules for identifying "existing KBE that Build Analysis likely missed".
Accept one of:
dryrun token.Interpret dryrun case-insensitively. The source repository is always
dotnet/runtime.
Examples:
/pr-failure-scan 123456/pr-failure-scan https://github.com/dotnet/runtime/pull/123456/pr-failure-scan https://github.com/dotnet/runtime/pull/123456 dryrungh api user is fine).If they differ, you must ask for explicit confirmation before doing the rest of the run. Running the command itself is not enough permission.
The confirmation must warn the user that this skill can create GitHub issues under their account, and that analyzing an unknown PR carries risk because the resulting issue content and decisions will be attributed to them.
If the user declines, stop immediately.
Use the latest completed check runs for the PR head SHA.
Collect all of:
Build Analysis check run payload from the GitHub REST API.The local skill has a different candidate-source model than the scheduled workflow:
Build the candidate list from two sources:
Build Analysis check text for Create issue in this repo links
and the surrounding failure description.Skip any failure that Build Analysis already treated as known. The skill should not re-triage failures already recognized by Build Analysis.
If Build Analysis and the raw PR checks disagree, prefer the raw CI evidence and report the disagreement in the final output.
For each candidate failure, do the following:
.github/workflows/shared/create-kbe.instructions.md.For PR-targeted runs, it is acceptable to prepare a draft-only KBE candidate for a Build Analysis unknown or excluded failure even when the evidence is not yet strong enough for fully automated filing, as long as you clearly mark why the case still needs human review.
Use this only for the local skill. Do not feed this relaxed draft behavior back into the scheduled workflow rules.
Typical cases where a draft-only candidate may still be useful:
Create issue in this repo link for the
failure.For such draft-only cases:
If a candidate is too weak even for a useful draft, place it in unhandled with a concrete reason.
When producing a dry-run draft, optimize for a human-reviewable issue proposal that is close to what a developer would want to file from the PR, even if the draft still needs final cleanup before live filing.
In particular:
Hang: / Test failure: title when that better communicates the
issue for a human reviewer.For every item in the new KBE needed bucket, always write a markdown draft
file before deciding whether to create a GitHub issue. This applies to both
dryrun and live mode.
new KBE needed item.Each draft file should contain:
These dry-run files are review artifacts, not necessarily byte-for-byte live issue bodies. Keep them easy to compare and edit on disk.
Prefer this layout for dry-run files:
# Draft KBE issue
- Proposed title: `...`
- Proposed labels: `Known Build Error`, `blocking-clean-ci`
## Draft issue body
## Build Information
Build: ...
Build error leg or test failing: ...
## Error Message
```json
...
```
**Failure details:**
```text
...
```
**Affected legs:**
- ...
**Console Log:**
- ...
**First build in window:**
- ...
**Recommended action:**
...For dry-run artifacts, prefer the layout above over adding extra sections like
Pull request: or ## Error Details unless they are truly necessary for
understanding the draft.
When linking to a draft file in a user-facing message or confirmation question, include both:
In dryrun mode:
In live mode:
Use the shared KBE template guidance for the body.
Every live-created issue body must include a visible AI disclosure note because the issue is being filed under a developer account. A concise note is enough, for example:
[!NOTE] This issue draft was prepared with GitHub Copilot assistance and reviewed by the submitting developer.
The final response must contain all four sections below.
List either:
For every newly created or newly drafted KBE, provide:
For every such failure, provide:
For every unhandled failure, provide:
ba10a6e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.