plugins/ci-cd-tools/skills/fixing-ci/SKILL.md
--- name: fixing-ci description: Use when CI is failing on a branch, PR, or specific Buildkite build and the user wants to iteratively fix it through verify-locally → push → check → iterate. Strong signals: "fix CI", "make CI green", "CI is failing", "tests are failing in Buildkite", "iterate on this build", a Buildkite build URL paired with intent to push fixes, a PR with a red check the user wants to make green, or repeat-push debugging. Covers verify-fix-locally workflows (rspec, jest, lint,
npx skillsauth add technicalpickles/pickled-claude-plugins plugins/ci-cd-tools/skills/fixing-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.
This skill drives an iterative CI fix session: investigate the failure (via the Buildkite investigation skill), apply a fix, verify it locally, push, watch the new build, and iterate until green or until you've hit the iteration cap and need to step back.
The scope is the fix loop only — investigation is delegated to buildkite:investigating-builds, which already covers bktide snapshot, log reading, and failure-pattern recognition.
buildkite:investigating-builds directlybuildkite:developing-pipelinesThe skill needs to know what to fix. Any one of these inputs is sufficient:
build_url — A Buildkite build URL (e.g. https://buildkite.com/org/pipeline/builds/123)pr — A GitHub PR number (resolves to its latest failing build for that branch)branch — A git branch name (resolves to its open PR's latest failing build)If the caller provides one of the above, use it directly. Otherwise:
git branch --show-current), look for an open PR (gh pr view --json number,headRefName), find its latest failing build via the buildkite:investigating-builds skill's "Checking Current Branch/PR Status" workflow.Record the starting point:
gh pr view --json number)Announce:
"Starting CI fix session for branch
<branch>(Build #<number>). I see <N> failed jobs. Let me investigate."
Before diving into failures, check if the branch is up to date with main.
Check if behind main:
git fetch origin main
git rev-list --count HEAD..origin/main
If behind by more than 0 commits, the failures might already be fixed in main. Decide:
In autonomous mode (e.g. invoked from a workflow agent), default to merging main if behind. The slash-command wrapper asks the user.
Use the buildkite:investigating-builds skill to investigate the failing build. The skill's tool hierarchy applies: bktide snapshot first, then other bktide commands, then MCP tools as fallback.
After investigation, you should have:
Group failures by type:
| Category | Signs | Typical Fix | |----------|-------|-------------| | Stale branch | Tests pass on main | Merge main, resolve conflicts | | Gemfile.lock issues | Checksum errors, missing gems | Regenerate from main (see references/common-fix-patterns.md) | | Test failures | RSpec/Jest failures with stack traces | Fix the test or code | | Type errors | Sorbet/TypeScript errors | Fix type annotations | | Lint errors | Rubocop/ESLint failures | Auto-fix or manual fix | | Flaky tests | Passes locally, fails in CI | Investigate timing/isolation; do NOT fix-and-push, surface as flake |
For each category, plan: what to fix, files involved, how to verify locally.
If the failure is flake or infra (CI runner/queue/dependencies), stop. Surface and exit. Don't push fixes for problems we don't understand.
Always verify locally before pushing. Saves CI cycles, catches misfires.
bin/rspec <spec_files>
bin/srb tc <modified_files> # if using Sorbet
lefthook run pre-commit # if using lefthook
pre-commit run --files <modified_files> # if using pre-commit framework
npm test -- <test_files> # or: yarn test <test_files>
npx tsc --noEmit # if using TypeScript
npm run lint
Run whatever the failing CI step ran. Check the failed job's command in the logs.
After local verification passes:
Commit with a message referencing the build:
Fix <failure type> from build #<number>
<brief description of what was wrong and how it was fixed>
Push:
git push
Monitor the new build using the buildkite:investigating-builds skill's "Post-Push Monitoring" workflow.
On completion: pass → summarize and exit. Fail → go to Step 7.
Compare with the previous build:
Iteration cap: 3. After 3 iterations without going green, step back. Don't keep trying. Exit with a summary covering:
Three iterations is a heuristic, not a hard rule — if iterations 1 and 2 made clear progress on different failures and iteration 3 is on the last remaining issue, one more attempt is reasonable. If the same failure persists across all three, stop.
When CI passes (or session ends), summarize:
<branch>Detailed patterns for recurring issues (Gemfile.lock checksum, merge conflicts, year-boundary, test-helper changes) live in references/common-fix-patterns.md.
tools
--- name: writing-for-scannability description: Use when structuring prose so readers can skim it - drafting or restructuring READMEs, docs, PR or issue bodies, design docs, RFCs, or any long-form text where a wall of prose hides the structure. Also use when explicitly asked to make something scannable or skimmable, convert prose to a list, surface a buried list, fix a wall of text, or decide whether bullets or prose fit. Strong signal: text with parallel sentence shapes, contrast markers ("that
development
Ignore actually-lsp nudges for an ecosystem in this project. Use when the user wants to silence, dismiss, or ignore the LSP setup nudges for a specific ecosystem (Rust, TypeScript, Ruby), or invokes `/actually-lsp-ignore` directly. Writes `dismissed=true` to `.claude/actually-lsp.json`. Persistent across sessions for this project only.
tools
Diagnose and fix LSP setup for the current project's detected ecosystems (Rust, TypeScript, Ruby). Use when the SessionStart hook nudged about a missing LSP plugin, when the env isn't ready (no `bundle install`, no `cargo build`, missing server binary), when LSP calls are failing, or when the user invokes `/actually-lsp-doctor` directly. Walks the per-ecosystem state machine, reports what's missing, then runs the fix.
tools
--- name: investigating-runs description: Use whenever the user mentions a GitHub Actions / GHA run, even casually — invoke this skill before reaching for raw `gh` commands, because the bundled `gha-snapshot` helper distills `gh run view --log-failed` (a firehose) into a readable block with per-job status, failed-step log tails, and annotations. Specific triggers (any one is enough): a `github.com/.../actions/runs/...` URL; the phrase "GitHub Actions" or "GHA"; the `gh run` CLI; a failing workfl