agentleFS
baseballyamabaseballyama/rsvelte/.claude/skills/ci-fix-and-verify/SKILL.md

ci-fix-and-verify

Skill249 starsChanged 2 months agoMITView on GitHub

PR の CI 失敗を修正し、全 CI がパスするまでプッシュ→待機→修正を繰り返す。「/ci-fix-and-verify [PR番号]」「CI直して」「CIが落ちてる」「CI修正」などの依頼時に使用。

  • Commits and pushes

The file

Files
SKILL.md

CI Fix and Verify

PR の CI 失敗を検出・修正し、全チェックがパスするまでサイクルを回す。引数は PR 番号(省略時は現在ブランチから検出)。

Phase 0: 初期化

PR_NUMBER="${1:-$(gh pr list --head "$(git branch --show-current)" --json number --jq '.[0].number')}"
REPO_INFO=$(gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"')
OWNER="${REPO_INFO%/*}"; REPO="${REPO_INFO#*/}"

Phase 1: CI 状態確認

gh pr checks "$PR_NUMBER" --repo "$OWNER/$REPO"
状態次
全てパス完了報告して終了
失敗ありPhase 2
実行中wait-ci.sh で待機してから再確認

Phase 2: 失敗分析と修正

gh run view <run_id> --repo "$OWNER/$REPO" --log-failed
失敗タイプローカル再現 / 修正
fmtcargo fmt --all
clippycargo clippy --all-targets --all-features -- -D warnings
ビルドcargo build --all-targets
テスト失敗テストを CI ログから特定し cargo test --release --test <suite> で個別実行(フル実行は最後)
fixtures ずれpnpm run generate-fixtures 後に再テスト
docs / compatibility reportpnpm run test-and-update で再生成
Node 側pnpm install 後、該当 node scripts/... の出力を確認

CI と同じコマンドで再現する。ワークフローは .github/workflows/ を参照。

Phase 3: プッシュと待機

cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings   # pre-commit hook と同じ

git add <修正ファイル>
git commit -m "fix(ci): <要約>"    # 英語 Conventional Commits、atomic commit
git push origin HEAD

# Bash tool の timeout は 600000(10分)に設定。最大 20 分待機
bash .claude/skills/ci-fix-and-verify/wait-ci.sh "$OWNER" "$REPO" "$PR_NUMBER"
wait-ci.sh 出力アクション
ALL_PASSEDPhase 4
FAILEDPhase 2 に戻る
TIMEOUTgh pr checks を確認し、必要なら wait-ci.sh を再実行して待機延長
API_ERRORエラーを表示して終了

Phase 4: 完了報告

CI が全てパスしました!
- 修正回数: X回
- 修正内容: [修正ごとの要約]

ルール

  • 修正サイクルは最大 5 回。超えたらユーザーに状況を報告する
  • --no-verify などのフック回避フラグは使わない

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.