mcpbeat Sign in

Analyze CI Failures Agent Skill

Analyze CI failures on Azure SDK for .NET pull requests and post a comment with how-to-fix instructions. Use when a PR has failing checks, CI is red, or someone asks for help fixing CI.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
6033
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/Azure/azure-sdk-for-net --skill analyze-ci-failures

The instruction itself

10 sections, as written by the author

Skill: analyze-ci-failures

Analyze CI failures on an Azure SDK for .NET pull request and post a GitHub comment with actionable fix instructions.

When Invoked

Trigger phrases: "analyze CI failures", "fix CI", "why is CI failing", "help with CI", "analyze PR checks", "CI is red", "failing checks".

Inputs

The user must provide a PR number, PR URL, or pipeline build ID. If not provided, ask the user.

Workflow

1. Gather information

  • Fetch PR details, check statuses, changed files, and workflow runs using GitHub MCP tools.
  • Extract service directory and package name from changed file paths (sdk/<service>/<package>/).
  • If a pipeline build ID is available (often in auto-generated PR descriptions), use azure-sdk-mcp-azsdk_analyze_pipeline for deeper log analysis.
  • For failed GitHub Actions jobs, use github-mcp-server-get_job_logs with return_content: true to get logs.

2. Identify failures

Classify each failure using the CI check mapping and log symptom patterns below. Also inspect the PR's code directly (e.g., read generated files for compile errors, check for missing scaffolding files).

3. Post a comment

Compose a GitHub comment with:

  • Header: ## 🔍 CI Failure Analysis for PR #<number>
  • Summary table: All checks with ✅ ❌ ⏳ status
  • Per-failure sections: Specific to THIS PR — include actual error messages, affected files, and concrete fix commands with <service>/<package> filled in
  • Quick fix command at the end if applicable

Before posting, check existing comments for ## 🔍 CI Failure Analysis to avoid duplicates.

CI Check Name → Failure Mapping

These are the Azure DevOps and GitHub checks that run on SDK PRs. The check names are repo-specific and not discoverable from general knowledge.

| Check Name Pattern | What It Validates | Key Script |

|---|---|---|

| Build Analyze PRBatch | Umbrella: code generation, API export, snippets, spelling, CPM, build + pack | eng/scripts/CodeChecks.ps1 |

| Verify Generated Code | Generated code matches what the generator produces | eng/scripts/CodeChecks.ps1 |

| Validate CPM Compliance | Central Package Management policy | eng/scripts/Validate-CpmCompliance.ps1 |

| Build / Pack | Compilation + NuGet packaging (ApiCompat runs during pack only) | dotnet pack |

| Analyze | Samples, READMEs, snippets compile | eng/scripts/Build-Snippets.ps1 |

| check-spelling | Spell-checking changed files | cspell via eng/common/scripts/check-spelling-in-changed-files.ps1 |

| verify-links | Markdown link validation | eng/common/scripts/Verify-Links.ps1 |

| checkenforcer | Meta-check: waits for all other checks to pass | .github/workflows/event-processor.yml |

Log Symptom → Root Cause Mapping

These are exact strings/patterns to search for in CI logs. They are specific to this repo's scripts and not inferrable from general knowledge.

| Log symptom | Root cause | Category |

|---|---|---|

| Generated code is not up to date | Generated code out of sync | Regenerate code |

| git diff --exit-code failure in CodeChecks | Generated or API files changed after re-running scripts | Regenerate + export API |

| error CS####: | C# compilation error | Build failure — inspect the specific error code |

| Build FAILED | Compilation failure | Build failure |

| MembersMustExist / TypesMustExist | ApiCompat breaking change (only surfaces in dotnet pack) | API compatibility |

| ManagePackageVersionsCentrally / VersionOverride | CPM policy violation | CPM compliance |

| cspell unknown words | Spelling error in code or API surface | Spelling |

| Spell check failed | Spelling error in API surface files | Spelling |

| README instruction format / NuGet\\Install-Package | README uses wrong install format (must use dotnet add package) | README validation |

| verify-links broken URL | Broken markdown links | Link verification |

| Path length exceeded | File path > 210 chars | File path issue |

New Package Checklist

For PRs that introduce a new SDK package (all files are added, no prior version exists), also check for these commonly missing scaffolding files:

  • CHANGELOG.md
  • README.md
  • Directory.Build.props (must import parent props)
  • ci.mgmt.yml (for management-plane) or CI pipeline config
  • api/*.cs (public API surface listings — generated via Export-API.ps1)
  • assets.json (test recording assets)

Without ci.mgmt.yml, the Azure DevOps CI pipeline won't trigger — this is a common reason for checkenforcer staying permanently pending.

Other skills for the same job

different authors, same section of the catalogue
Git Commit
by github
vendor ×3

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping

799 tokens
Github Code Review
by ComeOnOliver
×3

Comprehensive GitHub code review with AI-powered swarm coordination

13k tokens
Commit Work
by softaworks
×2

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

2k tokens
Verification & Quality Assurance
by Microck
×2

Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.

4k tokens
Gh CLI
by christophacham
×2

GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.

10k tokens
Github
by Dicklesworthstone
×2

GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.

1k tokens
Codebase Cleanup Refactor Clean
by ComeOnOliver
×2

You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.

9k tokens
Codebase Cleanup Tech Debt
by ComeOnOliver
×2

You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti

6k tokens

How to use it

Copy the folder

Take azure/analyze-ci-failures from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.