build-setup
Set up build environment and test fixtures for COBOL-to-Java migrations. Creates compilation infrastructure for both languages…
Iterate on a GitHub pull request — drive it through CI, code review, and QA until it is merge-ready. Poll verification layers with `gh` CLI, diagnose and fix CI failures, address review feedback, retry flaky checks, push fixes, and repeat. The agent is the orchestration loop.
$ npx -y skills add openhands/extensions --skill iterate --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/iterateContext preview
The summary Claude sees to decide when to auto-load this skill.
Iterate on a GitHub pull request — drive it through CI, code review, and QA until it is merge-ready. Poll verification layers with `gh` CLI, diagnose and fix CI failures, address review feedback, retry flaky checks, push fixes, and repeat. The agent is the orchestration loop.
name: iterate description: >- Iterate on a GitHub pull request — drive it through CI, code review, and QA until it is merge-ready. Poll verification layers with `gh` CLI, diagnose and fix CI failures, address review feedback, retry flaky checks, push fixes, and repeat. The agent is the orchestration loop. triggers: - /iterate - /verify - /babysit
Iterate on a pull request until it passes all verification layers. You push, poll, fix, and push again — the loop only ends when the PR is green or a blocker requires human help.
No scripts — you are the orchestration loop. Uses only standard `gh` CLI commands that work on any GitHub repo.
Requires: `gh` CLI authenticated with repo access, a PR branch. Windows PowerShell equivalents for Bash-only assignment, redirection, and quoting patterns in this skill are in `references/windows.md`.
Not every repo has all three verification layers. Before entering the loop, check which ones exist. Only poll layers that are actually set up.
gh workflow list --json name --jq '.[].name'
A repo might have only CI. Or CI + review. Or all three. Your "all passed" condition is: every *present* layer is green. Don't block waiting for layers that don't exist.
1. Push and ensure a draft PR exists. 2. Poll each present verification layer. 3. Decide: all passed? fix needed? wait? 4. If fix needed — fix, refresh any `.pr/` artifacts affected (see below), commit, push, re-request review from bots, go to 2. 5. If waiting — sleep per polling cadence, go to 2. 6. If all present layers passed on the *current* SHA — mark PR ready, done.
IMPORTANT: pushing a fix is NOT the end. After every fix+push you MUST re-request review from the review bot (if present) and go back to step 2. The loop only ends when the verifiers pass on your latest SHA. Addressing feedback and pushing a commit is just one iteration — the bot needs to review the new code too.
Do not stop to ask the user whether to continue polling; continue autonomously until a strict stop condition is met or the user interrupts.
Create the PR as a draft. This prevents repo automations (merge workflows, artifact cleanup, auto-merge) from triggering while you're still iterating. You mark it ready only after all verification layers pass.
git push origin HEAD gh pr create --fill --draft 2>/dev/null || true gh pr view --json number,url,headRefOid,isDraft --jq '"\(.number) \(.url) \(.headRefOid) draft=\(.isDraft)"'
If the PR already exists and is not a draft, convert it:
gh pr ready --undo
gh pr checks --json name,state,bucket --jq '
{ passed: [.[] | select(.bucket=="pass")] | length,
failed: [.[] | select(.bucket=="fail")] | length,
pending: [.[] | select(.bucket=="pending")] | length }'To inspect a failure:
SHA=$(gh pr view --json headRefOid --jq .headRefOid) gh run list --commit "$SHA" --status failure --json databaseId,name,conclusion \ --jq '.[] | "\(.databaseId)\t\(.name)\t\(.conclusion)"' gh run view <run-id> --log-failed
Skip this step if the repo has no review bot.
gh pr view --json reviews --jq '
[.reviews[] | select(
.authorAssociation == "OWNER" or
.authorAssociation == "MEMBER" or
.authorAssociation == "COLLABORATOR" or
(.author.login | test("openhands|all-hands-bot"; "i"))
)] | last | { state: .state, reviewer: .author.login, body: .body[0:300] }'Inline review comments (when changes requested):
gh api "repos/{owner}/{repo}/pulls/{number}/comments" \
--jq '.[] | select(.user.login | test("openhands|all-hands-bot"; "i"))
| { path: .path, line: .line, body: .body[0:200] }'On a fresh iteration, existing pending review feedback should be checked immediately — not only comments that arrive after monitoring starts. Already-open review comments must not be missed.
Skip this step if the repo has no QA bot.
QA reports are PR issue comments with a status line like `Status: PASS`.
gh api "repos/{owner}/{repo}/issues/{number}/comments" --paginate \
--jq '[.[] | select(
(.user.login | test("openhands|all-hands-bot"; "i")) and
(.body | test("Status:\\s*(PASS|FAIL|PARTIAL)"; "i"))
)] | last | { author: .user.login, body: .body[0:500], url: .html_url }'For each present layer, check its status. If a layer is not present in the repo, treat it as passing.
This repository is the public extensions registry for OpenHands. It contains reusable, shareable skills, plugins, and Agent Canvas Apps that customize agent behavior and interfaces. Skills overview docs: SDK skill guide:
Set up build environment and test fixtures for COBOL-to-Java migrations. Creates compilation infrastructure for both languages…
End-to-end COBOL to Java migration workflow. Handles build setup, mainframe dependency removal, and code migration with test…
Create a transformation guide for replacing mainframe-specific COBOL constructs with standard COBOL equivalents. Use when…
Apply mainframe dependency transformations to COBOL code using a pre-generated transformation guide. Converts CICS/VSAM…
Migrate COBOL code to idiomatic Java, preserving business logic while following Java best practices. Use for COBOL modernization…
A test skill that responds to the magic word "alakazam" with a specific phrase