@olegkoval/agent-skills 1.22.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.claude-plugin/plugin.json +4 -2
  2. package/.cursor-plugin/index.json +10 -0
  3. package/.grok-plugin/index.json +10 -0
  4. package/.kiro/steering/garmin-watchface.md +7 -0
  5. package/.windsurf/rules/garmin-watchface.md +7 -0
  6. package/README.md +3 -1
  7. package/catalog/skills.json +44 -0
  8. package/package.json +1 -1
  9. package/packages/software-development/ci-fix-loop/SKILL.md +202 -0
  10. package/packages/software-development/ci-fix-loop/adapters/claude/plugin.json +5 -0
  11. package/packages/software-development/ci-fix-loop/adapters/claude/skills/ci-fix-loop/SKILL.md +203 -0
  12. package/packages/software-development/ci-fix-loop/adapters/codex/README.md +20 -0
  13. package/packages/software-development/ci-fix-loop/adapters/cursor/plugin.json +6 -0
  14. package/packages/software-development/ci-fix-loop/adapters/cursor/skills/ci-fix-loop/SKILL.md +203 -0
  15. package/packages/software-development/ci-fix-loop/adapters/grok/plugin.json +6 -0
  16. package/packages/software-development/ci-fix-loop/adapters/grok/skills/ci-fix-loop/SKILL.md +203 -0
  17. package/packages/software-development/pr-description-writer/SKILL.md +152 -0
  18. package/packages/software-development/pr-description-writer/adapters/claude/plugin.json +5 -0
  19. package/packages/software-development/pr-description-writer/adapters/claude/skills/pr-description-writer/SKILL.md +153 -0
  20. package/packages/software-development/pr-description-writer/adapters/codex/README.md +19 -0
  21. package/packages/software-development/pr-description-writer/adapters/cursor/plugin.json +6 -0
  22. package/packages/software-development/pr-description-writer/adapters/cursor/skills/pr-description-writer/SKILL.md +153 -0
  23. package/packages/software-development/pr-description-writer/adapters/grok/plugin.json +6 -0
  24. package/packages/software-development/pr-description-writer/adapters/grok/skills/pr-description-writer/SKILL.md +153 -0
  25. package/packages/wearables/garmin-watchface/SKILL.md +7 -0
  26. package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/SKILL.md +7 -0
  27. package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/publishing.md +145 -0
  28. package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/scripts/ciq-release +333 -0
  29. package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/SKILL.md +7 -0
  30. package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/publishing.md +145 -0
  31. package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/scripts/ciq-release +333 -0
  32. package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/SKILL.md +7 -0
  33. package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/publishing.md +145 -0
  34. package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/scripts/ciq-release +333 -0
  35. package/packages/wearables/garmin-watchface/adapters/kiro/steering/garmin-watchface.md +7 -0
  36. package/packages/wearables/garmin-watchface/adapters/windsurf/rules/garmin-watchface.md +7 -0
  37. package/packages/wearables/garmin-watchface/references/publishing.md +145 -0
  38. package/packages/wearables/garmin-watchface/scripts/ciq-release +333 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "olko-agent-skills",
3
3
  "description": "Agent-agnostic skill catalog for Codex, Claude, Cursor, Grok, Copilot, Windsurf, Kiro, and other skill-aware tools.",
4
- "version": "1.21.1",
4
+ "version": "1.23.0",
5
5
  "author": {
6
6
  "name": "Oleg Koval"
7
7
  },
@@ -38,6 +38,8 @@
38
38
  "./packages/software-development/add-to-my-skills",
39
39
  "./packages/software-development/ai-tools-setup",
40
40
  "./packages/software-development/changelog-generator",
41
- "./packages/software-development/wikipedia-uk-editor"
41
+ "./packages/software-development/wikipedia-uk-editor",
42
+ "./packages/software-development/pr-description-writer",
43
+ "./packages/software-development/ci-fix-loop"
42
44
  ]
43
45
  }
@@ -140,6 +140,16 @@
140
140
  "name": "olko:wikipedia-uk-editor",
141
141
  "source": "./packages/software-development/wikipedia-uk-editor/adapters/cursor",
142
142
  "description": "Draft policy-compliant Ukrainian Wikipedia edits — translate an English article into uk, expand or source an existing uk article, or fix a maintenance backlog item — and return ready-to-paste wikitext plus an edit summary."
143
+ },
144
+ {
145
+ "name": "olko:pr-description-writer",
146
+ "source": "./packages/software-development/pr-description-writer/adapters/cursor",
147
+ "description": "Draft and post a GitHub PR title and body from git diff and commit history. Chains after git-commit and before qodoloop / coderabbitloop."
148
+ },
149
+ {
150
+ "name": "olko:ci-fix-loop",
151
+ "source": "./packages/software-development/ci-fix-loop/adapters/cursor",
152
+ "description": "Diagnose GitHub Actions CI failures in a loop: fetch failing check logs, fix, push, and repeat until green. Direct analog of qodoloop / coderabbitloop for test and lint failures."
143
153
  }
144
154
  ]
145
155
  }
@@ -150,6 +150,16 @@
150
150
  "name": "olko:wikipedia-uk-editor",
151
151
  "source": "./packages/software-development/wikipedia-uk-editor/adapters/grok",
152
152
  "description": "Draft policy-compliant Ukrainian Wikipedia edits — translate an English article into uk, expand or source an existing uk article, or fix a maintenance backlog item — and return ready-to-paste wikitext plus an edit summary."
153
+ },
154
+ {
155
+ "name": "olko:pr-description-writer",
156
+ "source": "./packages/software-development/pr-description-writer/adapters/grok",
157
+ "description": "Draft and post a GitHub PR title and body from git diff and commit history. Chains after git-commit and before qodoloop / coderabbitloop."
158
+ },
159
+ {
160
+ "name": "olko:ci-fix-loop",
161
+ "source": "./packages/software-development/ci-fix-loop/adapters/grok",
162
+ "description": "Diagnose GitHub Actions CI failures in a loop: fetch failing check logs, fix, push, and repeat until green. Direct analog of qodoloop / coderabbitloop for test and lint failures."
153
163
  }
154
164
  ]
155
165
  }
@@ -22,6 +22,7 @@ looked like success first.
22
22
  | `references/simulator.md` | Screenshots, settings not applying, monkeydo hanging |
23
23
  | `references/devices.md` | Adding device support, launcher icons, API levels |
24
24
  | `references/store.md` | Publishing, listing copy, IP questions |
25
+ | `references/publishing.md` | Driving the store portal in a browser; upload/update flow, validator rejections |
25
26
 
26
27
  ## Tools
27
28
 
@@ -34,8 +35,14 @@ Run these rather than reinventing them. All are standalone.
34
35
  <skill-dir>/scripts/ciq-capture out.png # calibrated simulator screenshot
35
36
  <skill-dir>/scripts/ciq-capture out.png --face --size 260 # cropped + masked to the round display
36
37
  <skill-dir>/scripts/ciq-calibrate # re-derive the display rect if capture looks wrong
38
+ <skill-dir>/scripts/ciq-release # pre-submission check: package, screenshots, icon, keys, copy
37
39
  ```
38
40
 
41
+ `<skill-dir>/scripts/ciq-release` is what you run before opening the store
42
+ portal. Every check in it is something otherwise discovered halfway through the
43
+ submission form -- a stale screenshot set, an icon still copied from the last
44
+ project, or copy containing a character the description validator rejects.
45
+
39
46
  `<skill-dir>/scripts/ciq-capture` exists because `screencapture -R` grabs a screen *region*, not
40
47
  a window: without a frontmost check it silently photographs whatever is on top,
41
48
  and the window moves between simulator restarts. Both failure modes produce a
@@ -21,6 +21,7 @@ looked like success first.
21
21
  | `references/simulator.md` | Screenshots, settings not applying, monkeydo hanging |
22
22
  | `references/devices.md` | Adding device support, launcher icons, API levels |
23
23
  | `references/store.md` | Publishing, listing copy, IP questions |
24
+ | `references/publishing.md` | Driving the store portal in a browser; upload/update flow, validator rejections |
24
25
 
25
26
  ## Tools
26
27
 
@@ -33,8 +34,14 @@ Run these rather than reinventing them. All are standalone.
33
34
  <skill-dir>/scripts/ciq-capture out.png # calibrated simulator screenshot
34
35
  <skill-dir>/scripts/ciq-capture out.png --face --size 260 # cropped + masked to the round display
35
36
  <skill-dir>/scripts/ciq-calibrate # re-derive the display rect if capture looks wrong
37
+ <skill-dir>/scripts/ciq-release # pre-submission check: package, screenshots, icon, keys, copy
36
38
  ```
37
39
 
40
+ `<skill-dir>/scripts/ciq-release` is what you run before opening the store
41
+ portal. Every check in it is something otherwise discovered halfway through the
42
+ submission form -- a stale screenshot set, an icon still copied from the last
43
+ project, or copy containing a character the description validator rejects.
44
+
38
45
  `<skill-dir>/scripts/ciq-capture` exists because `screencapture -R` grabs a screen *region*, not
39
46
  a window: without a frontmost check it silently photographs whatever is on top,
40
47
  and the window moves between simulator restarts. Both failure modes produce a
package/README.md CHANGED
@@ -140,7 +140,7 @@ packages/{category}/{skill}/SKILL.md
140
140
 
141
141
  Each entry links to its `SKILL.md`. Reference any skill by its `olko:*` lookup name in a new agent session.
142
142
 
143
- ### Software development (25)
143
+ ### Software development (27)
144
144
 
145
145
  | Skill | What it does | Use when |
146
146
  |-------|-------------|----------|
@@ -148,6 +148,7 @@ Each entry links to its `SKILL.md`. Reference any skill by its `olko:*` lookup n
148
148
  | [ai-tools-setup](packages/software-development/ai-tools-setup/SKILL.md) | Sets up, repairs, and reports on the RTK + ICM + Vox AI development toolkit — installs missing tools, fixes broken hooks and MCP config | Bootstrapping AI dev tools on a new machine or diagnosing broken integrations |
149
149
  | [apple-store-submit](packages/software-development/apple-store-submit/SKILL.md) | Handles App Store rejection emails end-to-end — parses rejection reasons, creates a fix plan, implements code changes, and prepares resubmission | Responding to App Store rejections for privacy strings, entitlements, or guideline violations |
150
150
  | [changelog-generator](packages/software-development/changelog-generator/SKILL.md) | Transforms git commits into polished user-facing changelogs by categorising changes and rewriting technical commit messages | Preparing release notes, app store update descriptions, or a public changelog |
151
+ | [ci-fix-loop](packages/software-development/ci-fix-loop/SKILL.md) | Diagnoses GitHub Actions CI failures in a loop: fetches failing check logs, applies a targeted fix, pushes, and waits for the next run — repeating until green or a blocker needs a human | CI is red after a push and you want it driven to green automatically |
151
152
  | [cloudflare-block-countries](packages/software-development/cloudflare-block-countries/SKILL.md) | Blocks specific countries via Cloudflare WAF Custom Rules using the API | Geo-blocking traffic or setting up WAF country rules across single or multiple zones |
152
153
  | [coderabbitloop](packages/software-development/coderabbitloop/SKILL.md) | Iteratively drives a GitHub PR to zero unresolved CodeRabbit findings, reading each inline comment's own Prompt for AI Agents block, replying to the thread, and resolving it | Fully addressing a PR against CodeRabbit's review before merging |
153
154
  | [crash-course](packages/software-development/crash-course/SKILL.md) | Expert tutor for rapid, source-grounded learning of any topic: a timed 4-hour sprint plus cheat-sheet, learning-ladder, quiz-me, Feynman, and resource-curation modes | Ramping up on an unfamiliar codebase, project, or concept under time pressure |
@@ -160,6 +161,7 @@ Each entry links to its `SKILL.md`. Reference any skill by its `olko:*` lookup n
160
161
  | [obsidian-task-rollover](packages/software-development/obsidian-task-rollover/SKILL.md) | Migrates unchecked tasks from today's Obsidian daily note to the next workday under `## Carried over` | End-of-day bullet-journal task migration |
161
162
  | [open-source-publisher](packages/software-development/open-source-publisher/SKILL.md) | Prepares an open-source repository for public publishing with branding, CI/CD, and release hygiene | Releasing a private project publicly with proper GitHub Pages, README, and social preview |
162
163
  | [product-builder](packages/software-development/product-builder/SKILL.md) | Builds a full-stack web app or SaaS product from a user description using production-oriented defaults | Building a complete app, SaaS, dashboard, or product rather than a prototype |
164
+ | [pr-description-writer](packages/software-development/pr-description-writer/SKILL.md) | Drafts and posts a GitHub PR title and body from git diff and commit history, respecting existing PR templates | Opening a PR after pushing a branch or wanting a structured PR description written automatically |
163
165
  | [promptctl](packages/software-development/promptctl/SKILL.md) | Uses `promptctl` for reusable prompt templates, scoring, and workflow automation | A project needs prompt conventions, review, scoring, or reusable prompt workflows |
164
166
  | [qodoloop](packages/software-development/qodoloop/SKILL.md) | Iteratively drives a GitHub PR to zero unresolved Qodo findings, reading each finding's own Agent Prompt, replying to the thread, and resolving it | Fully addressing a PR against Qodo's code review before merging |
165
167
  | [relay](packages/software-development/relay/SKILL.md) | Uses `claude-relay` to run long or rate-limit-prone tasks autonomously across subscription accounts | A task will outlive one session or hit rate limits partway through |
@@ -698,6 +698,50 @@
698
698
  "hermes",
699
699
  "pi"
700
700
  ]
701
+ },
702
+ {
703
+ "name": "pr-description-writer",
704
+ "lookupName": "olko:pr-description-writer",
705
+ "category": "software-development",
706
+ "path": "packages/software-development/pr-description-writer",
707
+ "description": "Draft and post a GitHub PR title and body from git diff and commit history. Chains after git-commit and before qodoloop / coderabbitloop.",
708
+ "tags": [
709
+ "git",
710
+ "github",
711
+ "pull-request",
712
+ "description",
713
+ "pr",
714
+ "workflow"
715
+ ],
716
+ "adapters": [
717
+ "codex",
718
+ "claude",
719
+ "cursor",
720
+ "copilot",
721
+ "grok"
722
+ ]
723
+ },
724
+ {
725
+ "name": "ci-fix-loop",
726
+ "lookupName": "olko:ci-fix-loop",
727
+ "category": "software-development",
728
+ "path": "packages/software-development/ci-fix-loop",
729
+ "description": "Diagnose GitHub Actions CI failures in a loop: fetch failing check logs, fix, push, and repeat until green. Direct analog of qodoloop / coderabbitloop for test and lint failures.",
730
+ "tags": [
731
+ "github-actions",
732
+ "ci",
733
+ "testing",
734
+ "automation",
735
+ "loop",
736
+ "fix"
737
+ ],
738
+ "adapters": [
739
+ "codex",
740
+ "claude",
741
+ "cursor",
742
+ "copilot",
743
+ "grok"
744
+ ]
701
745
  }
702
746
  ]
703
747
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olegkoval/agent-skills",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: ci-fix-loop
3
+ description: >
4
+ Diagnose GitHub Actions CI failures in a loop: fetch the failing check logs, identify
5
+ the root cause, apply a targeted fix, push, and wait for the next run — repeating until
6
+ all checks are green or a real blocker needs a human. Use when CI is red after a push,
7
+ when the user says "fix CI", "make tests pass", "diagnose CI failures", or "drive this
8
+ to green". Direct analog of qodoloop / coderabbitloop for automated test and lint failures.
9
+ license: MIT
10
+ allowed-tools: Bash, Read, Write, Edit
11
+ compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires git and gh (GitHub CLI) authenticated, with a GitHub Actions workflow configured.
12
+ metadata:
13
+ targets: [_source-only]
14
+ author: Oleg Koval
15
+ tags:
16
+ - github-actions
17
+ - ci
18
+ - testing
19
+ - automation
20
+ - loop
21
+ - fix
22
+ source: weekly-pattern-learner
23
+ source_reason: "qodoloop and coderabbitloop share the push→poll→diagnose→fix→repeat loop; CI failures have the same shape but no dedicated skill existed"
24
+ source_date: "2026-07-28"
25
+ ---
26
+
27
+ > 🤖 *Auto-generated by **weekly-pattern-learner** · qodoloop and coderabbitloop share the push→poll→diagnose→fix→repeat loop; CI failures have the same shape but no dedicated skill existed*
28
+
29
+ # CI Fix Loop
30
+
31
+ Drive a GitHub Actions CI run from red to green: fetch failure logs, diagnose, apply
32
+ a targeted fix, push, and repeat until all required checks pass or a blocker is hit.
33
+
34
+ ## Inputs
35
+
36
+ - **PR number** (optional): detect from current branch if not given.
37
+ - **Check names** (optional): limit to specific failing checks instead of all.
38
+ - **Max iterations** (default: 5)
39
+
40
+ ## Workflow
41
+
42
+ ### 1. Identify the PR and current CI state
43
+
44
+ ```bash
45
+ # Detect PR from current branch
46
+ gh pr view --json number,headRefName,headRefOid \
47
+ -q '{number, branch: .headRefName, sha: .headRefOid}'
48
+
49
+ # Current check status
50
+ gh pr checks --json name,state,conclusion 2>/dev/null \
51
+ || gh run list --branch <branch> --limit 5
52
+ ```
53
+
54
+ Classify each check as: `pass`, `fail`, `pending`, or `skipped`.
55
+
56
+ **Exit immediately if all required checks already pass** — nothing to do.
57
+
58
+ ### 2. Loop (max 5 iterations)
59
+
60
+ #### A. Identify failing checks
61
+
62
+ ```bash
63
+ gh pr checks --json name,state,conclusion \
64
+ --jq '.[] | select(.conclusion == "failure" or .state == "FAILURE")'
65
+ ```
66
+
67
+ For each failing check, record: check name, workflow file, job name.
68
+
69
+ Stop if the working set is empty — all required checks are green.
70
+
71
+ #### B. Check for base-branch regression first
72
+
73
+ Before touching any code, verify the failure is not already present on `main`:
74
+
75
+ ```bash
76
+ gh run list --branch <base-branch> --workflow <workflow-name> --limit 3 \
77
+ --json conclusion --jq '.[].conclusion'
78
+ ```
79
+
80
+ If the same check is failing on the base branch, **stop and report** —
81
+ this is not your PR's fault. Do not attempt a fix that masks a base-branch problem.
82
+ Wait for a `Base branch recovered` notice before re-trying.
83
+
84
+ #### C. Fetch failure logs
85
+
86
+ For each failing check:
87
+
88
+ ```bash
89
+ # Latest run ID for this branch/workflow
90
+ gh run list --branch <branch> --workflow <workflow-name> --limit 1 \
91
+ --json databaseId --jq '.[0].databaseId'
92
+
93
+ # Fetch only failing steps (not the full log)
94
+ gh run view <run-id> --log-failed
95
+ ```
96
+
97
+ Cap log reading at ~200 lines per job — the error is almost always in the last
98
+ 50 lines of a failed step.
99
+
100
+ #### D. Diagnose
101
+
102
+ Classify the failure before writing any code:
103
+
104
+ | Category | Examples | Fix target |
105
+ |---|---|---|
106
+ | Test failure | `FAIL TestFoo`, `AssertionError`, `expected X got Y` | Source or test |
107
+ | Lint / format | `gofmt`, `eslint`, `ruff`, `prettier` | Run auto-formatter |
108
+ | Build error | compile error, missing import, type mismatch | Source |
109
+ | Dependency | `npm ERR!`, missing module, lockfile mismatch | Update lockfile |
110
+ | CI config | YAML parse error, bad action ref, missing secret | Workflow YAML |
111
+ | Flaky test | same test passes on manual re-run | Re-run first; mark if it keeps failing |
112
+
113
+ For flaky-looking failures, re-run the check before touching code:
114
+
115
+ ```bash
116
+ gh run rerun <run-id> --failed
117
+ ```
118
+
119
+ Wait for the rerun result. If it passes on rerun, skip this iteration and go to
120
+ step F to poll for the new result.
121
+
122
+ #### E. Apply a targeted fix
123
+
124
+ Fix **only** what the log names as the failure. Do not refactor surrounding code,
125
+ add unrelated tests, or touch files the failing step never mentioned.
126
+
127
+ Common one-liners:
128
+
129
+ ```bash
130
+ # Go format
131
+ gofmt -w .
132
+ goimports -w .
133
+
134
+ # Node format / lint
135
+ npx prettier --write .
136
+ npx eslint --fix .
137
+
138
+ # Python
139
+ ruff check --fix .
140
+ black .
141
+
142
+ # Lockfile
143
+ npm install # Node
144
+ poetry lock --no-update # Python
145
+ go mod tidy # Go
146
+ ```
147
+
148
+ For test failures: read the failing test and the code it exercises. Fix the code
149
+ or the assertion — but not both in one commit unless the test was clearly wrong
150
+ and the fix is trivial.
151
+
152
+ #### F. Commit and push
153
+
154
+ Stage **only the files touched in step E** — never `git add -A`, which can sweep
155
+ in unrelated local changes:
156
+
157
+ ```bash
158
+ git add <files touched>
159
+ git commit -m "fix(ci): <what was broken> (ci-fix-loop iteration N)"
160
+ git push
161
+ ```
162
+
163
+ Confirm the push succeeded before polling. A resolved check whose fix never reached
164
+ the branch is worse than an unresolved one.
165
+
166
+ #### G. Wait for CI on the new SHA
167
+
168
+ Poll every ~15s (timeout ~8min) for all previously-failing checks to complete
169
+ on the new push:
170
+
171
+ ```bash
172
+ gh pr checks --json name,state,conclusion,startedAt
173
+ ```
174
+
175
+ Wait until all previously-failing checks show a new result (`pass` or `fail`)
176
+ on the current SHA. Do not act on a result that still shows the old SHA.
177
+
178
+ Go back to step A.
179
+
180
+ ### 3. Report
181
+
182
+ | Field | Value |
183
+ |---|---|
184
+ | Iterations | N |
185
+ | Checks fixed | names + root cause |
186
+ | Checks blocked | names + reason (flaky / needs human / base-branch red) |
187
+ | Final status | all green / partial / blocked |
188
+
189
+ ```
190
+ CI fix loop complete.
191
+ Iterations: 2
192
+ Fixed: lint (gofmt: 3 files), test (TestUserCreate — nil pointer in fixture)
193
+ Blocked: none
194
+ Status: all required checks green
195
+ ```
196
+
197
+ ## Chaining
198
+
199
+ | Before this skill | After this skill |
200
+ |---|---|
201
+ | `olko:pr-description-writer` | `olko:qodoloop` |
202
+ | Any `git push` with failing CI | `olko:coderabbitloop` |
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "olko-ci-fix-loop",
3
+ "description": "Diagnose GitHub Actions CI failures in a loop: fetch failing check logs, fix, push, and repeat until green. Direct analog of qodoloop / coderabbitloop for test and lint failures.",
4
+ "skills": "./skills"
5
+ }
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: ci-fix-loop
3
+ description: >
4
+ Diagnose GitHub Actions CI failures in a loop: fetch the failing check logs, identify
5
+ the root cause, apply a targeted fix, push, and wait for the next run — repeating until
6
+ all checks are green or a real blocker needs a human. Use when CI is red after a push,
7
+ when the user says "fix CI", "make tests pass", "diagnose CI failures", or "drive this
8
+ to green". Direct analog of qodoloop / coderabbitloop for automated test and lint failures.
9
+ license: MIT
10
+ allowed-tools: Bash, Read, Write, Edit
11
+ compatibility: Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Kiro, and other Agent Skills compatible tools. Requires git and gh (GitHub CLI) authenticated, with a GitHub Actions workflow configured.
12
+ metadata:
13
+ targets: [_source-only]
14
+ author: Oleg Koval
15
+ tags:
16
+ - github-actions
17
+ - ci
18
+ - testing
19
+ - automation
20
+ - loop
21
+ - fix
22
+ source: weekly-pattern-learner
23
+ source_reason: "qodoloop and coderabbitloop share the push→poll→diagnose→fix→repeat loop; CI failures have the same shape but no dedicated skill existed"
24
+ source_date: "2026-07-28"
25
+ ---
26
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
27
+
28
+ > 🤖 *Auto-generated by **weekly-pattern-learner** · qodoloop and coderabbitloop share the push→poll→diagnose→fix→repeat loop; CI failures have the same shape but no dedicated skill existed*
29
+
30
+ # CI Fix Loop
31
+
32
+ Drive a GitHub Actions CI run from red to green: fetch failure logs, diagnose, apply
33
+ a targeted fix, push, and repeat until all required checks pass or a blocker is hit.
34
+
35
+ ## Inputs
36
+
37
+ - **PR number** (optional): detect from current branch if not given.
38
+ - **Check names** (optional): limit to specific failing checks instead of all.
39
+ - **Max iterations** (default: 5)
40
+
41
+ ## Workflow
42
+
43
+ ### 1. Identify the PR and current CI state
44
+
45
+ ```bash
46
+ # Detect PR from current branch
47
+ gh pr view --json number,headRefName,headRefOid \
48
+ -q '{number, branch: .headRefName, sha: .headRefOid}'
49
+
50
+ # Current check status
51
+ gh pr checks --json name,state,conclusion 2>/dev/null \
52
+ || gh run list --branch <branch> --limit 5
53
+ ```
54
+
55
+ Classify each check as: `pass`, `fail`, `pending`, or `skipped`.
56
+
57
+ **Exit immediately if all required checks already pass** — nothing to do.
58
+
59
+ ### 2. Loop (max 5 iterations)
60
+
61
+ #### A. Identify failing checks
62
+
63
+ ```bash
64
+ gh pr checks --json name,state,conclusion \
65
+ --jq '.[] | select(.conclusion == "failure" or .state == "FAILURE")'
66
+ ```
67
+
68
+ For each failing check, record: check name, workflow file, job name.
69
+
70
+ Stop if the working set is empty — all required checks are green.
71
+
72
+ #### B. Check for base-branch regression first
73
+
74
+ Before touching any code, verify the failure is not already present on `main`:
75
+
76
+ ```bash
77
+ gh run list --branch <base-branch> --workflow <workflow-name> --limit 3 \
78
+ --json conclusion --jq '.[].conclusion'
79
+ ```
80
+
81
+ If the same check is failing on the base branch, **stop and report** —
82
+ this is not your PR's fault. Do not attempt a fix that masks a base-branch problem.
83
+ Wait for a `Base branch recovered` notice before re-trying.
84
+
85
+ #### C. Fetch failure logs
86
+
87
+ For each failing check:
88
+
89
+ ```bash
90
+ # Latest run ID for this branch/workflow
91
+ gh run list --branch <branch> --workflow <workflow-name> --limit 1 \
92
+ --json databaseId --jq '.[0].databaseId'
93
+
94
+ # Fetch only failing steps (not the full log)
95
+ gh run view <run-id> --log-failed
96
+ ```
97
+
98
+ Cap log reading at ~200 lines per job — the error is almost always in the last
99
+ 50 lines of a failed step.
100
+
101
+ #### D. Diagnose
102
+
103
+ Classify the failure before writing any code:
104
+
105
+ | Category | Examples | Fix target |
106
+ |---|---|---|
107
+ | Test failure | `FAIL TestFoo`, `AssertionError`, `expected X got Y` | Source or test |
108
+ | Lint / format | `gofmt`, `eslint`, `ruff`, `prettier` | Run auto-formatter |
109
+ | Build error | compile error, missing import, type mismatch | Source |
110
+ | Dependency | `npm ERR!`, missing module, lockfile mismatch | Update lockfile |
111
+ | CI config | YAML parse error, bad action ref, missing secret | Workflow YAML |
112
+ | Flaky test | same test passes on manual re-run | Re-run first; mark if it keeps failing |
113
+
114
+ For flaky-looking failures, re-run the check before touching code:
115
+
116
+ ```bash
117
+ gh run rerun <run-id> --failed
118
+ ```
119
+
120
+ Wait for the rerun result. If it passes on rerun, skip this iteration and go to
121
+ step F to poll for the new result.
122
+
123
+ #### E. Apply a targeted fix
124
+
125
+ Fix **only** what the log names as the failure. Do not refactor surrounding code,
126
+ add unrelated tests, or touch files the failing step never mentioned.
127
+
128
+ Common one-liners:
129
+
130
+ ```bash
131
+ # Go format
132
+ gofmt -w .
133
+ goimports -w .
134
+
135
+ # Node format / lint
136
+ npx prettier --write .
137
+ npx eslint --fix .
138
+
139
+ # Python
140
+ ruff check --fix .
141
+ black .
142
+
143
+ # Lockfile
144
+ npm install # Node
145
+ poetry lock --no-update # Python
146
+ go mod tidy # Go
147
+ ```
148
+
149
+ For test failures: read the failing test and the code it exercises. Fix the code
150
+ or the assertion — but not both in one commit unless the test was clearly wrong
151
+ and the fix is trivial.
152
+
153
+ #### F. Commit and push
154
+
155
+ Stage **only the files touched in step E** — never `git add -A`, which can sweep
156
+ in unrelated local changes:
157
+
158
+ ```bash
159
+ git add <files touched>
160
+ git commit -m "fix(ci): <what was broken> (ci-fix-loop iteration N)"
161
+ git push
162
+ ```
163
+
164
+ Confirm the push succeeded before polling. A resolved check whose fix never reached
165
+ the branch is worse than an unresolved one.
166
+
167
+ #### G. Wait for CI on the new SHA
168
+
169
+ Poll every ~15s (timeout ~8min) for all previously-failing checks to complete
170
+ on the new push:
171
+
172
+ ```bash
173
+ gh pr checks --json name,state,conclusion,startedAt
174
+ ```
175
+
176
+ Wait until all previously-failing checks show a new result (`pass` or `fail`)
177
+ on the current SHA. Do not act on a result that still shows the old SHA.
178
+
179
+ Go back to step A.
180
+
181
+ ### 3. Report
182
+
183
+ | Field | Value |
184
+ |---|---|
185
+ | Iterations | N |
186
+ | Checks fixed | names + root cause |
187
+ | Checks blocked | names + reason (flaky / needs human / base-branch red) |
188
+ | Final status | all green / partial / blocked |
189
+
190
+ ```
191
+ CI fix loop complete.
192
+ Iterations: 2
193
+ Fixed: lint (gofmt: 3 files), test (TestUserCreate — nil pointer in fixture)
194
+ Blocked: none
195
+ Status: all required checks green
196
+ ```
197
+
198
+ ## Chaining
199
+
200
+ | Before this skill | After this skill |
201
+ |---|---|
202
+ | `olko:pr-description-writer` | `olko:qodoloop` |
203
+ | Any `git push` with failing CI | `olko:coderabbitloop` |
@@ -0,0 +1,20 @@
1
+ # Codex Adapter for ci-fix-loop
2
+
3
+ This is a Codex-specific adapter for the `olko:ci-fix-loop` skill.
4
+ The canonical skill definition is in `../../SKILL.md`.
5
+
6
+ ## Usage
7
+
8
+ Invoke in a Codex session:
9
+
10
+ ```text
11
+ Use the olko:ci-fix-loop skill to diagnose and fix the failing GitHub Actions checks on this PR.
12
+ ```
13
+
14
+ ## Workflow
15
+
16
+ See `../../SKILL.md` for the full workflow: identify failing checks, verify the failure
17
+ is not a base-branch regression, fetch failing job logs via `gh run view --log-failed`,
18
+ diagnose the root cause, apply a targeted fix, commit and push staged changes, then poll
19
+ until CI reports a new result — repeating up to 5 times until all required checks are
20
+ green or a real blocker needs a human. The procedure is plain `git`/`gh` and is agent-agnostic.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "olko:ci-fix-loop",
3
+ "version": "0.1.0",
4
+ "description": "Diagnose GitHub Actions CI failures in a loop: fetch failing check logs, fix, push, and repeat until green. Direct analog of qodoloop / coderabbitloop for test and lint failures.",
5
+ "skills": "skills/"
6
+ }