ci-fix
/ci-fix
Diagnose and fix failing CI checks by classifying the failure into a known pattern and applying a codified remediation. Use when CI reports MSVC C4996 warnings-as-errors, CMake FetchContent shallow-clone failures, __cpp_lib_format probe mismatches, or when pr-work escalates a failing workflow. Cuts the push-wait-fail-retry loop to a single iteration for the three dominant patterns documented from prior sessions.
- Author
- kcenon ↗
- Repository
- claude-config ↗
- Licence
- BSD-3-Clause
- Last repository change
- 23.10.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.
BSD-3-Clause, otwarta.
What it does and when to use it
Diagnose and fix failing CI checks by classifying the failure into a known pattern and applying a codified remediation. Use when CI reports MSVC C4996 warnings-as-errors, CMake FetchContent shallow-clone failures, __cpp_lib_format probe mismatches, or when pr-work escalates a failing workflow. Cuts the push-wait-fail-retry loop to a single iteration for the three dominant patterns documented from prior sessions.
Arguments
/ci-fix [pr-number] [--pattern msvc-c4996|cmake-fetchcontent|cpp-lib-format] [--dry-run]
Original author description
Diagnose and fix failing CI checks by classifying the failure into a known pattern and applying a codified remediation. Use when CI reports MSVC C4996 warnings-as-errors, CMake FetchContent shallow-clone failures, __cpp_lib_format probe mismatches, or when pr-work escalates a failing workflow. Cuts the push-wait-fail-retry loop to a single iteration for the three dominant patterns documented from prior sessions.
How it works
- Usage
- Arguments
- When to Invoke
- Classification Pipeline
- Escalation
- Time Budget
- References
SKILL.md preview
---
name: ci-fix
description: "Diagnose and fix failing CI checks by classifying the failure into a known pattern and applying a codified remediation. Use when CI reports MSVC C4996 warnings-as-errors, CMake FetchContent shallow-clone failures, __cpp_lib_format probe mismatches, or when pr-work escalates a failing workflow. Cuts the push-wait-fail-retry loop to a single iteration for the three dominant patterns documented from prior sessions."
argument-hint: "[pr-number] [--pattern msvc-c4996|cmake-fetchcontent|cpp-lib-format] [--dry-run]"
user-invocable: true
disable-model-invocation: true
allowed-tools: "Bash(gh *)"
max_iterations: 3
halt_conditions:
- { type: success, expr: "Workflow run conclusion == success" }
- { type: fallback, expr: "failure maps to an unknown error class not in reference/known-fixes.md" }
on_halt: "Escalate to user with failing log excerpt and classification result"
loop_safe: true
iso_class: none
---
# ci-fix Skill
Classify a failing CI run into one of the three recurring patterns captured in `reference/known-fixes.md`
and apply the codified remediation before re-pushing.
## Usage
```
/ci-fix # Auto-detect current branch's failing PR
/ci-fix 601 # Target PR #601
/ci-fix 601 --pattern msvc-c4996 # Skip classification, apply a specific fix
/ci-fix 601 --dry-run # Print the diagnosis and proposed diff only
```
## Arguments
| Argument | Purpose |
|----------|---------|
| `[pr-number]` | PR to diagnose. If omitted, resolve via the current branch's open PR. |
| `--pattern <id>` | Skip classification. Valid ids: `msvc-c4996`, `cmake-fetchcontent`, `cpp-lib-format`. |
| `--dry-run` | Print diagnosis, quote the failing log excerpt, and show the proposed diff. Do not write files or push. |
## When to Invoke
- A PR's CI has **one failing run** matching one of the three patterns.
- `pr-work` has escalated after its built-in retry budget is exhausted.
- The user says "fix CI", "classify this CI failure", or names a pattern explicitly.
Do **not** invoke for:
- Flaky-but-unknown failures (log, ask user, add to `known-fixes.md` if it recurs).
- Green CI (nothing to fix).
## Classification Pipeline
Follow this deterministic sequence. Stop at the first match.
1. **Fetch log excerpt**
```bash
RUN_ID=$(gh run list --branch "$(git branch --show-current)" \
--json databaseId,conclusion --jq '.[] | select(.conclusion=="failure") | .databaseId' | head -1)
gh run view "$RUN_ID" --log-failed | tail -200
```
2. **Match against the classifier table** (`reference/known-fixes.md` § Classifier):
| Signal in log | Pattern |
|---------------|---------|
| `error C4996` OR `warning C4996` under MSVC with `/WX` | `msvc-c4996` |
| `FetchContent` + `fatal: could not read Username` / `object ... not found` / `remote error: upload-pack` on a commit hash | `cmake-fetchcontent` |
| `<format>` include + missing `__cpp_lib_format` OR link error for `std::format` | `cpp-lib-format` |
3. **Apply the codified fix**
- `msvc-c4996` → see `reference/msvc-c4996.md`
- `cmake-fetchcontent` → see `reference/cmake-fetchcontent.md`
- `cpp-lib-format` → see `reference/known-fixes.md` § cpp-lib-format
4. **Commit with conventional format**
```
fix(ci): <pattern-id> — <short reason>
```
5. **Push and monitor**
Reuse the `pr-work` CI monitor loop. Budget: 20 minutes total (4 × 5-minute retries).
## Escalation
This table operationalizes the skill's frontmatter `halt_condition` and `on_halt` fields. Every condition below is a terminal halt state that consumes one of the `max_iterations: 3` budget slots.
| Condition | Action | Halt |
|-----------|--------|------|
| Classifier does not match | Print the first 80 lines of the log; ask the user to either add a new pattern to `known-fixes.md` or hand off. | yes — unknown error class |
| Fix applied but CI still red | Re-classify once. On a second miss, convert the PR to draft and escalate. | yes — after 2nd miss |
| 20-minute budget exceeded | Report current check table; do **not** merge. | yes — time budget |
**Example halt trace**: CI reports `cmake-fetchcontent` → fix applied → CI still fails with `msvc-c4996` → re-classify and apply C4996 fix → CI still fails with a fourth pattern not in `known-fixes.md` → `halt_condition` matches (unknown class) → skill exits per `on_halt` (escalate to user with diagnosis).
## Time Budget
Per invocation: **20 minutes** wall-clock from classification to a green re-run. Break down:
- Classification + diff: ~2 minutes
- Push + workflow dispatch + queue wait: ~3 minutes
- CI run itself: up to 10 minutes for typical matrices
- One retry slot: ~5 minutes
If total elapsed exceeds 20 minutes, stop, report status, and hand off.
## References
- Pattern catalogue and diffs: `reference/known-fixes.md`
- CMake FetchContent macro expansion: `reference/cmake-fetchcontent.md`
- MSVC C4996 migration guidance: `reference/msvc-c4996.md`
- Invoked from: `global/skills/_internal/pr-work/SKILL.md` on failing-CI escalation
Files in this package (4)
- SKILL.md 5 KB
- reference/cmake-fetchcontent.md 4 KB
- reference/known-fixes.md 7 KB
- reference/msvc-c4996.md 4 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · kcenon/claude-config | 100 | BSD-3-Clause |
| gosuda/dalcom-skills | 100 | Apache-2.0 |
| grixu/cc-toolkit | 100 | MIT |
| fastled/fastled | 100 | MIT |
| OutlineDriven/outline-driven-development | 100 | Apache-2.0 |
| sean-sunagaku/claude-code-plugin | 100 | MIT |
| dotnet/maui | 90 | MIT |
| jMerta/codex-skills | 90 | MIT |
Database snapshot: 13.11.2026 · package version fa905489013a (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100cmake
Use when writing CMakeLists.txt, out-of-source builds, target_link_libraries, target properties, find_package/FetchContent, toolchain files, CPack, CMake presets, or cmake configure errors. - 90cmake-guide
Use when editing CMake build files for C/C++ projects on CMake 3.20+. Triggers on `CMakeLists.txt`, `*.cmake` files and on prompts about adding targets, linking libraries, dependency fetching, test setup, install rules, or PUBLIC/PRIVATE/INTERFACE visibility, even when the user… - 100fix-failing-actions
Diagnose and fix failing GitHub Actions workflows in the drift repository. Use when a CI run, security hygiene check, release workflow, or any other GitHub Actions job is red. Keywords: GitHub Actions, workflow failure, CI failure, failed run, failing check, red CI, workflow… - 95cmake
CMake build system for C/C++ projects. Modern CMake (3.20+) with targets, properties, presets (CMakePresets.json), FetchContent, find_package, generator expressions, install rules, vcpkg/Conan integration. USE WHEN: user mentions "CMake", "CMakeLists.txt", "CMakePresets",… - 95pr-work
Analyze and fix failed CI/CD workflows for a pull request. Use when CI checks fail, GitHub Actions show red, build/test/lint errors block a PR, or the user says 'fix CI', 'fix the build', 'PR is failing', or 'check failed'. Supports solo, team, and batch modes with automated retry and escalation. - 98msvc-build
Use when compiling MSVC C++ projects, debugging build errors, or performing clean and incremental builds