Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计提醒

create-pr创建公关

Agent Skill

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

总安装

1,458

周安装

62

GitHub Stars

公开资料未说明

下载量

511
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/morphet81/cheat-sheets --skill create-pr

简介

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。

  • 适合围绕代码变更、仓库状态和协作事项进行整理。
  • 建议结合原始 README 进一步验证具体用法和功能边界。
  • 使用前需确认权限范围和是否涉及文件读写或命令执行。
  • create-pr 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Push the current branch and create a GitHub pull request. When the branch name contains a JIRA ID and the ticket can be loaded, the PR title and description follow the ticket. When there is no JIRA ID or the ticket cannot be fetched, still push the branch, propose several PR title options for the developer to choose from (or a custom title), then create the PR.

Usage:

  • /create-pr - Push and create a draft PR
  • /create-pr --no-draft - Push and create a ready-for-review PR

Instructions:

  1. Check prerequisites (GitHub — always):

- GitHub CLI (gh): Run gh --version. If not found, display the following message and STOP: ` ## Missing Prerequisite: GitHub CLI The gh command is not installed. This skill requires the GitHub CLI for repository operations. Install it from: https://cli.github.com/ - **GitHub CLI authentication:** Run gh auth status. If not authenticated, display the following message and **STOP**: ## Missing Prerequisite: GitHub CLI Authentication The GitHub CLI is not authenticated. Please run gh auth login to authenticate before using this skill. `

  1. Parse options:

- If $1 is --no-draft, the PR will be created as ready for review - Otherwise (default, no arguments), the PR will be created as a draft

  1. Get the current branch and extract the JIRA ID:

- Run git branch --show-current to get the current branch name - Extract the JIRA ID by matching the pattern [A-Z][A-Z0-9]+-[0-9]+ (e.g., PROJ-123, AB-1, MYAPP-4567) - The JIRA ID can appear anywhere in the branch name (e.g., fix/proj-123, feat/PROJ-123, PROJ-123-some-description) - The match should be case-insensitive — normalize the extracted ID to uppercase for the JIRA API lookup - If no JIRA ID is found, continue without stopping — you will use the no-JIRA-ticket path after pushing (see step 7)

  1. Fetch JIRA ticket details (only if a JIRA ID was found in step 3):

- Atlassian CLI (acli): Run acli auth status to check if the CLI is installed and authenticated. - If the command is not found, display the following message and STOP: ` ## Missing Prerequisite: Atlassian CLI The acli command is not installed. A JIRA ID was found in the branch name; install the CLI to load the ticket, or rename the branch to remove the JIRA ID if you want a PR without JIRA. Install it with: brew tap atlassian/acli && brew install acli - If the command fails with an authentication error, display the following message and **STOP**: ## Missing Prerequisite: Atlassian CLI Authentication The Atlassian CLI is not authenticated. Please run acli auth login to authenticate, or fix the branch/ticket access before continuing. - Use the Atlassian CLI to retrieve the issue by its JIRA ID: acli jira workitem view <JIRA-ID> --fields summary,description,issuetype --json - If the command succeeds, extract **summary**, **description**, **issue type** (Bug, Story, Task, etc.) — you have **JIRA context** for step 7 - If the command fails (ticket missing, permission, network, etc.), inform the developer briefly and continue on the **no-JIRA-ticket path** in step 7 (do **not** stop). You may still know the raw JIRA-ID` string for an optional link in the description if you can form a correct browse URL; otherwise omit it

  1. Determine the base branch:

- Check if a .agent file exists in the current directory - If it exists, read it and look for a baseBranch=<value> line to extract the base branch - Use AskUserQuestion to let the developer choose the base branch: - If a base branch was found in .agent: first option is that branch with "(from.agent)" suffix, second option is main (if different) - If no .agent file or no baseBranch key: first option is main - The developer can type a different branch name via the "Other" option if the PR targets a different base branch

  1. Push the branch: The push strategy depends on whether the PR is a draft or ready for review: If creating a draft PR (no --no-draft option): If creating a ready-for-review PR (--no-draft was passed):

- Run git push -u origin <branch-name> --no-verify - Since this is a draft PR, pre-push checks can be skipped — they will run in CI and the developer will address any issues before marking the PR as ready - If the push fails, show the error and STOP - Run git push -u origin <branch-name> - If the branch is already up to date on the remote, that's fine — continue to the next step - If the push fails due to a pre-push hook (look for signs like husky, pre-push, hook script output, or interactive prompts in the error output): a) Offer to bypass with --no-verify: b) If the developer chooses --no-verify: c) If the developer chooses to resolve the hook: - Use AskUserQuestion to ask the developer: The push was blocked by a pre-push hook. Would you like to bypass it with --no-verify? - Options: Yes — push with --no-verify and No — resolve the pre-push hook - Run git push -u origin <branch-name> --no-verify - IMPORTANT: Force the PR to be created as a draft regardless of --no-draft. Since pre-push checks were skipped, the PR should not be marked as ready for review. - If this push also fails, show the error and STOP - Show the full pre-push hook output to the developer so they can see what is being asked or what failed - If the hook output contains a prompt or question (e.g., "Do you want to continue? [y/n]"), present the options to the developer using AskUserQuestion and use their answer to interact with the hook - Re-run git push -u origin <branch-name> after resolving - If the push still fails, show the error and STOP - If the push fails for any other reason (not a pre-push hook), show the error and STOP

  1. Create the pull request: If you have JIRA context from step 4 (successful fetch): If you do not have JIRA context (no JIRA ID in branch, or fetch failed in step 4): Shared gh pr create behavior:

- Build the PR title using the commit prefix convention based on issue type, followed by a concise summary derived from the JIRA ticket summary: - Bug → fix: <summary> (e.g., fix: resolve null pointer in user lookup) - All other types → feat: <summary> (e.g., feat: add bulk export for reports) - The summary part should be lowercase, imperative mood, and concise - Build the PR description from the JIRA ticket details: - Start with a ## Summary section with a brief description based on the JIRA ticket description - Add a ## JIRA section with a link to the ticket: [PROJ-123](https://<site>.atlassian.net/browse/PROJ-123) - Run gh pr create with that title and body (see below for shared flags) - Gather hints: branch name (without remote prefixes), and the latest commit subject (e.g. git log -1 --pretty=%s); optionally the first line of the commit body - Use AskUserQuestion so the developer chooses a PR title before gh pr create. Present at least three distinct options, for example: - A conventional title derived from the branch slug (imperative, lowercase phrase after feat:, fix:, or chore: — pick fix: if the branch suggests a bugfix, else prefer feat: unless the change is clearly chore/docs-only, then chore:) - A title based on the latest commit subject (adjust to conventional form if needed) - A shorter or alternative wording - Plus an option for the developer to enter a custom title (free text), if your tool supports it - After the developer selects a title, build the PR description: - ## Summary — brief explanation from the branch name and recent commit message(s); if a JIRA ID was known but the ticket could not be loaded, you may add a sentence noting the intended ticket key - Omit the ## JIRA section unless you have a reliable browse URL for a known key - Run gh pr create with the chosen title and that body - Use --draft flag unless --no-draft was passed. Exception: if the push in step 6 used --no-verify, always use --draft regardless of the --no-draft option, and inform the developer: ⚠️ PR created as draft because pre-push checks were skipped (--no-verify). Mark it as ready for review after ensuring all checks pass. - Use --base <base-branch> with the branch determined in step 5 - Use a HEREDOC to pass the body - If PR creation fails, show the error and STOP

  1. Show success message: Display a summary with all relevant information. When JIRA context was used, include the ticket key and link. When it was not, state that no JIRA ticket was attached (or list the key only if you referenced it in the description without a full ticket load): ## PR Created - JIRA: PROJ-123 (or "none" / key only if applicable) - Branch: my-branch → main - PR: https://github.com/org/repo/pull/42 (draft) - Title: <chosen title>

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

39.17%
按下载量换算200

Claude

28.48%
按下载量换算146

Cursor

18.37%
按下载量换算94

Gemini CLI

10.49%
按下载量换算54

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills