pr

A command that opens a GitHub pull request, usually as a draft, while following the project's team conventions. A pull request is a proposed code change submitted for review before merging.

In plain words
What is it for?
Use it after earlier planning, development, and testing gates pass to infer a ticket ID, compose the request, and publish it through GitHub.
Why use it?
It removes repetitive preparation and helps ensure the branch, required workflow checks, title, and description follow the project's rules.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/pierry/harness-kit/pr
Clone the repo
git clone --depth 1 https://github.com/Pierry/harness-kit

Made for: Claude Code.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 794 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00794
Opus 5 $0.00008 $0.00397
Sonnet 5 $0.00003 $0.00159
Haiku 4.5 $0.00002 $0.00079

Measured yesterday against content hash 24b2380cde4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/sse/pr.md · 66 lines

What it actually says

Open Pull Request. Follow .claude/agents/staff-software-engineer/guides/pipeline.md for retry, approval, publish, and .claude/shared/pipeline-pattern.md for inputs (resolve-mark-proceed) and eval (adversarial).

Print header card before opening and footer card after gh returns. Format: .claude/scripts/stage-card.md.

Prerequisites:

  • All previous gates passed (plan approved, dev approved, test approved).
  • Branch pushed to origin with current changes.

Before opening, write the phase start marker by running this script. Do NOT inline date/printf (command-substitution + redirect always trips the permission prompt):

.claude/scripts/marker.sh start .claude/runtime/outputs/sse/.markers/{feature_id}.pr-generate.start

Read:

  • .claude/agents/staff-software-engineer/guides/commit-style.md
  • latest plan and dev outputs (for body content)

Infer the ticket id from the branch name (e.g., feat/PROJ-123-foo -> PROJ-123), else from the PRP/plan/intake frontmatter or commit messages. If none yields one, mark NOT FOUND - NEEDS REVIEW: ticket id in the record and open the PR without it. Do NOT ask the user. Never call Jira API.

Compose:

  • Title: conventional commit prefix + short description (e.g., feat(PROJ-123): add timezone-aware deadline check)
  • Body: links to PRD/PRP, summary, test plan checklist
  • Draft: yes by default unless user passes --ready

Open via gh pr create --draft --title "..." --body "...".

Save .claude/runtime/outputs/sse/pr/{feature_id}.md with:

  • pr url
  • title
  • draft status
  • summary
  • test plan checklist
  • refs (plan + dev paths)

Document gates (run on saved record):

  • Sensor: .claude/agents/staff-software-engineer/sensors/pr-structure.md (auto-run by post-write hook)
  • Eval: .claude/agents/staff-software-engineer/evals/pr-quality.md (threshold 8.0)

Run the evals adversarially: dispatch a fresh evaluator via the Task tool (subagent_type: general-purpose) that did not author this PR record. Hand it only the artifact path and the one rubric path; it scores against the rubrics and reports weighted totals plus the low-scoring dimensions. Below threshold (8.0) retries per pipeline.md, regenerating only the flagged dimensions.

Append approval marker only when sensor passes and pr-quality eval is >= 8.0. Append with the Edit tool, not Bash: post-eval-sse.sh fires on Edit, and a Bash append skips token accounting and the score log. Keep score= in the shape, phase-log.py only parses markers that carry it:

<!-- approved: {YYYY-MM-DD} score={N} ready-for-handoff: true -->

Reply with this exact shape:

PR opened: {url}
  title:   {title}
  draft:   {yes|no}
  sensors: pr-structure ok
  eval:    pr-quality {N}/10
  guides:  commit-style.md
  refs:    plan/{feature_id}.md, dev/{feature_id}.md
  next:    request review (if draft, mark ready when checks pass)

After replying, auto-invoke /sse:pr-monitor so session watches PR for merge with backoff polling. Skip if user passed --no-monitor or PR already MERGED.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 66 lines · 15 tokens per session scan A 24b2380cde4e

Subscribe to this mod's changes

pr is a command published in the GitHub repository Pierry/harness-kit (3 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 794 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.