pr

pr is a skill for Claude Code, Codex from ZhangShenao/harness9. It costs 38 tokens per session (777 once invoked), scanned A, original, MIT.

A workflow for pushing committed changes to a remote Git branch and opening a draft pull request on GitHub. A pull request is a request for others to review and merge code.

In plain words
What is it for?
Use it after committing work to verify the branch, push it, prepare a summary and test plan, and create a draft pull request.
Why use it?
It organizes the checks and information needed to share changes safely for review.

Skill for Claude CodeCodex

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 skills/zhangshenao/harness9/pr
Any agent
npx skills add ZhangShenao/harness9 --skill pr
Clone the repo
git clone --depth 1 https://github.com/ZhangShenao/harness9

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhangshenao/harness9/pr.svg)](https://agentmods.dev/skills/zhangshenao/harness9/pr)
Your own site
<a href="https://agentmods.dev/skills/zhangshenao/harness9/pr"><img src="https://agentmods.dev/badge/skills/zhangshenao/harness9/pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 777 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.1 $0.00038 $0.00777
Opus 5 $0.00019 $0.00388
Sonnet 5 $0.00008 $0.00155
Haiku 4.5 $0.00004 $0.00078

Measured 5d ago against content hash b8d675fecd0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d ago.

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.

skills/pr/SKILL.md · 88 lines

What it actually says

pr — Push & Pull Request

Overview

将本地提交推送到远程分支,并使用 gh CLI 创建 Pull Request,目标为仓库主分支。

默认行为:所有 PR 均以 Draft 模式创建(--draft),避免误操作导致未经审查的代码被直接 merge。需要正式发起 Review 时,由用户在 GitHub 上手动将 Draft 转为 Ready for Review。

前置条件检查

  1. 确认本次对话中已执行过 /commit,且有新提交未推送
  2. 确认当前分支不是 main / master(若在主分支,停止并提示用户切换到功能分支)
  3. 确认 gh CLI 已登录:gh auth status

执行步骤

1. 了解当前分支状态

git branch --show-current          # 当前分支名
git log --oneline origin/HEAD..HEAD  # 待推送的提交列表
git diff origin/HEAD...HEAD --stat   # 本次 PR 涉及的文件变更

2. 确定目标分支

按以下顺序判断:

  1. 仓库默认分支(gh repo view --json defaultBranchRef -q .defaultBranchRef.name
  2. 若无法获取,依次尝试 mainmaster
  3. 仍不确定时,询问用户

3. 推送到远程

git push -u origin <当前分支名>

若远程已有同名分支且有分歧,不使用 --force,先告知用户手动处理冲突。

4. 起草 PR 内容

根据 git loggit diff 的输出,整理:

  • 标题:70 字符以内,描述本次变更的核心目的
  • 正文:包含变更摘要(2-4 条要点)和测试计划

5. 创建 Pull Request

始终使用 --draft 标志,避免误操作导致 PR 被直接 merge。

gh pr create \
  --draft \
  --base <目标分支> \
  --title "<PR 标题>" \
  --body "$(cat <<'EOF'
## Summary
- <要点 1>
- <要点 2>

## Test Plan
- [ ] <测试项 1>
- [ ] <测试项 2>
EOF
)"

禁止在 PR 正文中添加任何 AI 工具相关的标注,例如 🤖 Generated with Claude Code 或类似内容。

6. 输出结果

返回 PR URL,告知用户 PR 已创建成功。

常见错误

问题 处理
gh 未登录 提示用户执行 ! gh auth login
当前分支无新提交 告知用户没有可推送的内容,建议先执行 /commit
该分支已存在 PR 使用 gh pr view 查看现有 PR,提示用户是否需要更新
推送被拒绝(non-fast-forward) 不强制推送,提示用户检查远程分支状态
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. 5d ago First seen · 88 lines · 38 tokens per session scan A b8d675fecd0d

Subscribe to this mod's changes

pr is a skill published in the GitHub repository ZhangShenao/harness9 (137 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 777 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens