From agent-mem
Monitors a pull request until it is ready to merge — watches CI checks, reads new comments, resolves review threads, and pushes fixes in a loop until all actionable issues are resolved.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent-mem:babysitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Stay with the PR until it is actually clean. Do not stop after one check pass if comments or review threads are still unresolved.
Stay with the PR until it is actually clean. Do not stop after one check pass if comments or review threads are still unresolved.
Use gh pr view for the coarse status:
gh pr view <number> --json \
number,state,isDraft,mergeable,mergeStateStatus,reviewDecision,headRefOid,statusCheckRollup,url
Resolve the repository owner/name before using GraphQL:
repo_json=$(gh repo view --json owner,name)
owner=$(jq -r '.owner.login // .owner.name' <<<"$repo_json")
repo=$(jq -r '.name' <<<"$repo_json")
Use GraphQL for unresolved review threads. Include pageInfo; omit cursor on the first page, then pass the previous endCursor with -f cursor="$cursor" while hasNextPage is true.
gh api graphql \
-f query='query($owner:String!,$repo:String!,$number:Int!,$cursor:String){repository(owner:$owner,name:$repo){pullRequest(number:$number){reviewThreads(first:100,after:$cursor){pageInfo{hasNextPage endCursor}nodes{id,isResolved,isOutdated,path,line,comments(last:1){nodes{author{login},body,createdAt,url}}}}}}}' \
-f owner="$owner" -f repo="$repo" -F number=<number>
Use this loop when a PR may have many review threads:
thread_query='query($owner:String!,$repo:String!,$number:Int!,$cursor:String){repository(owner:$owner,name:$repo){pullRequest(number:$number){reviewThreads(first:100,after:$cursor){pageInfo{hasNextPage endCursor}nodes{id,isResolved,isOutdated,path,line,comments(last:1){nodes{author{login},body,createdAt,url}}}}}}}'
cursor_args=()
while :; do
page=$(gh api graphql -f query="$thread_query" -f owner="$owner" -f repo="$repo" -F number=<number> "${cursor_args[@]}")
printf '%s\n' "$page" | jq -r '.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved==false)
| [.id,.path,(.line//""),(.isOutdated|tostring),(.comments.nodes[-1].author.login//""),(.comments.nodes[-1].body|gsub("\n";" ")|.[0:240])]
| @tsv'
jq -e '.data.repository.pullRequest.reviewThreads.pageInfo.hasNextPage' >/dev/null <<<"$page" || break
cursor=$(jq -r '.data.repository.pullRequest.reviewThreads.pageInfo.endCursor' <<<"$page")
cursor_args=(-f cursor="$cursor")
done
Filter unresolved threads with jq:
jq -r '.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved==false)
| [.id,.path,(.line//""),(.isOutdated|tostring),(.comments.nodes[-1].author.login//""),(.comments.nodes[-1].body|gsub("\n";" ")|.[0:240])]
| @tsv'
Resolve a stale thread only when the fix is verified:
gh api graphql \
-f query='mutation($threadId:ID!){resolveReviewThread(input:{threadId:$threadId}){thread{id,isResolved}}}' \
-f threadId=<thread-id>
git status.npx claudepluginhub zaheerops/agent-memMonitors a pull request until it is ready to merge — watches CI checks, reads new comments, resolves review threads, and pushes fixes in a loop until all actionable issues are resolved.
Babysits GitHub PR until merge-ready by running pr-merge-prep every 10 minutes, monitoring CI status, reviews, and conflicts, then asks for explicit merge confirmation.
Use after a pull request has been opened and the task is not finished until it lands. Triggers on "PR is open", "CI is running", "is it merged yet", a PR that is green but not merged, fresh CI that might still flip, or being tempted to report a task done at PR-open. GitHub / gh CLI based.