跳到正文
Skillpedia
通用编程5.5k · #14778

visual-pr

它能做什么

这项技能教智能体如何撰写审阅者能快速读懂的拉取请求说明。它解释改动的原因和实现的结构,如果还没有拉取请求,则会创建一个。

适用场景

  • ✓当开发者完成一项改动,需要清晰的拉取请求说明的时候。
  • ✓当新提交后,已有的拉取请求说明已经过时的时候。
  • ✓当用户要求为拉取请求中的改动提供视觉大纲的时候。

技能链接

https://github.com/humanlayer/skills/blob/main/plugins/visual-pr/skills/visual-pr/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/humanlayer/skills/blob/main/plugins/visual-pr/skills/visual-pr/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请使用 visual-pr 技能,为我当前分支撰写拉取请求说明。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会找到或创建当前分支对应的拉取请求,阅读完整的差异和工单,然后填写模板。它会把原因限制为一句话,并为审阅者添加几条备注。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Describe a Pull Request

Create or update the pull request for the current task with a concise description that helps a reviewer understand why the change exists and the shape of the implementation.

Workflow

  1. Read the description template:

    Read({SKILLBASE}/references/pr_description_template.md)

  2. Identify or create the pull request:

    • Check the current branch for a PR with gh pr view --json url,number,title,state,baseRefName,headRefName 2>/dev/null.
    • If no PR exists, inspect git status --short --branch and the commits on the current branch.
    • Commit task-related changes when needed, push the branch with an upstream, and create a PR for it. Follow the repository's git safety protocol.
    • Ask the user to select a PR only when the current branch has no relevant work and there is no safe current-branch PR to create.
  3. Gather only the context needed to explain the change:

    • Read the ticket and any relevant task artifacts.
    • Read the complete PR diff and enough surrounding code to understand behavior and ownership.
    • Use gh pr view to collect PR metadata and changed files.
    • Read {SKILLBASE}/references/show-me.md for the visual-outline conventions used in the PR body.
  4. Write the PR description using the template:

    • Keep Why the change to exactly one sentence.
    • Keep Special things to note to 1-3 bullets. Prioritize reviewer warnings, migrations, compatibility constraints, deliberate omissions, or surprising decisions. Write - None. when there are no special considerations.
    • Make Change outline a compact, /show-me-inspired structural view rather than prose or a file-by-file changelog.
    • Include only the views that help explain this PR:
      • SQL table and endpoint contract changes, plus pseudocode for business logic.
      • key data structure / type changes
      • A shallow file tree showing changed responsibilities.
      • React component tree changes, including important hooks, state, and package boundaries.
      • Call-tree, call-stack, control-flow, or data-flow changes.
    • Prefer diff blocks when showing changes to an existing shape. Show the complete target shape when most of it is new or diff notation would obscure ownership or order.
    • Keep each view focused on what a reviewer needs. Omit categories that did not change.
    • optionaL: if you are aware of a ticket id/url, a humanlayer task url, or related plan/document urls, or other relevant links, include them in the header, otherwise omit the header
  5. Save and publish the description:

    • Use .humanlayer/tasks/{task-slug}/pr-description.md when the task directory exists; otherwise use .humanlayer/tasks/pr-{number}/description.md.
    • Update the PR with gh pr edit {number} --body-file {output-path}.
    • Confirm the update succeeded.
  6. Report completion:

    • Read {SKILLBASE}/references/describe_pr_final_answer.md.
    • Respond using that final answer template with the PR URL, saved description URL, and concise list of changed files.

Always read and follow {SKILLBASE}/references/pr_description_template.md. Do not expand the PR body beyond that template.

Write as one human talking to another: avoid jargon and slang, and use simple, coherent, concise language.

常见问题

它会替我创建拉取请求吗?

如果该分支还没有拉取请求,这项技能会提交与任务相关的改动,然后创建一个。

说明有多长?

这项技能把原因限制为一句话,把特别说明限制为一到三条要点。

它使用哪种模板?

它使用随该技能保存的拉取请求说明模板。

详情

作者的原始描述

Only use when the user explicitly invokes this skill by name.

repo: humanlayer/skills

热度

GitHub 星标
5.5k
排名
#14778
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能