跳到正文
Skillpedia
安全13k · #11379

review-pr

它能做什么

它让 AI 智能体阅读拉取请求,检查代码中的安全和运行风险,并给出明确的建议。适用于需要判断某项更改是否可以安全运行或合并的维护者。

适用场景

  • ✓当你粘贴一个 GitHub 拉取请求链接,并想知道它运行是否安全时。
  • ✓当你需要快速决定是合并、关闭还是替换某个贡献者的更改时。
  • ✓当你想要一份简短的摘要,说明某个拉取请求改了什么以及为什么时。

技能链接

https://github.com/blackboardsh/electrobun/blob/main/.skills/review-pr/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“这是一个拉取请求链接,请帮我判断它运行是否安全,以及我该不该合并?”

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

工作原理

智能体会阅读拉取请求的描述,在有用时查看代码更改,并判断风险。然后它给出简短的建议,所有 GitHub 审查和合并操作仍由你自己完成。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Review PR

Overview

Use this skill when the user pastes a PR link and wants a security-first assessment before running, testing, or merging it. The goal is to understand the PR intent, inspect the diff, decide whether it is safe to run, and then help with feedback, fixes, merge readiness, or a close recommendation.

This skill is discussion-first, but it should still support fast maintainer throughput. Loading the skill does not authorize guessing which PR to inspect from local branches, refs, or open worktrees. Wait for the user to paste a PR URL, review that one PR, give a concise rundown, and discuss it with the user before taking any local git actions beyond basic repository state checks.

If the maintainer is clearly trying to fly through PRs, keep the discussion short and move quickly to a decisive recommendation:

  • Merge
  • Close
  • Supersede with direct fix

Use Supersede with direct fix when the underlying issue is legitimate but the PR implementation is too broad, changes the wrong behavior, or is close but not quite right. In that case, offer to implement the narrower fix locally and draft the close comment for the maintainer.

Workflow

0. Wait for the PR URL

  • Do not infer the target PR from local branches such as pr-*, from recent git history, or from the current worktree.
  • Review one PR at a time, in the order the user pastes them.
  • If no PR URL has been pasted in the current discussion, ask for it and stop there.
  • After the user pastes a PR URL, read it first and respond with a rundown before fetching refs, checking out branches, or diffing local PR branches.

1. Read the PR first

  • Read the PR description and discussion before touching the branch.
  • Capture the claimed intent, test plan, linked issue, and any mention of permissions, downloads, shell execution, networking, updater behavior, or native code.
  • If the description is missing or inaccessible, say so explicitly and continue with the code review.
  • The first substantive reply after reading should be a rundown for discussion with the user:
    • what the PR claims to do
    • what parts of the codebase it likely touches
    • which runtime host or VM should be used for build/run/test work
    • obvious security or runtime-risk areas to focus on
    • any missing context or questions
  • Do not assume the user wants immediate local branch inspection. Discuss first, then inspect locally if it will materially help the review.
  • If the user is clearly in rapid triage mode, keep this rundown to a few lines and then continue with local diff inspection.

1.5 Determine the review host before execution advice

  • Use the PR title, description, discussion, and changed-file list to infer which OS should be used for runtime verification.
  • State this explicitly before recommending any build, run, or test command.
  • If the current machine does not match the target runtime, say so clearly:
    • static review can continue on the current machine
    • build/run/manual verification should move to the correct VM or host OS
  • Use these common signals:
    • package/src/native/win/*, WebView2, DirectComposition, D3D11, D3D12, DXGI, HWND, .vcxproj, Windows packaging: review and test on Windows
    • package/src/native/macos/*, Cocoa, AppKit, WKWebView, Metal, CAMetalLayer, notarization, .mm changes: review and test on macOS
    • package/src/native/linux/*, GTK, WebKitGTK, X11, Wayland, Flatpak, .desktop, distro packaging: review and test on Linux
    • shared JS/TS/build/config/template changes with no OS-specific runtime path: static review anywhere, but runtime verification may require multiple OSes
    • CI, release, signing, packaging, updater, installer changes: often require an OS matrix, not a single VM
  • If the PR description is vague, use the file change list and symbols/imports to infer the target environment anyway.
  • If a PR is clearly platform-specific, tell the user to switch to that machine before any execution recommendation.

2. Avoid executing untrusted changes too early

  • Do not run the PR branch, install dependencies, or execute tests until the diff passes a basic security screen.
  • Treat package manager commands as code execution because lifecycle hooks and install scripts may run.
  • If execution becomes necessary, state exactly what will run and why.

3. Build and test Electrobun the right way

  • Never try to build individual parts of Electrobun directly.
  • To build local Electrobun changes, run `bu
常见问题

它会替我合并或关闭拉取请求吗?

不会。它只提出建议,所有审查和合并操作都由你自己决定。

它能同时审查多个拉取请求吗?

不能。它一次只处理一个拉取请求,按你粘贴的顺序进行。

“Supersede” 选项是什么?

它表示这个想法不错,但拉取请求范围太大或有误。此时智能体会提出编写更窄的修复,并起草关闭评论。

详情

作者的原始描述

Review a GitHub pull request from its link, read the PR description, inspect the code locally only when useful, and judge whether the change is safe to run from a security and runtime-safety perspective. Use only after the user pastes a PR URL. Handle one PR at a time, make a clear merge/close/supersede recommendation, and keep all GitHub review and merge actions with the user.

repo: blackboardsh/electrobun

热度

GitHub 星标
13k
排名
#11379
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能