CI Failure Fixer
Diagnose pull request CI failures and iterate toward a fix.
The skill explicitly uses gh, GitHub Actions logs, and artifacts, and partially describes the data flow. However, it includes external and persistent actions such as gh run rerun, git add -A, commit, and push without stepwise user confirmation, least-privilege guidance, sensitive-log redaction, rollback instructions, or recovery procedures. Microsoft provenance and the MIT license support attribution but do not increase safety capability.
The workflow, commands, alternate API log path, and common failure patterns are reasonably clear. Reliability is reduced by dependencies on gh, repository state, network access, permissions, platform-specific assumptions, exact artifact names, and mutable log formats. Input validation and controlled, diagnosable failure handling are limited. Static calibration also requires deducting for the absence of execution verification.
The audience and scenario are clear: VS Code contributors with a PR branch checked out and failing CI checks. It covers build, test, infrastructure, and flaky failures. Boundaries are incomplete for missing PRs, insufficient permissions, non-GitHub checks, different repository layouts, or non-standard artifacts; the response mainly shifts these cases to the user. Chinese-language interaction and mainland-China reachability are not addressed, so points are deducted.
The SKILL.md has front matter, a staged workflow, command examples, failure categories, and a quick reference. The supplied README, LICENSE, and package.json provide repository attribution, MIT licensing, and version context. The skill lacks its own version, changelog, maintainer, update path, installation notes, parameter constraints, confirmation policy, rollback guidance, and FAQ; several instructions rely on repository-specific conventions.
The skill provides a usable sequence for finding the PR, locating failed checks, retrieving logs, classifying causes, and iterating on a fix. However, the supplied files do not prove that the key paths were executed, repair quality depends on the user interpreting logs and editing code, and the push and CI-rerun loop is not verified end to end. The static ceiling supports 7, with deductions for missing execution evidence and incomplete closure.
The commands, GitHub Actions log annotations, artifact layout, and repository naming conventions provide auditable primary evidence. There is no skill-specific test suite, example session, versioned behavioral verification, or third-party execution record, and the supplied workflows and tests do not cover the skill's key paths. Therefore it receives the static-review ceiling of 5, not a higher score.
- Obtain explicit user confirmation before git add -A, commit, push, or gh run rerun, and constrain the target files, branch, and run.
- CI logs and artifacts may contain tokens, paths, internal data, or test credentials; the skill gives no redaction, minimal-download, or secure-storage guidance.
- The /dev/null download probe, fixed artifact names, and grep/tail parsing depend on environment and repository conventions and may require manual adjustment.
- There is no skill-specific execution evidence; no command was run and successful CI remediation was not verified in this static review.
- Core GitHub CLI and GitHub Actions access depends on overseas services; the skill provides no alternative for restricted mainland-China connectivity.
What it does & when to use it
This skill is for developers who have a pull request branch checked out locally and need to investigate failed CI. It uses Git and the GitHub CLI to find the branch’s PR, inspect failed checks, retrieve job logs and artifacts, and identify test, build, network, or infrastructure causes. After diagnosis, it guides local verification, committing, pushing, and watching CI again. It explicitly requires the gh CLI and focuses on CI failure investigation rather than general code review or testing.
Reads the current Git branch and calls gh pr view to locate its pull request; uses gh pr checks to list all or failed checks and optionally wait for completion; extracts a run ID from a check link and uses gh run view to list failed jobs; retrieves failed-step logs with gh run view --log-failed, artifacts with gh run download, or per-job logs with gh api; searches logs with grep, tail, and sed for error annotations, assertion failures, TypeScript errors, network failures, and timeouts; checks recent main-branch runs to assess whether a failure is related to the PR; and guides local changes, type checking, relevant tests, commits, pushes, and failed-job reruns.
- A developer has a PR branch checked out and needs to identify which GitHub Actions check and job failed.
- An integration or extension test failed and the developer needs exthost.log, terminal.log, main.log, or crash-dump artifacts for diagnosis.
- A build, TypeScript, ESLint, or stylelint check failed and the developer needs the exact error from the failed-step output.
- A failed job has finished while the overall CI run is still in progress, requiring direct retrieval of the job log through the GitHub API.
- A failure may be caused by networking, an Electron download, disk or memory pressure, or a test flake, and the developer needs to decide whether to rerun instead of changing code.
Pros & cons
- Covers the full path from finding the PR and failed check to retrieving evidence, assessing the cause, and iterating on a fix.
- Provides three evidence paths: failed-step logs, run artifacts, and API-based per-job logs while a run is still active.
- Includes concrete ways to distinguish code defects from infrastructure failures and test flakes.
- Explains the roles of main.log, terminal.log, and exthost.log in typical VS Code log artifacts.
- Requires the GitHub CLI, Git, network access, a local shell, and filesystem access.
- Assumes the user has already checked out a PR branch; if no PR is found, the user must provide a PR number.
- The skill does not document standalone installation or client configuration.
- Its workflow and artifact naming examples target GitHub Actions and the VS Code repository, so other CI systems or repositories may require adaptation.
- There is no evidence that it automatically edits code or guarantees a successful fix; the user must review and execute those steps.
How to install
The source does not document a skill-specific installation command or client registration procedure. The skill file is located at https://github.com/microsoft/vscode/tree/main/.github/skills/fix-ci-failures and is one of 61 skills bundled in microsoft/vscode. The repository source is licensed under MIT.
How to use
Check out the PR branch locally, install the GitHub CLI, and ask a compatible Agent something like: “Investigate the CI failures for the current PR, identify the root cause, and guide me through the fix.” The workflow can use: gh pr view --json number,title,url,statusCheckRollup; gh pr checks --json name,state,link,bucket; gh run view <RUN_ID> --json jobs; and gh run view <RUN_ID> --job <JOB_ID> --log-failed. If the run is still in progress, retrieve a completed job log with gh api repos/microsoft/vscode/actions/jobs/<JOB_ID>/logs > "$TMPDIR/ci-job-log.txt". After the fix, the workflow guides verification, git commit, git push, and another gh pr checks --watch --fail-fast.