بنقرة واحدة
oh-ci
Diagnose and fix CI failures on a PR, push fixes
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Diagnose and fix CI failures on a PR, push fixes
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Do the work. Pre-flight, build, detect drift, salvage if needed. Use when you have a clear aim and are ready to implement.
Resolve multi-dependency fan-in by merging dependency PRs into a common base and updating issue dependencies
Review and merge open PRs for GitHub issues as a cohesive batch
Claim a GitHub issue, create its branch and draft PR before implementation, execute the work in isolation, and hand the completed draft to RNA's full ship gate.
Check work and detect drift before committing. A second opinion that catches misalignment early. Use at natural pause points, before PRs, or when something feels off.
Agent-led PR/working-tree review triage. Start from the diff, add RNA graph/business context only where it changes review decisions, and state when raw git diff is enough.
| name | oh-ci |
| description | Diagnose and fix CI failures on a PR, push fixes |
Fix CI failures on a pull request. Work in an isolated worktree, diagnose failures from check run logs, apply fixes, verify, and push.
/oh-ci <pr-number>
<pr-number> - the pull request number with failing CIissue/<number>)Load project background from AGENTS.md, relevant .oh/ artifacts, and RNA MCP context when available.
Get PR branch info and create worktree:
# Save original directory for cleanup
ORIGINAL_DIR=$(pwd)
# Get the PR branch name
BRANCH=$(gh pr view <pr-number> --json headRefName -q .headRefName)
# Fetch and create worktree tracking the remote branch
git fetch origin
git worktree add .worktrees/ci-<pr-number> -B $BRANCH origin/$BRANCH
cd .worktrees/ci-<pr-number>
Fetch CI check run details and logs:
# Get the head SHA
HEAD_SHA=$(gh pr view <pr-number> --json headRefName,commits -q '.commits[-1].oid')
# List all check runs for this commit
gh api repos/{owner}/{repo}/commits/${HEAD_SHA}/check-runs --jq '.check_runs[] | select(.conclusion == "failure") | {name: .name, id: .id, conclusion: .conclusion}'
# For each failed check run, inspect annotations separately
gh api repos/{owner}/{repo}/check-runs/{check_run_id}/annotations
# Resolve the failed workflow run non-interactively, then fetch its logs
RUN_ID=$(gh run list --commit "$HEAD_SHA" --status failure --limit 1 --json databaseId --jq '.[0].databaseId')
test -n "$RUN_ID"
gh run view "$RUN_ID" --log-failed
Diagnose failures:
Fix the code:
git add)/review skill on staged changesVerify the fix locally:
# Run the same checks that failed, if possible
# For TypeScript projects:
pnpm typecheck
pnpm test
pnpm lint
# For Rust projects:
cargo check
cargo test
cargo clippy
Adapt commands to the project's build system. Capture every result and stop before commit or push if any required check fails.
Commit fixes:
git commit -m "fix: resolve CI failures on PR #<pr-number>
- <summary of each fix>
Fixes #<descendant-issue> (if any)
[outcome:<name>]"
Push:
git push
Cleanup worktree:
cd $ORIGINAL_DIR
git worktree remove .worktrees/ci-<pr-number>
Exit and report:
If repo-local review finds non-trivial issues during the fix, create GitHub issues:
PARENT_ISSUE=${BRANCH#issue/}
NEW_ISSUE=$(gh issue create \
--title "Fix: <brief description>" \
--body "Spawned from #${PARENT_ISSUE} during CI fix on PR #<pr-number>.
## Context
<what was found>
## Acceptance
- [ ] Fix applied
- [ ] CI passes" \
--assignee @me | grep -oE '[0-9]+$')
Complete ALL descendant issues before the final push.
CRITICAL: You MUST signal completion when done. Call the signal_completion tool as your FINAL action.
Signal based on outcome:
| Outcome | Call |
|---|---|
| CI fixed, changes pushed | signal_completion(status: "success", pr: "<pr-url>") |
| Needs human decision | signal_completion(status: "blocked", blocker: "<reason>") |
| Unrecoverable failure | signal_completion(status: "error", error: "<reason>") |
| If you do not signal, the orchestrator will not know you are done and the session becomes orphaned. |
Fallback: If the signal_completion tool is not available, output your completion status as your final message in the format: COMPLETION: status=<status> pr=<url> or COMPLETION: status=<status> error=<reason>.