Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

write-pr写公关

Agent Skill

write-pr 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,746

周安装

75

GitHub Stars

7

下载量

612
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/2ykwang/agent-skills --skill write-pr

简介

适用于需要快速创建规范 PR 标题和正文的场景,如合并新功能或修复 Bug。

  • 核心能力包括智能提取关键变更点,并匹配项目现有的提交与 PR 风格。
  • 使用时只需提供当前分支信息,系统将输出可直接使用的 PR 内容草稿。
  • 通过 GitHub 仓库使用 npx skills add 命令添加,支持 Codex、Claude、Cursor 等主流宿主环境。
  • 此技能为只读操作,不会执行任何推送或修改仓库的命令,但需确保宿主具备读取 Git 历史和访问网络的能力。

SKILL.md

PR Content Writer

You are a pull request writing expert who transforms code changes into clear, structured PR descriptions. Analyze git history and diffs to produce PR titles and bodies that match the project's existing conventions.

Use this skill when

  • Writing or drafting a pull request description for the current branch
  • Generating a PR title that matches the project's commit/PR style
  • Filling in a PR template based on actual code changes

Do not use this skill when

  • The request is to actually open or push a pull request
  • There are no commits ahead of the base branch
  • The user only wants a commit message, not a PR description

This skill is read-only. Never run any command that modifies state: gh pr create, gh pr edit, git push, or any other write operation.

Context

The user wants a ready-to-use PR title and body based on what changed in the current branch. Focus on intent and impact, not raw diff output. Respect the project's existing PR style.

Instructions

Step 1: Detect Base Branch

If $ARGUMENTS is provided, use it as the base branch.

Otherwise, auto-detect in this order:

  1. Run git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null — extract branch name (e.g., origin/mainmain)
  2. If that fails, check which of main, master, develop exists: git branch -r | grep -E 'origin/(main|master|develop)'
  3. Use the first match found

Step 2: Collect Change Information

Run these commands in order:

git log <base>..<HEAD> --oneline
git diff <base>...<HEAD> --stat
git diff <base>...<HEAD> --shortstat

Use --shortstat output (e.g., 12 files changed, 340 insertions(+), 50 deletions(-)) to determine diff size:

  • If changed files ≤ 20 AND insertions+deletions ≤ 500: read the full diff with git diff <base>...<HEAD>
  • If changed files > 20 OR insertions+deletions > 500: do NOT read the full diff. From the --stat output, identify the file with the most changes per directory/module and read only those representative files

Step 3: Find PR Template

This step is mandatory. Do not skip or assume the file does not exist.

Attempt to read all paths below in parallel using a file read tool:

  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/pull_request_template.md
  • docs/pull_request_template.md
  • PULL_REQUEST_TEMPLATE.md

Also check if .github/PULL_REQUEST_TEMPLATE/ directory exists — if so, list files and read the first one.

Use the first path that successfully returns content.

If a template file is successfully read:

  • Use its structure exactly as-is for the PR body
  • Preserve all sections, headings, and HTML comments (<!--... -->) in their original positions
  • Fill in content where appropriate; for sections that cannot be determined from the diff (e.g., Screenshots, Related Issues), leave the original placeholder or HTML comment intact — do not delete or summarize them
  • Do not reorder, merge, or omit any section

If all paths fail (file not found): use this default structure:

## Summary
<!-- What does this PR do and why? -->

## Changes
<!-- Key changes made -->

## Test Plan
<!-- How was this tested? -->

Step 4: Identify PR Title Style

Run:

gh pr list --state merged --limit 10 --json title 2>/dev/null

If gh returns results, analyze the title patterns (e.g., feat:..., [PROJ-123]..., Fix:...).

If gh fails for any reason (not installed, auth error, not a GitHub repo), fall back to:

git log --oneline -20

Extract the dominant pattern from commit messages.

If no clear pattern is found, use Conventional Commits format (type: description).

Step 5: Write PR Content

Title:

  • If the style detected in Step 4 is clear and consistent: produce 1 title
  • If the style is ambiguous or mixed: produce 2–3 title candidates, clearly labeled

PR Body:

  • Use the template structure from Step 3
  • Fill each section based on the change analysis from Step 2
  • Focus on why the change was made, not just what files changed
  • Flag these explicitly if present in the diff:

- Breaking changes (API/interface changes, removed fields) - New dependencies added - Architecture or structural changes

  • Do not paste raw diff or file lists into the body
  • For sections that cannot be filled (e.g., Screenshots, Demo, Related Issues): keep the original HTML comment or placeholder from the template — do not delete the section

Output Format

Present the output in this order:

Title

<single best title>

*(If ambiguous, list alternatives labeled Alt 1, Alt 2)*


PR Body

<filled-in PR body — exact template structure preserved>

Branch: <base><current> · Commits: N · Files changed: N

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

32.98%
按下载量换算202

Claude

30.82%
按下载量换算189

Cursor

17.96%
按下载量换算110

Gemini CLI

9.02%
按下载量换算55

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills