Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

create-pr创建公关

Agent Skill

create-pr 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,398

周安装

56

GitHub Stars

公开资料未说明

下载量

452
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:create-pr(创建公关)
来源仓库:https://github.com/ulpi-io/skills
仓库路径:skills/create-pr
安装命令:
npx skills add https://github.com/ulpi-io/skills --skill create-pr
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ulpi-io/skills --skill create-pr

简介

用于创建和管理 GitHub Pull Request。

  • 提供标题、正文与变更区域的标准化模板。
  • 支持审稿人指派与里程碑设置。create-pr 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 适合协作开发与代码审查流程。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 使用时需已推送分支并具备 gh CLI 权限。

SKILL.md

Non-negotiable rules:

  1. Read the full diff against the real base branch before drafting the PR.
  2. Block on protected-branch usage, empty branch state, or conflict markers.
  3. If uncommitted changes exist, invoke commit first instead of creating a misleading PR.
  4. Push the branch before creating the PR.
  5. Keep PR creation user-driven. If title, scope, base, or reviewer intent is ambiguous, ask first.

Create PR

Inputs

  • $request: Optional PR guidance such as draft intent, reviewer hints, base branch, labels, or title direction

Goal

Create a PR that matches the actual branch changes and leaves the user with:

  • a correct base branch
  • an accurate title
  • a useful body
  • a pushed branch
  • a verified PR URL and state

Step 0: Confirm this is an explicit PR request

This skill is user-only.

Use it only when the user explicitly asks to create or open a PR.

If the request is really:

  • code review only, route to a review skill
  • commit creation only, route to commit
  • planning only, route to the planner

If reviewer assignment, labels, milestone, or base branch are ambiguous and matter to the request, use AskUserQuestion.

Success criteria: PR creation is explicitly requested and the intended PR shape is clear enough to proceed.

Step 1: Gather real branch context

Inspect the current branch before drafting anything:

  • current branch name
  • branch tracking state
  • uncommitted changes
  • base branch candidates
  • commits ahead of base
  • full diff against base

Rules:

  • read the actual diff, not just commit messages
  • determine the real base branch before classifying the PR
  • use Read on changed files when the diff summary is not enough to understand the change

Load references/pr-conventions.md for base-branch selection and PR classification heuristics when needed.

Success criteria: You know the branch, base, diff shape, and whether the branch is actually PR-ready.

Step 2: Validate branch readiness

Blockers:

  • on main, master, or develop
  • no commits relative to base
  • conflict markers in changed files

If uncommitted changes exist:

  • invoke the commit skill
  • then re-run branch context gathering before continuing

Warnings:

  • type or lint failures are warnings unless the user wants to stop and fix them first
  • breaking changes are not blockers, but they must be documented

Success criteria: The branch is in a state where a PR can be created honestly.

Step 3: Classify the PR from the actual diff

Determine:

  • type
  • scope
  • size
  • risk
  • whether breaking changes exist

Use:

  • branch name as a hint, not truth
  • changed paths and modules
  • commit messages only as supporting context
  • the full diff as the source of truth

Document breaking changes if any of these exist:

  • removed or renamed public exports
  • route or API contract changes
  • schema or migration changes
  • env var changes
  • major dependency changes

Load references/pr-conventions.md for:

  • classification heuristics
  • title rules
  • option flag mapping
  • blocking versus warning behavior

Success criteria: The PR is classified from the real code changes, not just branch naming.

Step 4: Run the narrowest relevant quality checks

Run checks that fit the changed surface and project tooling.

Typical checks:

  • typecheck
  • lint
  • conflict-marker scan

Rules:

  • conflict markers always block
  • other failures should be surfaced honestly to the user
  • do not fabricate passing status in the PR body
  • if the user asks to proceed with known non-blocking issues, say so explicitly in the final report

Success criteria: The PR reflects the actual readiness state of the branch.

Step 5: Draft the PR title and body

Create:

  • a Conventional Commit-style PR title
  • a body that explains what changed and how to review it

The body should cover:

  • summary
  • grouped change areas
  • breaking changes when present
  • specific test plan
  • optional notes for deployment, config, or dependency changes

Use:

  • references/pr-conventions.md for title and readiness rules
  • references/pr-body-examples.md only when you need example body shape

If the user explicitly provided title guidance, use it if it still matches the actual diff.

Success criteria: The title and body describe the full branch accurately and are reviewable.

Step 6: Push the branch and create the PR

Before creation:

  • ensure the branch is pushed
  • ensure upstream is set if needed

Then create the PR with gh pr create.

Support request-driven options such as:

  • draft
  • reviewer
  • assignee
  • label
  • milestone

Rules:

  • do not create the PR before the branch exists on remote
  • prefer gh over manual API calls
  • if gh is unavailable, stop and provide the user with the prepared title, body, and compare URL

Success criteria: The PR exists remotely or the user has the exact fallback material needed to create it manually.

Step 7: Verify and report

After creation, verify:

  • PR number
  • URL
  • title
  • state
  • draft status
  • base branch

Also report:

  • whether uncommitted changes remain
  • whether the branch is ahead of remote
  • whether any warnings were carried into the PR process

Success criteria: The user knows exactly what PR was created and any remaining branch caveats.

Guardrails

  • Do not create PRs proactively.
  • Do not let the model invoke this skill through SkillTool; this workflow is intentionally user-only.
  • Do not add paths:. This is a generic workflow skill.
  • Do not add context: fork. PR state must stay in the active workspace.
  • Do not keep giant readiness checklists, scorecards, or failure catalogs inline in SKILL.md.
  • Do not fabricate test status, branch status, or breaking-change absence.

When To Load References

  • references/pr-conventions.md Use for base-branch selection, classification heuristics, option parsing, and blocking rules.
  • references/pr-body-examples.md Use only when you need an example PR body shape for a similar request.

Output Contract

Report:

  1. PR number, URL, title, base, and state
  2. whether commit had to be invoked first
  3. the checks run and any warnings that remained
  4. any breaking changes documented
  5. remaining working-tree or branch state

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.85%
按下载量换算167

Claude

31.1%
按下载量换算141

Cursor

16.48%
按下载量换算74

Gemini CLI

9.95%
按下载量换算45

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills