claude/skills/check-ci/SKILL.md
Monitor CI checks on a GitHub PR (GitHub Actions and CircleCI), investigate failures, implement fixes, and re-push. Use when CI is failing on a PR or immediately after creating one.
npx skillsauth add iainmcl/dotfiles check-ciInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Monitor CI checks on a GitHub PR, investigate failures, implement fixes, and re-push until all checks pass. Handles both GitHub Actions and CircleCI.
If a PR URL or number was passed as an argument, use it.
Otherwise detect the open PR for the current branch:
gh pr view --json number,url,headRefName
Sandbox note: All
ghcommands requiredangerouslyDisableSandbox: true— the sandbox breaks TLS verification for GitHub API calls. Always set this flag for everyghinvocation.
If no open PR is found, report this to the user and stop.
Poll until all checks have reached a terminal state (not queued or in_progress):
gh pr checks {PR_NUMBER} --watch --interval 30
If all checks pass, report success and stop.
Fetch full check details to classify each failure by provider:
gh pr checks {PR_NUMBER} --json name,status,conclusion,link
For each check where conclusion is failure, record the name and link.
Determine the provider from the link field.
Link pattern: https://github.com/{owner}/{repo}/actions/runs/{run_id}/...
Extract the run_id and fetch failed step output:
gh run view {RUN_ID} --log-failed
Link pattern: https://app.circleci.com/pipelines/github/{owner}/{repo}/{pipeline_number}/workflows/{workflow_id}
Extract the workflow_id. List the jobs in that workflow using the CircleCI v2 API:
curl -s -H "Circle-Token: ${CIRCLECI_TOKEN}" \
"https://circleci.com/api/v2/workflow/{workflow_id}/job"
For each failed job, fetch its log output via the v1.1 API (which returns the full step-by-step output):
curl -s -H "Circle-Token: ${CIRCLECI_TOKEN}" \
"https://circleci.com/api/v1.1/project/github/{owner}/{repo}/{job_number}/output"
The response is a JSON array of step outputs - look for steps where failed: true and read their message content.
Fallback ordering if CIRCLECI_TOKEN is unset:
circleci CLI if available: circleci workflow get {workflow_id}Track each distinct failure by (check_name, error_fingerprint) where the fingerprint is the first meaningful error line (e.g. the failing test name, the lint rule, the import error). For each unique (check_name, error_fingerprint) pair, attempt a fix up to 3 times.
Key rules:
If any failure reaches its retry limit, stop, summarise what was tried for each exhausted failure, and hand back to the user.
Before making any changes, read the source files identified in the failure output. Understand the root cause and state it clearly.
Apply the minimal change to fix the failure:
type: ignore or cast().If a language-specific skill applies (e.g. python-coding for Python), activate it before making changes.
Do not fix multiple unrelated failures in a single commit. One logical fix per commit.
Write the commit message to /tmp/commit_msg.txt then commit:
git commit -F /tmp/commit_msg.txt
git push
Never use $() substitution or HEREDOC for commit messages.
After pushing, return to Wait for checks to complete.
development
Run a weekly achievement review - pulls from Jira, GitHub, and Slack to capture what you shipped in the last week, maps achievements to your 2026 goals, and appends impact-focused entries to your brag doc. Use when asked to "do a weekly review", "capture this week's wins", "update my brag doc", "what did I ship this week", "record my achievements", "what have I done this week", "add to my performance doc", or anything about tracking weekly progress, brag doc entries, or performance evidence. Trigger even if the user just says "weekly review" or "document what I did".
testing
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
tools
Set up a project update config for the current repo, so that running project-update requires no setup questions. Use when asked to "set up project updates", "configure project update", "initialise project update", or "create a project update config". Run this once per project repo.
testing
Find the highest-frequency unresolved Sentry error for the VAT & Invoicing or Billing team, understand its root cause, create a Jira ticket in the APP project, implement a fix, and open a draft PR. Use when asked to "fix sentry issues", "triage sentry errors", "look at sentry", "what's broken in sentry", "create a fix for a sentry issue", or "sentry triage". Runs the full flow autonomously in the background.