agentleFS
orbit-collectiveorbit-collective/orbit-skills/skills/fix-ci/SKILL.md

fix-ci

Skill1 starsChanged 42 days agoMITView on GitHub

Diagnose and fix a failing Orbit CI run (type check, lint, Vitest with coverage, build, Pest with coverage) by reading the real logs, reproducing the failing job locally in Docker, and fixing the root cause. Use for /fix-ci and whenever the user says CI, a check, or a GitHub Actions job is red.

39 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use get-pr-comments, merge and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • jaydubya818Skill

    get-pr-comments

    Use when pull-request feedback needs to be fetched and summarized for action.

    Also in 3 projects that use this

  • MicrosoftSkill

    merge

    Merge changes from the topic branch to the merge base branch. Use when the user wants to merge their session's work back to the base branch.

    Also in 3 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 4 projects that use this

  • NVIDIASkill

    testing

    Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 3 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 4 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 37 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not use make lint (it runs ESLint with --fix and hides failures) or make build (it builds Docker images, not the Vite bundle) to …

    line 20
  2. Very specific:

    Do not edit .github/workflows/* to make a failure disappear.

    line 25
  3. Very specific:

    Do not re-run CI or push commits unless the user asked.

    line 26
  4. Distinctive:

    Prefer the actual logs over guessing:

    line 31
  5. Very specific:

    If gh is unavailable or has no access, ask the user to paste the failing job's log, or reproduce all five jobs locally (Step 2) and see …

    line 40
  6. Very specific:

    Make sure the stack is up (make up-d).

    line 46
  7. Distinctive:

    Run only the failing job's command from the table above.

    line 47
  8. Distinctive:

    If it passes locally but fails in CI, look for environment differences before touching code (see "Common causes").

    line 48
  9. Very specific:

    PHP tests: Read the failing assertion.

    line 58
  10. Very specific:

    Pre-existing failure on master: Check whether the same job fails on the latest master run (gh run list --branch master -L 3).

    line 61
  11. Distinctive:

    Run the other four jobs too, because fixes often move the failure (a new test can drop branch coverage elsewhere, a type fix can break the …

    line 69

“Common” is measured: kept by at least 6 in 10 of the 37 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fix CI

Find out why Orbit's CI failed, reproduce it locally, and fix the cause without weakening the checks.

CI is .github/workflows/ci.yml. It runs five jobs and a ci-status job that requires all of them:

CI jobLocal reproduction (Docker)Host fallback
Type checkmake type-checknpx tsc --noEmit
Lintdocker compose run --rm vite npx eslint resources/jsnpx eslint resources/js
Component tests (Vitest)make test-js-coveragenpm run test:coverage
Build verificationdocker compose run --rm vite npm run buildnpm run build
PHP tests (Pest)make test-coveragecomposer test-coverage

Do not use make lint (it runs ESLint with --fix and hides failures) or make build (it builds Docker images, not the Vite bundle) to reproduce CI.

Boundaries

  • Fix the cause, never the signal. Do not lower coverage thresholds in vite.config.js or --min in composer.json, disable lint rules, add @ts-ignore, mark tests skipped, or loosen assertions to get green. If the user explicitly wants a temporary bypass, make it visible and say so.
  • Do not edit .github/workflows/* to make a failure disappear. Change a workflow only when the workflow itself is the bug (e.g. a removed action version), and explain why.
  • Do not re-run CI or push commits unless the user asked. To commit the fix, use the commit skill.
  • Preserve the user's uncommitted changes.

Step 1: read the real failure

Prefer the actual logs over guessing:

gh pr checks <pr>                       # which jobs failed on a PR
gh run list --branch "$(git branch --show-current)" -L 5
gh run view <run-id>                    # job summary
gh run view <run-id> --log-failed       # only the failing steps' output

If gh is unavailable or has no access, ask the user to paste the failing job's log, or reproduce all five jobs locally (Step 2) and see which one fails.

Identify the failing job, the failing step, and the first real error (not the cascade after it). Note the commit SHA the run used and compare it with local HEAD (git rev-parse HEAD). If they differ, make sure you reproduce the same code.

Step 2: reproduce locally

  1. Make sure the stack is up (make up-d). If package.json, package-lock.json, composer.json, or composer.lock changed on the branch, run make npm-install / make composer-install first: node_modules and vendor are anonymous volumes and are otherwise stale.
  2. Run only the failing job's command from the table above. Use the host fallback only if Docker is unavailable, and say so.
  3. If it passes locally but fails in CI, look for environment differences before touching code (see "Common causes").

Step 3: classify and fix

Common causes in this repository, roughly by frequency:

  • Coverage gate. All tests pass but coverage is below the threshold (90% lines on app/ for PHP; 80% statements/functions/lines and 75% branches for Vitest). Find the uncovered new code in the coverage report (coverage-html/ for PHP, the Vitest text summary or coverage/) and add behavior tests for it. Do not add tests that only execute lines without asserting anything.
  • Lint. CI runs bare npx eslint resources/js. Locally npm run lint auto-fixes, so failures can slip through. Fix the reported rules properly; run the bare command to confirm.
  • Type check. Often a changed Inertia prop or a type in resources/js/types/ that a page or test still uses the old way. Fix the types at the source, not with casts.
  • Build. tsc && vite build: type errors, or imports with wrong case (Linux CI is case-sensitive, a Windows or macOS host may not be), or missing assets.
  • PHP tests. Read the failing assertion. Typical sources: missing authorize/Policy changes, factories not updated for a new required column, migrations that do not run on SQLite, order-dependent assertions, time-dependent tests (use $this->travelTo()/Carbon::setTestNow()), or tests that hit real HTTP (use Http::fake()).
  • Dependency drift. CI runs npm ci --legacy-peer-deps and composer install from the lockfiles. A lockfile out of sync with its manifest, or a package installed locally but never committed, passes locally and fails in CI.
  • Flaky test. Passes on re-run without code changes. Confirm by running it several times locally (npx vitest run <file> repeatedly, php artisan test --filter=<Test> --repeat=5 if available). Fix the cause (shared state, timers, unawaited promises, random data, ordering) rather than retrying. If you cannot find it, report it as flaky with evidence instead of claiming a fix.
  • Pre-existing failure on master. Check whether the same job fails on the latest master run (gh run list --branch master -L 3). If it does, tell the user it is not caused by this branch and ask whether to fix it here or separately.
  • Local-only memory error. make test-coverage can die with Allowed memory size ... exhausted in the coverage report writer after all tests passed. That is local, not a CI failure. Run docker compose run --rm app php -d memory_limit=3G vendor/bin/pest --coverage --min=90 instead.

Apply the smallest fix in the right place, following CLAUDE.md layering and conventions.

Step 4: verify

  1. Re-run the failing job's command until it passes.
  2. Run the other four jobs too, because fixes often move the failure (a new test can drop branch coverage elsewhere, a type fix can break the build).
  3. Review the diff: every change must relate to the failure.

Final report

State the failing job and the root cause in one or two sentences, the fix and the files changed, the local commands you ran with results (and whether Docker or the host was used), and anything that could still differ in CI. If the cause suggests a gap that will recur (for example a check that only exists in CI), propose a prevention step, such as running the bare lint command in a pre-push hook.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.