create-pr

create-pr is a skill for Claude Code from astordu/qoderharness. It costs 57 tokens per session (1,442 once invoked), scanned A, original, MIT.

A workflow for creating a GitHub Pull Request or GitLab Merge Request from a branch that has already been pushed. It checks the complete branch range and evidence, asks for confirmation, and then creates the request.

In plain words
What is it for?
Use it to check remotes and authentication, compare the branch with its target, generate a review description, and create the PR or MR only after the user confirms.
Why use it?
It prevents duplicate requests and avoids creating one from stale or unsynchronised local changes. It also keeps implementation, pushing, review fixes, and merging outside its scope.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to check remotes and authentication, compare the branch with its target, generate a review description, and create the PR or MR only after the user confirms.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/astordu/qoderharness/create-pr
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.

Any agent
npx skills add astordu/qoderharness --skill create-pr
Clone the repo
git clone --depth 1 https://github.com/astordu/qoderharness

Made for: Claude Code.

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 create-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/astordu/qoderharness/create-pr/github.svg)](https://agentmods.dev/skills/astordu/qoderharness/create-pr)
Your own site
<a href="https://agentmods.dev/skills/astordu/qoderharness/create-pr"><img src="https://agentmods.dev/badge/skills/astordu/qoderharness/create-pr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for create-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/astordu/qoderharness/create-pr"><img src="https://agentmods.dev/badge/skills/astordu/qoderharness/create-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,442 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00057 $0.01442
Opus 5.5 $0.00023 $0.00577
Sonnet 5.5 $0.00011 $0.00288
Haiku 4.5 $0.00006 $0.00144

Measured 23d ago against content hash 8ab2fa03819f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-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 23d 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.

.qoder/skills/create-pr/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

目标

由用户主动发起一个供人类审查的 PR/MR。完整变更范围是目标分支与远端源分支的 merge-base 到远端源分支头;不要复用某一次 push 的 before SHA。

本技能负责:

  1. 检查平台、分支、远端同步状态和既有 PR/MR。
  2. 计算完整 PR 范围并收集 commits、issues 和验证证据。
  3. 调用 /pr 生成简洁的 PR/MR Body。
  4. 展示标题、范围和 Body,获得用户确认后创建 PR/MR。

本技能不负责实现需求、修复 Code Review、自动 push 或合并。

流程

1. 确定平台与参数

根据 origin URL 判断平台:

  • GitHub 使用 gh。
  • GitLab 使用 glab。
  • 无法可靠判断时询问用户,不要猜测。

读取用户提供的目标分支、Draft 状态、Reviewer 等参数。用户未指定目标分支时,优先使用 origin/HEAD 指向的默认分支;仍无法确定时再询问。

确认平台 CLI 已安装且认证有效。认证失败时停止,不要尝试修改凭据。

2. 检查本地与远端状态

执行 git fetch origin,然后确定:

CURRENT_BRANCH=$(git branch --show-current)
REMOTE_HEAD="origin/$CURRENT_BRANCH"
REMOTE_BASE="origin/$TARGET_BRANCH"

必须满足:

  • 当前处于普通本地分支,而不是 detached HEAD。
  • 当前分支不是目标分支。
  • 工作区和暂存区没有未提交修改。
  • REMOTE_BASE 和 REMOTE_HEAD 都存在。
  • 本地 HEAD 与 REMOTE_HEAD 指向同一个 commit。

如果本地领先、落后或与远端分叉,停止并说明差异。不要自行执行 git push、git pull、rebase、merge 或强制同步。PR/MR 描述必须以服务器实际收到的远端源分支为准。

3. 防止重复创建

检查当前源分支是否已经存在 open PR/MR:

  • GitHub:使用 gh pr list --head "$CURRENT_BRANCH" --state open。
  • GitLab:使用 glab mr list --source-branch "$CURRENT_BRANCH"。

如果已经存在,停止创建并返回现有链接。只有用户明确要求更新描述时,才重新调用 /pr 并更新已有 PR/MR;不要创建重复项。

4. 计算完整 PR 范围

使用远端目标分支和远端源分支:

PR_BASE=$(git merge-base "$REMOTE_BASE" "$REMOTE_HEAD")
git diff "$PR_BASE"..."$REMOTE_HEAD"
git log "$PR_BASE".."$REMOTE_HEAD" --oneline

验证 PR_BASE 是有效 commit 且 diff 非空。这个范围代表整个分支相对目标分支的变化,不是最后一次 push 的变化。

从完整 commit message 中提取所有 issue 引用。根据平台使用 gh issue view 或 glab issue view 读取需求;已经关闭的 issue 仍然属于 PR 的需求来源。

5. 收集真实证据

读取仓库已有的测试、lint、typecheck、覆盖率和 CI 配置。使用已有输出或实际执行适合当前项目的验证命令。

  • 不把占位 echo 当作测试证据。
  • 不声称未执行的检查已经通过。
  • UI 变化且可以获取截图时,优先提供 Before/After 截图。
  • 无法获得某项证据时,在 Body 中明确说明,不要伪造。

6. 调用 /pr

把以下上下文交给 /pr:

  • 目标分支、源分支、PR_BASE 和远端源分支头。
  • git diff "$PR_BASE"..."$REMOTE_HEAD" 的完整改动范围。
  • git log "$PR_BASE".."$REMOTE_HEAD" 的 commits。
  • 所有关联 issues 的规格说明。
  • 实际验证结果和已知风险。

使用 /pr 的 Summary、Evidence、Merge Danger 结构生成 Body。标题应简洁概括整个 PR,而不是只描述最后一个 commit。

Read the full file on GitHub · 149 lines

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. 23d ago First seen · 149 lines · 57 tokens per session scan A 8ab2fa03819f

Subscribe to this mod's changes

create-pr is a skill published in the GitHub repository astordu/qoderharness (38 stars, last pushed 23d ago), licensed MIT. It adds 57 tokens to every session and 1,442 once invoked, about $0.0002 per session on Opus 5.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-10-05.