ci-fix
A thin wrapper that collects logs from a failed CI run, formats the context, and connects to `/drive`. Input resolution (explicit run id > latest failure on an explicit branch > latest failure on the current branch) → flaky determination (one `gh run rerun --failed` + polling; skipped with `--no-rerun`) → log extraction (`gh run view --log-failed`; the ANSI-stripping + error-line extraction regex is the same as health's same-error determination) → assembling the instruction text → launching `/drive`. `--dry-run` outputs only the instruction text (no rerun, no drive launch). A failure on the main branch is called out as high priority at the top of the report.
- License 许可
- MIT
- 所属仓库
- ozzy-labs/skills
- 最近更新
- 2026-07-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- description
- A thin wrapper that collects logs from a failed CI run, formats the context, and connects to `/drive`. Input resolution (explicit run id > latest failure on an explicit branch > latest failure on the current branch) → flaky determination (one `gh run rerun --failed` + polling; skipped with `--no-rerun`) → log extraction (`gh run view --log-failed`; the ANSI-stripping + error-line extraction regex is the same as health's same-error determination) → assembling the instruction text → launching `/drive`. `--dry-run` outputs only the instruction text (no rerun, no drive launch). A failure on the main branch is called out as high priority at the top of the report.
- allowed-tools
- Bash, Read, AskUserQuestion, SlashCommand
- argument-hint
- [<run-id> | --branch <name>] [--no-rerun] [--dry-run] [--auto]
- disable-model-invocation
- true
03 SKILL.md 正文
ci-fix
Read .agents/skills/ci-fix/SKILL.md and follow its workflow steps.
Important: the input resolution priority / flaky determination flow / error extraction regex are a fixed contract in SKILL.md. The regex is identical to health (health-check.mjs's extractCiErrorKey), and tests enforce the match. Claude does not change the order or regex on its own.
Claude Code-specific additions
Running commands
Use the gh CLI (Bash) to resolve, rerun, and fetch logs for the run. Execute in the order of SKILL.md's "Input resolution priority" → "Flaky determination" → "Log extraction":
# Input resolution (if there's no explicit run id, pull the latest failure from the branch)
gh run list --branch <name> --status failure --limit 1 --json databaseId,workflowName,headBranch,conclusion
# Flaky determination (skipped when --no-rerun is specified)
gh run rerun <id> --failed
# Wait for completed at a 30-second interval, capped at 15 minutes
gh run view <id> --json status,conclusion
# Log extraction for a reproducing failure
gh run view <id> --log-failed | tail -200
ANSI stripping (/\[[0-9;]*m/g) and error-line extraction (the last match of /(error|Error|failed)[\s:].*$/) strictly follow the regex in SKILL.md.
Confirmation before launching drive (AskUserQuestion wiring, default)
Launching drive is an externally-visible action — PR creation. By default, present the assembled instruction text and confirm whether to launch via AskUserQuestion (do not enumerate options as text):
- Present the formatted instruction text and a summary of the target run (workflow / job / step / error summary / a high-priority callout if it's a main branch failure).
- Confirm via
AskUserQuestion:- "Launch drive" → launch
/drive "<instruction text>"in single mode viaSlashCommand. - "Cancel" → display the instruction text and end.
- "Launch drive" → launch
--auto (skip confirmation)
When --auto is specified, the above AskUserQuestion is not inserted, and /drive "<instruction text>" is launched directly via SlashCommand (an explicit opt-out of the externally-visible action). This is intended for unattended execution via routine / /loop / schedule.
--dry-run (no side effects)
When --dry-run is specified, neither the rerun nor the drive launch is performed; only the instruction text is output before ending. Neither AskUserQuestion nor SlashCommand is called. Even when --dry-run is specified together with other flags, "output only" takes priority.
Ending on flaky / no failed run
- flaky (rerun succeeds) → report "flaky (no fix needed)" and end. drive is not launched.
- No failed run → report "no failed run" and end.
- Polling cap (15 minutes) reached → end as
要確認(undeterminable). drive is not launched.
Completion report and next-action suggestions
End once the instruction text presentation / launched drive / flaky or no-failed-run report have been displayed. If drive was launched, defer to its own report. Do not suggest next actions.
04 同仓库更多 Skills
verify
An integrated skill that runs the combined validation of build / typecheck / test / lint in one shot. The `verify.mjs` engine auto-discovers validation commands via a discovery chain (AGENTS.md's 「検証」 section → package.json scripts → justfile/Makefile/lefthook → language heuristics), executes them serially with their source attached, and returns a result summary. If a higher-priority stage produces a hit, only that stage is executed (no crossing stages).
usage-guard
Monitors Claude Code's Usage Limit (5-hour = Current / weekly = Weekly), pauses work when it exceeds 95%, and automatically resumes once the reset restores headroom. Bundles an engine form that a caller such as drive Reads at a checkpoint, and a standalone form, `/usage-guard "<continuation command>"`, that guards arbitrary work. Claude-only (depends on the OAuth usage-rate endpoint + ScheduleWakeup).
topics
Selects GitHub topic candidates by having the `topics.mjs` engine perform constraint validation, popularity measurement, broad+narrow / singular-plural comparison, and hardcoded ozzy-labs conventions, then applies them via `gh repo edit --add-topic` following the policy's `externally-visible` gate (default batch-confirm). Scope is limited to use within ozzy-labs.
skill-observability
Defines the skill observability event contract (event.schema.json) and emit substrate (obs-emit.mjs). The SSOT for the measurement layer of the skill improvement loop. Referenced by other skills and hooks.
skill-metrics
Aggregates the local observability event log (~/.agents/observability/events.jsonl) and presents, read-only, per-skill invocation counts and notable events (fallback / HITL rejection / loop cap reached / abort). Fires on "show me the skill metrics," "aggregate the observability results," "which skills get used the most?" Does not send anything.
ship
Runs verification, commit, and PR creation all at once. An integrated pipeline that runs verify (build + type + test + lint) → commit → PR creation in sequence against the changes.