A skill your agent uses when the user invokes /pr or asks to push changes and open a pull request, after commits are ready to be pushed to a remote branch and merged into the main branch.

MITAuto-check passedDevelopment

Install PR

skills CLI
$ npx skills add ZhangShenao/harness9 --skill pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ZhangShenao/harness9 pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ZhangShenao/harness9.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pr .claude/skills/pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr
GitHub stars
141
Used in
1 other repo
Token cost
~423 tokens
SKILL.md length
129 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user invokes /pr or asks to push changes and open a pull request, after commits are ready to be pushed to a remote branch and merged into the main branch.

  • Works in 6 steps: 了解当前分支状态 → 确定目标分支 → 推送到远程 → …
  • The user invokes /pr
  • SKILL.md covers Overview, 前置条件检查, 执行步骤 and 常见错误
  • Calls git and gh

What it does

PR is an agent skill from ZhangShenao/harness9. Use when the user invokes /pr or asks to push changes and open a pull request, after commits are ready to be pushed to a remote branch and merged into the main branch.

Its SKILL.md is about 420 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. The repository describes itself as: Local-First · 轻量级 · 功能完备 · 生产可用的通用 Agent 框架. The licence is MIT.

When your agent uses it

  • The user invokes /pr
  • Asks to push changes and open a pull request
  • After commits are ready to be pushed to a remote branch and merged into the main branch

Example prompts

  • “/pr”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. 了解当前分支状态
  2. 确定目标分支
  3. 推送到远程
  4. 起草 PR 内容
  5. 创建 Pull Request
  6. 输出结果

What it can do on your machine

Read from SKILL.md and the folder at commit f73d0f1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PR loads about 423 tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 129 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~423

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ZhangShenao/harness9 at commit f73d0f1, republished under its MIT licence (© ZhangShenao). 129 words, ~423 tokens.

Download SKILL.mdSave it as .claude/skills/pr/SKILL.md (or your agent's skills folder).
name
pr
description
Use when the user invokes /pr or asks to push changes and open a pull request, after commits are ready to be pushed to a remote branch and merged into the main branch.

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. 了解当前分支状态
bash
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. 若无法获取,依次尝试 main → master
  3. 仍不确定时,询问用户
3. 推送到远程
bash
git push -u origin <当前分支名>

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

4. 起草 PR 内容

根据 git log 和 git diff 的输出,整理:

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

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

bash
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)不强制推送,提示用户检查远程分支状态

© ZhangShenao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/pr of ZhangShenao/harness9.

Open the folder on GitHubat commit f73d0f1

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in ZhangShenao/harness9, which our catalogue first saw on October 7, 2026.

Compare with similar skills

PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR this skillZhangShenao/harness91411 repos~423Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Check PRonyx-dot-app/onyx32k2 repos~2.3kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed

More from ZhangShenao/harness9

  • Architecture Overview

    ZhangShenao/harness9

    A skill your agent uses when asked about harness9 architecture, module design, or how components interact — explains the system design

    141 GitHub stars~717 tokensUpdated today
    Auto-check passed
  • Debugging Guide

    ZhangShenao/harness9

    A skill your agent uses when debugging Go errors, test failures, or unexpected behavior — step-by-step diagnosis approach

    141 GitHub stars~563 tokensUpdated today
    Auto-check passed
  • Go Coding Standards

    ZhangShenao/harness9

    A skill your agent uses when writing or reviewing Go code — explains harness9 project coding conventions and patterns

    141 GitHub stars~719 tokensUpdated today
    Auto-check passed
  • Commit

    ZhangShenao/harness9

    A skill your agent uses when the user invokes /commit or asks to commit changes, after a code review has been completed and the changes are confirmed ready to stage and commit to git.

    141 GitHub stars~327 tokensUpdated today
    Auto-check: notes
  • Cr

    ZhangShenao/harness9

    A skill your agent uses when the user invokes /cr, requests a code review, or before committing to verify correctness, security, and quality of new or modified code in the working tree.

    141 GitHub stars~304 tokensUpdated today
    Auto-check: notes
  • Autodev

    ZhangShenao/harness9

    Feature auto-development — clarify requirements, generate spec, dispatch dev sub-agent to implement and merge into current branch

    141 GitHub stars~606 tokensUpdated today
    Auto-check: notes

Categories

Questions about PR

What does PR do?

A skill your agent uses when the user invokes /pr or asks to push changes and open a pull request, after commits are ready to be pushed to a remote branch and merged into the main branch. PR is an agent skill from ZhangShenao/harness9. Use when the user invokes /pr or asks to push changes and open a pull request, after commits are ready to be pushed to a remote branch and merged into the main branch.

When should I use PR?

PR fits situations like: the user invokes /pr; asks to push changes and open a pull request; after commits are ready to be pushed to a remote branch and merged into the main branch.

How do I install PR in Claude Code?

Run `npx skills add ZhangShenao/harness9 --skill pr -a claude-code`. Or copy the skill folder (skills/pr in ZhangShenao/harness9) into .claude/skills/pr in your project. Claude Code loads it when a task matches its description.

How do I install PR in Codex?

Run `npx skills add ZhangShenao/harness9 --skill pr -a codex`. Or copy the skill folder (skills/pr in ZhangShenao/harness9) into .agents/skills/pr in your project. Codex loads it when a task matches its description.

Can I use PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ZhangShenao/harness9 --skill pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr, .gemini/skills/pr, .github/skills/pr and .opencode/skills/pr in your project.

What does PR need to run?

Going by SKILL.md and its folder, PR needs the command-line tools its instructions call (git and gh).

Does PR access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does PR use?

PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR use?

About 423 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR?

Skills that share tags, products or a category with PR: Finishing a Development Branch (obra/superpowers, 296k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars), Check PR (onyx-dot-app/onyx, 32k stars) and Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR?

ZhangShenao (a GitHub user) maintains it in ZhangShenao/harness9, which has 141 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: ZhangShenao/harness9 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.