en un clic
ci-fix
Diagnose and fix CI failures without leaving your editor.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Diagnose and fix CI failures without leaving your editor.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
ALWAYS use this skill whenever you would otherwise ask the user a question in free-form chat -- for clarifications, confirmations (especially destructive actions), missing parameters, multiple-choice decisions, or structured form input. Elicitations are routed through the Unique AI Platform UI via `unique-cli elicit create` + `elicit wait` (or `elicit ask` outside an agent harness) so the user gets a proper structured prompt and you get a structured answer back. Do NOT ask the user in plain chat when you can use this skill instead.
Read Agentic Table (magic table / due-diligence) sheets through the unique-cli agentic-table command. Use when the user or task involves inspecting an Agentic Table: a sheet's state and metadata, a specific cell's value or lock state, a cell's edit/answer history, or the sheet's generated export artifacts (reports, question exports). These are read-only (Tier 0) commands — they never modify the sheet and never require confirmation. Access to each sheet is enforced by the platform; a denial is reported as `agentic-table: permission denied`.
Call MCP (Model Context Protocol) server tools on the Unique AI Platform using the unique-cli mcp command. Use when the user asks to invoke, call, or execute an MCP tool, or when they need to send a JSON payload to an MCP server through the CLI. The JSON payload is forwarded 1:1 to the platform's MCP call-tool API.
Invoke connected Unique spaces/subagents through the unique-cli subagent command. Use when the workspace exposes connected-space tools and you need to delegate a question or task to one of those configured assistants.
Search the Unique AI Platform knowledge base using the unique-cli search command, with automatic per-turn citation tracking so cited facts render as clickable reference chips and `<sup>N</sup>` footnotes on the Unique platform. Use whenever the user asks to find, search, or query documents or content on Unique, including filtering by folder or metadata. Also covers `unique-cli read <cont_id>` for reading the full indexed text of a document when its content ID is already known. NOTE: This search uses combined vector + full-text indexing. Excel (.xlsx/.xls), CSV (.csv), and image files are NOT full-text indexed, so they will not appear in search results. To locate these file types, use the unique-cli-file-management skill instead (browse folders with `unique-cli ls` to find them by name).
Search the documents uploaded for the CURRENT task/row (e.g. an Agentic Table row's attached files) via the `unique-cli uploaded-search "<query>"` command, with the same per-turn citation tracking as `unique-cli search` so cited facts render as `<sup>N</sup>` footnotes and clickable reference chips on the Unique platform. ALWAYS use this skill when the user refers to documents they uploaded/attached to this task, or when you need facts from the task's own attached files. These uploaded files are scoped to the chat, NOT to a knowledge-base folder, so they will NEVER appear in `unique-cli search` results no matter the folder or metadata filters. Use `unique-cli search` for the knowledge base and this command for the task's uploaded documents; the two are complementary and citation numbering is shared across them within a turn.
| name | ci-fix |
| description | Diagnose and fix CI failures without leaving your editor. |
| license | MIT |
| compatibility | claude cursor opencode |
| metadata | {"version":"1.0.0","languages":"all","audience":"developers","workflow":"automation","since":"2026-02-24"} |
I help you diagnose and fix failing CI runs without switching context to the GitHub Actions UI:
gh run view --log-failed, or target a specific run by IDSupporting files in this skill:
assets/diagnosis-output.template — structured summary rendered at the end of every invocationUse when you want to:
ruff when you want a dedicated, local Python lint/format cleanup flow outside CI triage.uv when dependency/lock operations are the primary task in a uv-managed project.poetry when dependency/lock operations are the primary task in a Poetry-managed project."Fix my failing CI" "Why is CI failing on my branch?" "Diagnose the test failure in CI" "/ci-fix" "/ci-fix 9823456"
Two modes depending on invocation:
Mode A — Auto-detect (no argument given)
Run the following to find the latest failed run on the current branch:
BRANCH=$(git rev-parse --abbrev-ref HEAD)
gh run list --branch "$BRANCH" --status failure --limit 1 --json databaseId,workflowName,conclusion,createdAt
Extract the databaseId from the JSON result, then fetch the failed log output:
gh run view <databaseId> --log-failed
Mode B — Specific run ID (/ci-fix <run-id>)
If a run ID is provided as an argument, skip auto-detection and fetch directly:
gh run view <run-id> --log-failed
If the run ID is invalid or inaccessible, report clearly:
"Run ID
<run-id>could not be fetched. Verify the ID is correct and thatgh auth statusshows an authenticated session."
Fallback — gh unavailable or unauthenticated
If gh is not installed or gh auth status fails:
gh CLI is not available or not authenticated. Run gh auth status to diagnose."Scan the log output for these patterns to identify the failure category:
Lint violations — look for tool name + violation codes:
ruff: lines containing E[0-9]{3}, F[0-9]{3}, W[0-9]{3} codes (e.g., E501 line too long, F401 imported but unused)flake8: same code pattern — note: flake8 is read-only, cannot auto-fix; treat as propose-onlyeslint: lines with error or warning + rule name (e.g., no-unused-vars)Formatting failures — look for "would reformat" or diff output:
black: would reformat <file>ruff format: Would reformat: <file>prettier: diff output from prettier --checkPre-commit hook failures — look for:
hook id: followed by Failed[ERROR] markers or exit code annotationsLock file out of sync — look for these exact log signals:
| Log signal | Package manager |
|---|---|
uv.lock is not up to date | uv |
poetry.lock is not consistent | poetry |
package-lock.json mismatch or npm ci failure mentioning lock file | npm |
yarn.lock out of date | yarn |
Cargo.lock needs to be updated | cargo |
go.sum mismatch or go mod tidy required | go modules |
Test assertion failures — look for test runner output:
pytest: FAILED, AssertionError, lines starting with E assertjest: FAIL, ● Test name, Expected: / Received:cargo test: thread '...' panicked atgo test: --- FAIL:, lines starting with FAIL\tEnvironment / infrastructure — look for:
Secret 'FOO' not found, undefined environment variableconnection refused, timeout, Could not resolve hostRouting:
Apply the fix determined in Step 1 and stage the result. The rule: re-run the tool that reported the failure.
Lint violations (ruff, eslint):
ruff check --fix . # ruff — applies all auto-fixable violations
eslint --fix <file> # eslint — applies auto-fixable rules
Note: flake8 has no --fix flag — route flake8 failures to Step 3 instead.
Formatting (black, ruff format, prettier):
black . # black
ruff format . # ruff format
npx prettier --write . # prettier
Pre-commit:
pre-commit run --all-files
Lock file — use the package manager identified in Step 1:
uv lock # uv
poetry lock --no-update # poetry 1.x (≥1.2) — regenerates without upgrading
# If --no-update is not recognised (poetry 2.x, flag removed):
poetry lock # poetry 2.x — safe by default; existing packages not updated
npm install # npm
yarn install # yarn
cargo update # cargo
go mod tidy # go modules
After the fix runs, stage only the files related to the CI fix:
git status --porcelain
git add <expected-files-from-fix>
Never use git add . in this workflow — it can stage unrelated local work.
Then proceed to Step 4.
For test assertion failures:
Extract from the log:
test_checkout_total, ● Cart › calculates discount)Infer the root cause — what does the assertion tell you about the mismatch? Consider:
Compose a proposed fix:
If multiple tests fail: group related failures (same module or same root cause) and address the primary root cause first.
Populate the diagnosis summary with action: proposed.
Example output:
Test failed: test_checkout_total
Failure: AssertionError: expected 95.0, got 100.0
Root cause: The discount logic in checkout.apply_discount() no longer applies the
5% member discount — likely removed in the recent refactor of the pricing module.
Proposed fix: In src/checkout.py line 42, restore the discount multiplier:
total *= (1 - discount_rate)
This resolves the assertion because the expected value (95.0) assumes 5% is applied.
For environment / infrastructure failures:
Identify the category:
State clearly: "This failure cannot be resolved by a code change."
Suggest the next action — who to contact or what to check (DevOps, repository admin, re-run the job).
Populate the diagnosis summary with action: explained.
Fill and render the diagnosis-output.template:
## CI Diagnosis Summary
**Workflow**: <workflow name>
**Run ID**: <run id>
**Branch**: <branch name>
**Failure type**: <lint | format | pre-commit | lock-file | test | environment>
**Root cause**:
> <quoted excerpt from the CI log that identifies the failure>
**Action**: <fixed-and-staged | proposed | explained>
**What was done / proposed**:
<description of the fix applied or proposed>
**Why this resolves it**:
<rationale — why the fix addresses the root cause, not just what was changed>
**Next step**:
<review staged changes with `git diff --staged` then commit>
— OR —
<apply proposed fix, then push>
— OR —
<contact [person/team] / re-run CI job>
If files were staged automatically, remind: "Run git diff --staged to review the changes before committing."
ruffuvpoetrygit diff --staged before committing any auto-applied fix; confirm only the expected files changedgh auth status first — if gh isn't authenticated, the skill falls back to manual log paste; authenticating once eliminates this frictionruff for auto-fixable lint, or fix violations manuallypackage-lock.json), scan the diff for unexpected major version bumps in transitive dependencies before committinggh is unavailable, copy the failed step output from the GitHub Actions UI and paste it; the diagnosis workflow is identical