debug-ci
Fix a GitHub Actions run that has failed — e.g. "why did CI fail", "the build is red", "check the Actions run", "/debug-ci". Fetches the failure logs via `gh`, diagnoses the root cause, and fixes it locally. User will review and push.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- debug-ci
- description
- Fix a GitHub Actions run that has failed — e.g. "why did CI fail", "the build is red", "check the Actions run", "/debug-ci". Fetches the failure logs via `gh`, diagnoses the root cause, and fixes it locally. User will review and push.
- allowed-tools
- Read, Grep, Glob, Bash, Edit, Write
- user-invocable
- true
02 资源文件 3
- 脚本scripts/debug_ci_cli.py16.6 KB
- 脚本scripts/debug-ci459 B
- 脚本scripts/test_debug_ci.py12.8 KB
03 SKILL.md 正文
Debug CI
Diagnose a failed GitHub Actions run from its real logs, fix it locally, stop before any
git write. Same human-in-the-loop boundary most repos hold — this skill invokes gh, not
git commit/git push.
Steps
-
Confirm
ghauth first:gh auth status. If it's not authenticated, tell the user and stop — don't attempt to fix auth yourself. -
Fetch and trim the logs in one step.
gh run view --log-faileddumps every line of every failed job; this extracts only the error regions, per job and step:"${CLAUDE_PLUGIN_ROOT:-${SKILL_TREE_DIR:-$HOME/projects/skill-tree}}/skills/debug-ci/scripts/debug-ci"With no arguments it takes the newest failing run on the current branch. Useful flags:
<run-id>positionally,--branch,--repo owner/name,--context N(lines kept before each error),--max-lines N(ceiling per step),--json.Exit codes:
0extracted,1no failing run on that branch,2unusable (ghmissing, unauthenticated, or the run isn't readable) — in that case report it and stop, don't try to fix auth yourself. -
More than one failing run? Stop and ask. If the output ends with
Other failing runs on this branch:, name each run (id and workflow) and ask the user which to address, or whether to take them all. Edit nothing until they answer. -
Read what it kept, and mind the elisions. Every gap is marked
... N lines omitted .... If the kept region doesn't contain the cause, re-run with a larger--context/--max-lines, or fall back to the rawgh run view <run-id> --log-failedrather than guessing. -
Diagnose the root cause from the log, not from guessing at the diff. If the log doesn't make the cause obvious, say so and ask rather than fixing the first plausible thing.
-
Fix it following this repo's standing conventions (see that repo's own CLAUDE.md, if any): TDD (test first where the failure is a code bug), discrete reviewable steps, invoke the relevant language skill/reference for the code being touched.
-
Verify locally before reporting done. Run the same check CI ran (test suite, prek/pre-commit, lint) so "should pass now" is backed by a real local run, not an inference from the diff. If the
verifyskill is installed alongside this one, invoke it for the claim-by-claim version of this check. -
Stop. Show the diff. Do not
git add/commit/push. Report what was wrong, what changed, and the command the user ran to reproduce the local pass. Pushing and watching the re-run is manual, same as every other change.
Notes
- This skill only ever reads CI state (
gh run/gh api) and writes to the working tree — it has no git-write step to skip, by design. If a future version adds auto-push, that's a deliberate policy change requiring explicit sign-off, not a default. git stash/git stash popare fine for reproducing a failure against the old code, as long as the end result is non-destructive (tree restored, stash list unchanged) andgit blameis untouched.- Multiple failing jobs in one run: fix and verify one at a time rather than batching blind fixes across unrelated failures.
- On older
gh(seen on 2.23.0),run view --log-failedexits 0 and prints nothing. The CLI detects that empty answer and refetches via the REST jobs/logs API, so an empty log is never reported as a clean run.
04 同仓库更多 Skills
wait-what
Stop. Your plan/idea did not land. Re-pitch it.
verify
Verify before answering whether something works, still passes, is gone, is used, or is correct — and whenever the user says "can you confirm", "are you sure", "did that actually work", or reports something is "still" broken. Produces the answer plus the evidence that would have falsified it. A failed GitHub Actions run is skill-tree:debug-ci instead.
ui-designer
Design or restyle a web UI — landing pages, dashboards, docs sites, app chrome — or when the user asks why a site "looks generic", "looks like a template", or wants it to feel intentional. A running list of design lessons learned, applied as rules rather than suggestions.
two-axis-review
Two-axis review of changes since a fixed point (commit, tag, HEAD~N, or default HEAD~1): Standards (does the code follow this repo's conventions?) and Spec (does the code do what it should?). Axes run as parallel sub-agents so neither masks the other. Use when the user says "review against the spec", "does this follow our conventions", "standards and spec review", or "two-axis review". Not a correctness bug hunt — that's the built-in `/code-review`.
tui-screenshots
Use for generating or refreshing TUI screenshots for docs — "regenerate the screenshots", "the README screenshots are stale". Drives a Textual/TUI app headlessly and exports SVG. Not for reading a user's screenshot — that is `screenshot`.
to-tickets
Break a spec, plan, or conversation into tracer-bullet vertical-slice tickets with blocking edges — "turn this into tickets", "break this down", "what's the work?". Pairs with skill-tree:to-spec upstream and skill-tree:handoff downstream.