Agent skill

Create PR

by yaklang in yaklang/yakit

为 Yakit 仓库一站式完成提 PR 流程:提交工作区改动、调用 code-review skill 评审、推送远端后在 yaklang/yakit 创建或更新 PR。当用户要求提 PR、提交 PR、创建 PR、发 PR、raise/submit/open PR、"create PR"、更新已有 PR,或使用 /create-pr 时触发。

AGPL-3.0Auto-check passedDevelopment

Install Create PR

skills CLI
$ npx skills add yaklang/yakit --skill create-pr -a claude-code

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

GitHub CLI
$ gh skill install yaklang/yakit create-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/yaklang/yakit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-pr .claude/skills/create-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
create-pr
GitHub stars
7.8k
Token cost
~1.6k tokens
SKILL.md length
555 words
Files
2 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
AGPL-3.0

At a glance

为 Yakit 仓库一站式完成提 PR 流程:提交工作区改动、调用 code-review skill 评审、推送远端后在 yaklang/yakit 创建或更新 PR。当用户要求提 PR、提交 PR、创建 PR、发 PR、raise/submit/open PR、"create PR"、更新已有 PR,或使用 /create-pr 时触发。

  • Works in 7 steps: 前置检查 → 处理工作区改动 → 代码评审(强制,推送前) → …
  • Tasks that involve Pull requests
  • SKILL.md covers 输入(均可选,可同时出现), 1. 前置检查, 2. 处理工作区改动 and 3. 代码评审(强制,推送前), plus 4 more sections
  • Calls git, gh and brew

What it does

Create PR is an agent skill from yaklang/yakit. 为 Yakit 仓库一站式完成提 PR 流程:提交工作区改动、调用 code-review skill 评审、推送远端后在 yaklang/yakit 创建或更新 PR。当用户要求提 PR、提交 PR、创建 PR、发 PR、raise/submit/open PR、"create PR"、更新已有 PR,或使用 /create-pr 时触发。

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/pr-examples.md`).

It sits in Development, covering Pull requests. It works with Git, Burp Suite and Go. The repository describes itself as: Cyber Security ALL-IN-ONE Platform. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “create PR”
  • “/create-pr”

Workflow steps

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

  1. 前置检查
  2. 处理工作区改动
  3. 代码评审(强制,推送前)
  4. 推送远端
  5. 生成 PR 标题与描述
  6. 合并方式选择
  7. 创建或更新 PR

What it can do on your machine

Read from SKILL.md and the folder at commit 87904ea. 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
    • brew
    • winget

    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

Create PR loads about 1.6k tokens when it runs, and up to ~5.1k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 555 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.1k

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 yaklang/yakit at commit 87904ea, republished under its AGPL-3.0 licence (© yaklang). 555 words, ~1,635 tokens.

Download SKILL.mdSave it as .claude/skills/create-pr/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
create-pr
description
为 Yakit 仓库一站式完成提 PR 流程:提交工作区改动、调用 code-review skill 评审、推送远端后在 yaklang/yakit 创建或更新 PR。当用户要求提 PR、提交 PR、创建 PR、发 PR、raise/submit/open PR、"create PR"、更新已有 PR,或使用 /create-pr 时触发。

create-pr

一站式:commit → code review → push → 创建/更新 PR。调用即授权 push / 创建 PR,不再逐步确认;commit 仍走 commit-msg 弹窗。不要整理历史 commit、改写远端、force push、合并 PR。

不支持 fork:origin 必须是 yaklang/yakit(PR 建在 --repo yaklang/yakit)。origin 指向个人 fork 时第 1 步停止,提示自行推送并用网页创建 PR。

输入(均可选,可同时出现)

从用户原文识别,不要追问、不要猜测、不要搜索:

  1. 合并方式:merge / squash / rebase 或「合并提交 / 压缩合并 / 变基合并」。有则直接用,不走自动规则。
  2. 关联:本仓库 issue(close / fix / ref #xxxx)与其它仓库 PR URL(如 yaklang 引擎)。仅用户明确提供时写入。都没有则「关联 Issue / PR」填 None。

1. 前置检查

  • git branch --show-current:在 master 上停止。
  • git remote -v:origin 必须是 yaklang/yakit,否则停止(fork 按上方提示)。
  • gh:command -v gh + gh auth status(PowerShell:Get-Command gh)。已装且已登录则继续;否则走下方降级,不要直接停止。
  • code-review skill 必须存在(第 3 步强制依赖;外部指定范围时直接执行、不弹框)。不存在则立即停止,不要自行评审——此时尚未 commit / push。
  • git fetch origin master;PR base 固定 master。
  • git status + git log origin/master..HEAD --oneline 摸底。无 commit 且工作区无改动 → 停止。
gh 降级(未安装或未登录)

AskUserQuestion 二选一(question 说明当前 gh 状态);Other 取消则停止:

  • 安装并登录 gh:macOS brew install gh;Windows winget install GitHub.cli(或 scoop / choco);Linux 提示官方安装。装完让用户自行 gh auth login(交互式,agent 不能代办),确认后回到第 1 步重检。安装或登录失败则停止。
  • 手动创建 PR:第 1–6 步照常,第 7 步改「手动模式」(不跑任何 gh)。

2. 处理工作区改动

git status(含未跟踪)。干净则跳过,不空提交。有未提交改动时不要直接提交,AskUserQuestion(概述如「3 个已修改 + 1 个未跟踪」);Other 取消则停止:

  • 提交为一个 commit:git add -A,生成一个 commit。优先 Skill 调用 commit-msg;会话无该 skill 时按其规范自行做(弹窗确认 → message 写临时文件 → git commit -F;type: subject、中文为主、72 字符内、不带 (#PR号),基于 diff 归纳)。终态核验:仅当 COMMITTED 且 git rev-parse HEAD 已前移、git diff --cached 为空才进第 3 步;CANCELLED / FAILED 或核验不符 → 停止整个流程,不得带着旧 HEAD 评审或推送。
  • stash 暂存:git stash push -u -m "create-pr: 暂存未提交改动"。本次 PR 不含这些改动;报告 stash 已创建,不要自动 stash pop。

3. 代码评审(强制,推送前)

对象:git diff origin/master...HEAD(第 2 步之后的最终 HEAD)。只读:只记录问题,不顺手修(含 P0)。

  • 评审开始记录 git rev-parse HEAD 完整 SHA。
  • 必须 Skill 调用 code-review,范围为本分支 vs origin/master(已指定范围,不弹框)。会话中途没有该 skill → 停止,不要自行评审。
  • 从报告提取:P0+P1 全部(警告不写入 PR)→「建议合并前修复的问题」;「三、合并结论」的结论(不通过 / 需要修复 / 可以合并)与统计行 →「代码评审结论」(必需)。每条问题记 文件:行号 + 一句话。结论只能来自实际 code-review 输出,不得编造。

4. 推送远端

  • 推送前再 git rev-parse HEAD,与第 3 步 SHA 一致才继续;不一致则停止。
  • 禁止裸 git push。执行 git push -u origin HEAD:refs/heads/<当前分支>(显式 origin;分支名含 shell 元字符时安全引用)。
  • 推送后:git ls-remote origin refs/heads/<当前分支> 的 OID == 本地 HEAD,否则停止。
  • push 被拒(远端有本地没有的提交):停止,不要 pull / rebase / force push。

5. 生成 PR 标题与描述

标题(git log origin/master..HEAD 全部 commit,不用分支名):type: subject,与 commit-msg 一致(中文为主、无句号、不带 (#PR号)、尽量 72 字符、中文按 2 计)。单 commit 用该标题;多 commit 归纳主语义(type:feat/fix/docs/style/perf/refactor/test/build/ci/chore)。

更新已有 PR:旧标题 == 分支名 → 换成总结标题;旧标题 ≠ 分支名 → 保留旧标题。

描述:先读 .github/PULL_REQUEST_TEMPLATE.md(不要默写),按模板填,可删 HTML 注释但保留全部小节。模板不存在时用 references/pr-examples.md 的约定结构;「合并方式」仍须三项 checkbox,不得写成单行。无法从 diff / log / 用户输入确认的信息标「待补充」,创建前向用户说明。正例与同步示例见该 references。

  • 改动类型:按 diff 主目的勾 - [x](与 commit type 一致)。
  • 🔗 关联 Issue / PR:用户明确提供的 issue(close / fix / ref #xxxx)与跨仓库 PR URL;都没有填 None。不要编造编号或链接。
  • 💡 背景与方案:原先问题 → 本次做法;基于全量 diff,不逐文件罗列。
  • 影响范围:用户可见行为变化;纯重构写「不改变用户可见行为」;UI 变化建议附截图。
  • 合并方式:勾选第 6 步选定的一项。

模板外追加(插在「影响范围」之后、「合并方式」之前):

markdown
## 代码评审结论

**结论:需要修复**(正确 6 项 / 问题 3 项(P0 1 项 / P1 2 项)/ 警告 2 项)

必需小节;放在「建议合并前修复的问题」之前。更新已有 PR 时每次覆盖重写。

markdown
## 建议合并前修复的问题

- [ ] `src/xxx.ts:123` <问题描述>

第 3 步全部 P0+P1;已修复 - [x]。无此类问题则省略整节。更新已有 PR 时该节累积保留(含已标注已修复的),不得因重生成描述而丢失;是否已修复以本次评审为准,同步规则见第 7 步。

Show full SKILL.md (253 more words)Show less

6. 合并方式选择

  1. 用户本次指定 → 直接用。
  2. 更新 OPEN PR 且用户未指定 → 保留旧描述「## 合并方式」已勾选的方式(gh pr edit --body 是整段替换)。无该小节或三项都未勾选 → 优先级 3。
  3. 自动(新建,或更新但旧描述无有效勾选):git log origin/master..HEAD --format='%an' 去重作者数 + commit 总数,从上到下:
顺序条件方式
1作者 ≥ 2,或 commit > 3merge
2commit = 1rebase
3commit 2–3 且同一作者squash

描述里勾选对应一项,保留三项完整文案(与模板一致):

markdown
## 合并方式

- [ ] Create a merge commit(保留完整提交历史)
- [x] Squash and merge(压缩为一条提交)
- [ ] Rebase and merge(线性历史)

判断示例见 references/pr-examples.md。

7. 创建或更新 PR

gh 可用时按本步;用户选了「手动创建 PR」则跳到文末「手动模式」。先查重,不要直接 create:

bash
gh pr view <当前分支> --repo yaklang/yakit --json number,url,state

动态文本(正文 / 标题)禁止内插进 shell:先写入系统临时目录下的临时文件(下文用 <pr-body-file> 代指),用 --body-file,用完删除。title 用单引号包裹并对内部单引号转义。

  • 已有 OPEN PR:不新建,gh pr edit 更新描述,且每次都必须带 --title(第 5 步智能替换后的最终标题;省略 --title 可能改掉标题):

    bash
    gh pr edit <PR number> --repo yaklang/yakit --title '<最终标题>' --body-file /tmp/pr-body.md

    更新前 gh pr view <PR number> --repo yaklang/yakit --json body --jq '.body' 取旧描述:

    • 改动类型:旧小节已有 - [x] → 原样迁移;全未勾或无该节才按第 5 步重判。
    • 关联 Issue / PR:旧内容非 None 则保留;本次用户又提供新关联则合并去重;旧为 None 且本次未提供才填 None。
    • 合并方式:第 6 步优先级 2。
    • 建议合并前修复的问题:必须先重跑第 3 步评审再同步:
      • 已在代码中修复(含旧「## P0 问题」历史条目):保留并标已修复,如 - [x] ~~<原问题>~~(✅ 已修复:<短哈希>),不得删除。
      • 已标「✅ 已修复」:原样保留(- [x])。
      • 仍未修复:原样保留;旧普通列表改为 - [ ];新问题 - [ ] 追加。
      • 旧无该节且本次也无 P0/P1:不生成该节。

    完成后报告:PR 链接、已更新描述、合并方式(沿用旧勾选 / 本次指定 / 自动)、评审结论与统计、关联信息、建议修复项及状态。

  • 已有 CLOSED / MERGED PR:不要更新、不要 reopen,按下方新建;新描述按第 5 步生成,不迁移旧 PR 历史。

  • 没有 OPEN PR(not found,或仅有 CLOSED / MERGED):

    bash
    gh pr create --repo yaklang/yakit --base master --head <当前分支> --title '<commit 总结标题>' --body-file /tmp/pr-body.md

    标题为第 5 步基于全部 commit 的 type: subject(多 commit 不照搬单条 message)。成功后报告:链接、标题、合并方式、评审结论与统计、关联信息、建议修复项(如有)。

  • create 报「A pull request already exists」:改 gh pr edit,同样必须带 --title(第 5 步最终标题),不要中断、不要再 create。

  • 回读验证:gh pr view <PR number> --repo yaklang/yakit --json title,body --jq '{title: .title, body: .body}'(编号:更新用查重结果,新建用 create 输出链接中的编号,避免旧 closed PR 干扰)。① 标题 == 第 5 步最终标题(新建 = 总结标题;更新 = 智能替换),不符则 gh pr edit ... --title '<最终标题>';② 描述含完整「## 合并方式」且勾选与第 6 步一致,不符则再 gh pr edit。两点都过才能向用户报告。

用户只要求生成描述不创建时,按实际要求裁剪步骤,不要强行走完全流程。

手动模式

前 6 步照常;本步不执行任何 gh、不写任何文件,标题与描述在对话框展示后结束(创建结果由用户自行处理):

  1. PR 标题:单独代码块(第 5 步总结标题)。
  2. 描述全文:代码块展示 markdown 源码(不截断、不渲染)。
  3. 创建入口:https://github.com/yaklang/yakit/compare/master...<当前分支>?expand=1。无法自动查重,提醒先看页面是否已有 PR。
  4. 读不到旧 PR 描述,默认不含旧勾选 / 关联 / 合并方式 / 累积问题。用户若把旧描述全文贴给 agent,按第 7 步同步规则合并;未提供则提醒在网页编辑器自行合并。

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

Files

SKILL.md and 1 other file (references) in .agents/skills/create-pr of yaklang/yakit.

  • SKILL.md
  • references/pr-examples.md

Open the folder on GitHubat commit 87904ea

Compare with similar skills

Create 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.

Create PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create PR this skillyaklang/yakit7.8k—~1.6kAutomated safety check: PassAGPL-3.0
Bktavivsinai/bitbucket-cli2321 repos~1kAutomated safety check: PassMIT
Publish Pull Request for taskctltaskctl/taskctl434—~979Automated safety check: PassGPL-3.0
Conventional Gitblackfyre/wga194—~843Automated safety check: PassApache-2.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k1 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Bkt

    avivsinai/bitbucket-cli

    Operate Bitbucket Cloud or Data Center repositories, pull requests, branches, issues, pipelines, permissions, and webhooks with bkt.

    232 GitHub starsUsed in 1 repo~1k tokens
    DevelopmentAuto-check passed
  • Publishes the current branch and opens or updates a GitHub pull request for the taskctl repo, after a pre-publish gate and with a description template matched to the change.

    434 GitHub stars~979 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Conventional Git

    blackfyre/wga

    Creates Conventional Commit messages and matching pull-request titles and branch names.

    194 GitHub stars~843 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • 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
  • 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
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed

More from yaklang/yakit

  • Code Review

    yaklang/yakit

    对 Yakit 仓库的代码改动做规范化 code review:按代码逻辑、TS 定义、UI 引用与 Props、CSS 样式、依赖版本、配置项六个维度审查,检查测试用例缺失,强制执行 tsc 类型检查与 vitest 测试验证,输出「结果汇总 / 明细解释 / 合并结论」三块报告,经用户确认后写入文件。当用户要求 review、审查、评审代码改动,或在提交、合并、提 PR…

    7.8k GitHub stars~1.4k tokensUpdated today
    Auto-check: notes
  • Commit Msg

    yaklang/yakit

    为 Yakit 仓库完成一次本地提交:确定提交范围(暂存区优先,空则弹框确认)、基于 diff 归纳一行符合仓库风格的 message、commit 前弹窗确认、执行 git commit(不推送)。只要 message 时仅输出文本。用户说「提交」「commit 代码」或输入 /commit-msg,或被 create-pr 等 skill 调用时使用。

    7.8k GitHub stars~559 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Create PR

What does Create PR do?

为 Yakit 仓库一站式完成提 PR 流程:提交工作区改动、调用 code-review skill 评审、推送远端后在 yaklang/yakit 创建或更新 PR。当用户要求提 PR、提交 PR、创建 PR、发 PR、raise/submit/open PR、"create PR"、更新已有 PR,或使用 /create-pr 时触发。. Create PR is an agent skill from yaklang/yakit.

When should I use Create PR?

Create PR fits situations like: tasks that involve Pull requests.

How do I install Create PR in Claude Code?

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

How do I install Create PR in Codex?

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

Can I use Create 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 yaklang/yakit --skill create-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/create-pr, .gemini/skills/create-pr, .github/skills/create-pr and .opencode/skills/create-pr in your project.

What does Create PR need to run?

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

Does Create 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 Create 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 Create PR use?

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

How many tokens does Create PR use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.

What are the alternatives to Create PR?

Skills that share tags, products or a category with Create PR: Bkt (avivsinai/bitbucket-cli, 232 stars), Publish Pull Request for taskctl (taskctl/taskctl, 434 stars), Conventional Git (blackfyre/wga, 194 stars) and Finishing a Development Branch (obra/superpowers, 296k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create PR?

yaklang (a GitHub organization) maintains it in yaklang/yakit, which has 7,792 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 8, 2026.

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