← Marketplace
DevOps & Shipping

open-prv0.1.0

Pre-flight checks and PR creation workflow: run tests, open a PR, code review, and check CI

By harnessprotocolApache-2.0Source ↗
OfficialVerified

Install

Add the marketplace once, then install the plugin:

/plugin marketplace add harnessprotocol/harness-kit
/plugin install open-pr@harness-kit
pull-requestci-cdtestingworkflow

Environment

GH_TOKENrequiredsensitive

GitHub personal access token — used by gh CLI for PR creation and CI status checks

Used when: All open-pr operations require GitHub access

Security & permissions

Verified1 info

Declared capabilities

Network accessNo
File writesNo
Environment variablesGH_TOKEN
External URLsNone
Filesystem patternsNone

Scan observations

  • info.claude-plugin/plugin.json

    Plugin declares access to sensitive environment variable: GH_TOKEN

    Ensure GH_TOKEN is only used for its intended purpose and never sent to untrusted external services.

Scanned at build time from source. How trust signals work →

Skill1

open-prskills/open-pr/SKILL.md
open-pr

Open PR

A structured PR preparation workflow: tests → create PR → code review → CI → hand off to merge.

Announce at start: "I'm using the open-pr skill to get this PR ready."


Step 1: Pre-flight — Run Local Tests

Run the test suite before touching anything else. Detect the right command from project files:

IndicatorCommand
CLAUDE.md test commandUse that (takes precedence over all below)
go.modgo test ./...
package.jsonnpm test or yarn test
pyproject.toml / setup.pypytest
Cargo.tomlcargo test

If tests fail: Stop. Show the failures clearly. Don't proceed — fix them or ask the user how to handle. Do not skip or bypass test hooks.

If tests pass: Continue.


Step 2: Check for Existing PR

gh pr view --json number,url,state 2>/dev/null

Step 3: Create the PR

Push the branch

git push -u origin $(git branch --show-current)

Title

Use the most meaningful commit message as a starting point, cleaned up to be concise. Follow conventional commit format (feat:, fix:, refactor:, etc.) if the repo uses it — check recent commits with git log --oneline -10.

Auto-detect labels

Infer labels from the branch name and commits — apply with --label if the label exists in the repo:

PatternLabel
fix/, bug/, "fix" in commitsbug
feat/, feature/enhancement
refactor/, chore/refactor
docs/documentation

Skip labels that don't exist in the repo rather than erroring.

PR description template

Fill in every section based on the actual changes — no unfilled placeholders:

## Summary
<!-- What this PR does and why — 2-4 sentences. Lead with intent, not implementation. -->

## Changes
<!-- Key changes. Be specific — not "updated code" but what and why. -->
-

## Test Plan
<!-- How this was verified -->
- [ ] Local tests pass
- [ ] CI checks pass
- [ ] <any manual or integration steps>

## Notes
<!-- Edge cases, follow-ups, known limitations, or anything a reviewer should know -->

Create

gh pr create \
  --title "<title>" \
  --body "$(cat <<'EOF'
<filled-template>
EOF
)"

Leave --reviewer and --assignee unset.


Step 4: Code Review

Invoke the review skill (use the Skill tool) to review all changes in this PR.

The review should cover:

  • Baseline: correctness, security, error handling, performance, naming clarity
  • Test coverage: flag any new functionality that lacks tests
  • Codebase-specific: scan CLAUDE.md for any ## Code Review, ## Standards, or ## Gotchas sections and incorporate those requirements

After the review, present a clear report:

Code Review Report
──────────────────
[MUST FIX] <issue> — <file>:<line>
[SUGGESTION] <issue>
No blocking issues found.

If MUST FIX items: Address them, commit, push. Once resolved, continue to Step 5.

If only suggestions: Note them for the user to follow up post-merge at their discretion.


Step 5: CI Status

gh pr checks

All passing: Continue.

Failing:

  1. Read the failure output — identify root cause
  2. Quick fix (lint, formatting, import, typo): Fix it, commit, push, wait for CI to rerun, then continue
  3. Complex failure (logic error, architecture issue, flaky infra): Stop and report clearly:

    "CI is failing due to [X]. This needs a dedicated fix before merging — let's plan it out."

Never proceed to merge with failing CI.


Step 6: Report and Hand Off

Once tests, review, and CI are all green, report the PR status and suggest the next step:

PR #<N> is ready to merge.
──────────────────────────
Title:  <title>
Branch: <branch> → <base>
URL:    <url>

✓ Local tests pass
✓ Code review clean (or: N suggestions noted for follow-up)
✓ CI passing

Run /merge-pr to squash merge and clean up.

Do not merge, rebase, or push anything further. Hand off cleanly.


Quick Reference

StepActionBlock on failure?
1. Local testsRun test suiteYes — fix first
2. PR checkExists?Skip to review
3. Create PRPush + gh pr create
4. Code reviewreview skillYes for MUST FIX
5. CIgh pr checksYes — fix or stop
6. ReportPR summary + /merge-pr suggestion

Rules

Never:

  • Proceed with failing tests or CI
  • Merge, rebase, or force-push anything
  • Use --no-verify to bypass hooks
  • Leave PR template sections unfilled
  • Set reviewer or assignee

Always:

  • Address MUST FIX review items before handing off
  • Suggest /merge-pr at the end