luanzeba/dotfiles/github-ci-fixer

Claude Code and agent skill by luanzeba/dotfiles

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Diagnose and fix CI failures on GitHub PRs using the gh CLI. Use when CI checks fail, tests are failing in CI, builds break, linting errors occur, or when asked to investigate PR status. Handles workflow runs, job logs, reproducing failures locally, and making fixes.

Install

npx vskill@latest install luanzeba/dotfiles/github-ci-fixer

SKILL.md

The same SKILL.md was published earlier as luanzeba/dotfiles/github-ci-fixer.

GitHub CI Fixer

Fix CI failures by: fetching status → reading logs → reproducing locally → diagnosing → fixing.

Workflow

Step 1: Get PR CI Status
bash
# Get PR checks status
gh pr checks <PR_NUMBER> --repo github/github
# Get detailed workflow runs for PR
gh run list --branch <BRANCH_NAME> --repo github/github --limit 5
# View specific run details
gh run view <RUN_ID> --repo github/github
Step 2: Get Failure Logs
bash
# View failed job logs
gh run view <RUN_ID> --repo github/github --log-failed
# Get specific job logs (if multiple jobs)
gh run view <RUN_ID> --repo github/github --job <JOB_ID> --log
Step 3: Identify Failure Type
Log PatternFailure TypeNext Step
Failure: or Error: in test outputTest failureStep 4a
rubocop or Style/Linting errorStep 4b
srb tc or T.let errorsSorbet type errorStep 4c
LoadError or NameErrorMissing require/dependencyCheck imports
TimeoutSlow test or infinite loopCheck test setup
Step 4a: Reproduce Test Failures Locally

First, identify the CI environment from the failed job name or logs. Look for GH_CI_RUNTIME in the logs — it shows the build pipeline name (e.g., github-all-features, github-enterprise).

bash
# Run specific test file
bin/rails test <path/to/test_file.rb>
# Run specific test by line number (NEVER use -n flag)
bin/rails test <path/to/test_file.rb>:<LINE_NUMBER>
# Run tests for changed files
bin/rails test:changes
Running in Specific Environments

Match the CI environment when reproducing failures locally:

bash
# Run in Enterprise mode (for github-enterprise builds)
ENTERPRISE=1 bin/rails test <path/to/test_file.rb>
# Run in multi-tenancy/EMU mode (for multi-tenant builds)
MULTI_TENANT_ENTERPRISE=1 bin/rails test <path/to/test_file.rb>
# Run with all features enabled (for github-all-features builds)
TEST_ALL_FEATURES=1 bin/rails test <path/to/test_file.rb>
# Run with all EMU configurations
TEST_WITH_ALL_EMUS=1 bin/rails test <path/to/test_file.rb>
Environment Variable Reference
CI Job PatternEnvironment VariableDescription
github-enterprise*ENTERPRISE=1Enterprise mode
*multi-tenant*MULTI_TENANT_ENTERPRISE=1Multi-tenancy/EMU mode
github-all-features*TEST_ALL_FEATURES=1All features enabled
*emu*TEST_WITH_ALL_EMUS=1All EMU configurations

For additional environment variables, see test/test_helpers/test_env.rb.

Step 4b: Fix Linting Errors
bash
# Auto-fix rubocop issues
bin/rubocop --autocorrect <file.rb>
# Check ERB linting
bin/erb_lint <file.erb> --autocorrect
Step 4c: Fix Type Errors
bash
# Check specific file
bin/srb tc <file.rb>
# Regenerate RBIs if needed
bin/tapioca dsl
Step 5: Diagnose and Fix

For test failures:

  1. Read the failing test to understand expected behavior
  2. Read the source code being tested
  3. Determine if test or source is wrong
  4. NEVER delete a test just because it fails — fix the code or update the test appropriately

For flaky tests:

  1. Look for timing issues, race conditions, or state leakage
  2. Check for missing setup/teardown cleanup
  3. Use gauntlet to reproduce flakiness by running the test many times with database shuffling:
ruby
# In your test file - wrap the flaky test with gauntlet
# This creates 100 copies of the test with shuffled DB results
gauntlet "my potentially flaky test", loops: 100 do
# your test code here
end

Gauntlet options:

  • loops: — number of times to run (default: 100)
  • timeshift: — seconds to shift time between each loop (default: nil)
  • shuffle_database_results: — randomize DB query order to surface flakiness (default: true)
  • debug_output: — print DatabaseShuffler debug info (default: false)

Note: Remove gauntlet wrappers before merging — they're for local debugging only.

Step 6: Verify Fix
bash
# Run the specific failing tests
bin/rails test <test_file.rb>
# Run linting
bin/rubocop <changed_files>
# Run type checking
bin/srb tc <changed_files>

Common CI Jobs

Job NameWhat It Checks
test-*Unit/integration tests
rubocopRuby style/linting
sorbetType checking
erb_lintERB template linting
packwerkPackage boundary violations

Critical Rules

  1. Never remove tests that fail — propose removal with clear justification for approval
  2. Always reproduce locally before attempting fixes
  3. Run the exact failing test to confirm the fix works
  4. Check if failure is flaky — may need multiple runs to reproduce

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/luanzeba/dotfiles/github-ci-fixer/badge)](https://verified-skill.com/skills/luanzeba/dotfiles/github-ci-fixer)

Something wrong with this skill or its page? Tell us.