skills/pr-workflow/SKILL.md
Use when creating PRs, monitoring CI, addressing review comments, or shipping code. Keywords: create PR, push, CI, review, merge, ship
npx skillsauth add avifenesh/cairn pr-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
cairn.gitRun with checkout -b feat/descriptioncairn.editFilecairn.gitRun with add <files> (specific files, not -A)cairn.gitRun with commit -m "type: description"cairn.shell with git push -u origin <branch>cairn.shell with gh pr create --title "..." --body "..."cairn.shell with gh pr checks <number>cairn.shell with sleep 120 && gh pr checks <number>cairn.shell with gh run view <run-id> --log-failedGitHub has two distinct comment systems on PRs:
| Type | API Endpoint | Has threading | Created by gh pr comment |
|------|-------------|---------------|---------------------------|
| Review comments (inline diff) | pulls/{pull_number}/comments | Yes — in_reply_to_id field | No |
| Issue comments (timeline) | issues/{pull_number}/comments | No | Yes |
To list review comments:
gh api repos/{owner}/{repo}/pulls/{pull_number}/comments --paginate --jq '.[] | {id, path, line, body, user: .user.login, in_reply_to_id}'
To list issue comments:
gh api repos/{owner}/{repo}/issues/{pull_number}/comments --paginate --jq '.[] | {id, body, user: .user.login}'
Use the dedicated replies endpoint — it's the cleanest and most reliable:
gh api repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies \
--method POST \
--field body="Addressed in COMMIT_HASH" \
--jq '.html_url'
This endpoint only requires body. It automatically threads the reply under the parent review comment. The comment_id must be a top-level review comment (replies to replies are not supported by the API).
Alternative — create a review comment with in_reply_to:
gh api repos/{owner}/{repo}/pulls/{pull_number}/comments \
--method POST \
--field body="Addressed in COMMIT_HASH" \
--field in_reply_to={comment_id} \
--jq '.html_url'
When in_reply_to is set, all other parameters (commit_id, path, line, etc.) are ignored — only body matters.
Issue comments have no threading API. Reply by posting a new issue comment and referencing the original:
gh pr comment <number> --body "Re: review feedback — addressed in COMMIT_HASH"
Or via API:
gh api repos/{owner}/{repo}/issues/{pull_number}/comments \
--method POST \
--field body="Re: review feedback — addressed in COMMIT_HASH"
gh api repos/{owner}/{repo}/pulls/{pull_number}/comments --paginategh api repos/{owner}/{repo}/issues/{pull_number}/comments --paginateCOMMENTED or DISMISSED review does NOT supersede an earlier CHANGES_REQUESTED. Only APPROVED clears a blocking review: gh api repos/{owner}/{repo}/pulls/{pull_number}/reviews --paginate --slurp --jq '[.[] | .[]] | group_by(.user.login)[] | sort_by(.submitted_at) | reverse | map(select(.state == "APPROVED" or .state == "CHANGES_REQUESTED")) | first // {state: "COMMENTED", user: .[0].user.login, id: .[0].id}' — this returns each reviewer's latest meaningful state (APPROVED or CHANGES_REQUESTED); earlier CHANGES_REQUESTED persists until explicitly approvedin_reply_to_id is null on top-level comments; replies share the same parent. Reply only to the top-level parent, not to each reply.When a reviewer submits CHANGES_REQUESTED with a summary body but no inline comments, there's no thread to reply to. Post an issue comment acknowledging the review and referencing the commit that addresses the feedback:
gh pr comment <number> --body "Addressed review feedback from @{reviewer_login} in COMMIT_HASH"
When creating a new inline review comment (using path/line/position) fails because the diff position no longer maps to the current code (after new commits), fall back to a regular PR comment referencing the affected file/line or review discussion:
gh pr comment <number> --body "Addressed review on {path} L{line} in COMMIT_HASH"
cairn.shell with gh pr merge <number> --squash --admin--no-verify or --forcedata-ai
Detect agent-cairn PRs that have stalled (no activity >=90 min) and classify the failure mode to route to appropriate recovery agent.
tools
Post-install skill adaptation: read a newly installed SKILL.md, fix environment-specific references (paths, accounts, tool names), assign the skill to relevant agent types, and propose an AGENTS.md update. Triggered automatically after cairn.installSkill completes.
data-ai
Monthly self-improvement brief for Cairn. Queries error_patterns, action_exemplars, experiment_windows, and session_journal to synthesize what Cairn learned, where it failed, and 3 concrete proposals for Avi to approve. Run on the 1st of each month. Keywords: growth brief, monthly review, self-improvement, what did cairn learn, how is cairn doing, monthly report
testing
Decision support with memory-backed context. Retrieves past decisions, journal history, and relevant facts before answering questions that involve a choice or tradeoff. Keywords: should I, which is better, tradeoff, compare, decide, choose, option, alternative, pros and cons, recommend