PR Lifecycle Workflow

VerifiedCaution

Drive the full PR lifecycle: create or reuse a PR, request Copilot review, monitor CI checks, and summarize findings for the user.

Sby Skills Guide Bot
DevOpsIntermediate
7/22/2026
Claude Code
#pull-request#ci-monitoring#github-actions#code-review#github-cli

Recommended for

Automated summary

Drives a GitHub pull request end to end: creates or reuses the PR, requests Copilot as reviewer, polls GitHub Actions checks, then summarises CI failures and Copilot comments as one actionable report.

Strengths

  • Chains PR state resolution, creation when missing, Copilot review request and check monitoring with no manual babysitting
  • The Copilot reviewer request is idempotent and matches any bot login variant via a case-insensitive test instead of a hardcoded name
  • Polling is bounded to 30 iterations of 30 seconds (15 minutes) with early exit and single-line progress narration instead of dumping raw JSON
  • Groups findings by file, then by matched .github/instructions file and canonical skill, and surfaces concrete next steps

Limitations

  • Fully dependent on gh and GitHub, so it cannot run against GitLab, Bitbucket or an unauthenticated CLI
  • The 15-minute budget may expire while slow checks or the Copilot review are still pending, leaving a partial analysis
  • It only reports: no CI failure or review comment is fixed automatically
When to use it

Use it right after pushing a branch when you want the PR opened, Copilot engaged, and a digestible summary of CI status in one shot.

When not to use it

Avoid it on repositories not hosted on GitHub, or when you expect the skill to repair failing checks rather than describe them.

Security analysis

Caution
Quality score86/100

The skill is legitimate and contains no destructive, exfiltration, or obfuscated behavior. It does, however, execute GitHub CLI and git commands, mutate PR state, and poll network resources, so it fits the caution category rather than safe.

Findings
  • •Uses bash/git/gh commands and GitHub network access, including PR creation and reviewer mutation via `gh pr create` / `gh pr edit --add-reviewer`.
  • •No `allowed-tools` declaration despite instructing command execution, reducing permission transparency.
  • •Reads CI logs and PR comments, which may contain sensitive repository information if surfaced carelessly.
How this analysis is made

Examples

Open a PR and watch it
/pr — open a pull request for the current branch and watch CI and Copilot until they're done.
Monitor an existing PR
The PR for this branch is already open; poll the GitHub Actions checks and the Copilot review and tell me what's failing.
Triage after a push
I just pushed. Can you check the CI results and the Copilot comments on the PR and group the problems by file?

name: pr description: DraftForge PR lifecycle workflow. Use when the user runs /pr, opens or pushes a pull request, or asks to monitor CI checks and Copilot review on a branch. Creates the PR (or reuses an existing one), polls GitHub Actions and Copilot up to ~15 min, then analyses CI failures and Copilot comments and reports findings grouped by file and skill.

/pr — PR lifecycle workflow

Purpose

Drive a PR from "branch pushed" to "actionable review summary" without the user babysitting it. The skill:

  1. Resolves PR state (open existing or create new).
  2. Requests Copilot as a reviewer if missing.
  3. Polls GitHub Actions checks and the Copilot review (up to 15 min).
  4. Pulls CI failure logs and Copilot inline comments.
  5. Categorises findings by file → matched .github/instructions/*.instructions.md → canonical skill, then surfaces them to the user with concrete next steps.

When to trigger

  • User types /pr.
  • User says "open a PR" / "create a PR" / "spin up a PR" on the current branch.
  • User says "watch CI" / "monitor checks" / "wait for Copilot" on a branch with an open PR.
  • A push has just happened and the user is asking what's next.

Do not trigger automatically just because a branch has uncommitted work — confirm first.

Workflow

Phase 1 — Resolve state

branch=$(git branch --show-current)
pr_json=$(gh pr view --json number,state,headRefName,baseRefName,url,reviewRequests,reviews 2>/dev/null || echo "")
  • If pr_json is empty → no PR yet → go to Phase 2 (create).
  • If PR exists and is OPEN → go to Phase 3 (request Copilot if absent, then monitor).
  • If PR is MERGED / CLOSED → report and stop; ask whether to open a new one.

Before creating, verify the branch is pushed (git rev-parse --abbrev-ref --symbolic-full-name @{upstream} succeeds) and is ahead of main.

Phase 2 — Create the PR (if missing)

Pre-fill title/body from commits when the branch has 1–3 commits; otherwise prompt the user once for a title. Always use a HEREDOC body with ## Summary and ## Test plan sections, per repo convention. Full patterns and the exact gh pr create invocation: references/creating-the-pr.md.

Phase 3 — Request Copilot reviewer (idempotent)

PR=$(gh pr view --json number -q .number)
# Skip if Copilot is already in reviewRequests OR has already reviewed
need_copilot=$(gh pr view $PR --json reviewRequests,reviews \
  --jq '(.reviewRequests + .reviews) | any(.login // .author.login | tostring | test("copilot"; "i")) | not')
if [ "$need_copilot" = "true" ]; then
  gh pr edit $PR --add-reviewer @copilot
fi

The exact bot login varies (copilot-pull-request-reviewer[bot] / Copilot). The case-insensitive test("copilot"; "i") match is intentional — don't hardcode an exact login.

Phase 4 — Monitor checks and Copilot review

Poll every 30 s, max 30 iterations = 15 min. Break early when both are done. Full polling pattern, jq queries, and "is Copilot done?" heuristics: references/monitoring-ci-and-copilot.md.

While polling, narrate progress in single-line updates ("iter 4/30: 3 checks running, copilot pending"). Do NOT print large JSON blobs to the user — those go to logs.

If the 15 min budget exhausts:

  • If checks are still running: report which jobs and proceed to analysis with what completed.
  • If Copilot is still pending: report and analyse CI-only; tell the user they can re-run /pr later to pick up the Copilot review.

Phase 5 — Analyse and report

Two analyses run in parallel; one merged report:

  1. CI failures — gh run view <id> --log-failed for each failed run, extract the error lines (look for FAIL, Error, Traceback, assert, lines ending with :[0-9]+: for compiler errors). Cap at 10 lines per failed step.
  2. Copilot inline comments — gh api repos/{owner}/{repo}/pulls/{N}/comments → for each comment, match the path against every .github/instructions/*.instructions.md applyTo glob and tag it with the matched skill(s).

Output format and severity heuristics: references/analyzing-results.md.

What this skill does NOT do

  • Does not push for the user (assumes branch is already pushed; tells the user to push if not).
  • Does not fix the issues Copilot raises — only surfaces them with the canonical-skill pointer so the user / next skill invocation can act.
  • Does not enable automatic Copilot review at the repo level — that's a one-time UI step (Settings → Rules → Rulesets).
  • Does not stream raw gh run view --log-failed output into the chat — extracts just the error lines.

References

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/pr-lifecycle-workflow-mrwak8yx/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/pr-lifecycle-workflow-mrwak8yx' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pr-lifecycle-workflow-mrwak8yx/download' --output '.skill-downloads/pr-lifecycle-workflow-mrwak8yx/SKILL.md.part' && mv '.skill-downloads/pr-lifecycle-workflow-mrwak8yx/SKILL.md.part' '.skill-downloads/pr-lifecycle-workflow-mrwak8yx/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/pr-lifecycle-workflow-mrwak8yx/SKILL.md' && test -s '.skill-downloads/pr-lifecycle-workflow-mrwak8yx/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/pr-lifecycle-workflow-mrwak8yx' '.claude/skills/pr'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/pr-lifecycle-workflow-mrwak8yx'

openskills read 'pr-lifecycle-workflow-mrwak8yx'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/pr-lifecycle-workflow-mrwak8yx/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills