← ClaudeAtlas

afk-tracker-prlisted

Tracker-agnostic PR/MR operations — push, open, poll checks, diff, review, merge — wrapping `gh` (GitHub) or `glab` (GitLab) behind one set of verbs. Use whenever the active AFK phase pushes a branch, opens a PR/MR, polls CI, performs a self-review, or merges.
Mo-Tamim/afk-agent · ★ 0 · Code & Development · score 72
Install: claude install-skill Mo-Tamim/afk-agent
# Skill: afk-tracker-pr The **only** sanctioned way to talk to tracker PRs / MRs from an AFK phase. GitHub calls them *pull requests*; GitLab calls them *merge requests*; this skill collapses both to the verb **PR**. ## Preconditions Same as `afk-tracker-issue`. The current branch must be the issue's planned branch (named `afk/issue-<N>-<slug>` by default). ## Inputs - `ISSUE_ID`, `BRANCH`, `REPO`, `DEFAULT_BRANCH`. ## Operations ### 1. Push the branch ```bash git push -u origin "$BRANCH" ``` This is the **only** push the AFK runner ever performs. Never force-push. If the remote already has the branch with conflicting commits, emit BLOCKED with reason `branch exists on remote with conflicting commits`. ### 2. Open the PR GitHub: ```bash gh pr create -R "$REPO" \ --base "$DEFAULT_BRANCH" \ --head "$BRANCH" \ --title "$ISSUE_TITLE" \ --body-file "$PR_BODY_FILE" ``` GitLab: ```bash glab mr create -R "$REPO" \ --target-branch "$DEFAULT_BRANCH" \ --source-branch "$BRANCH" \ --title "$ISSUE_TITLE" \ --description "$(cat "$PR_BODY_FILE")" \ --yes ``` The body **must** contain `Closes #${ISSUE_ID}` so merging auto-closes the linked child issue. Capture the returned PR URL and number. Output for the runner (same shape for both trackers): ``` <pr>{"number": 99, "url": "<URL>"}</pr> ``` ### 3. Poll CI GitHub: ```bash gh pr checks "$PR_NUMBER" -R "$REPO" --json bucket,name,status,conclusion ``` GitLab: ```bash glab ci status -p "$PR_NUMBER" -R "$RE