跳到正文
Skillpedia
通用编程29k · #9367

gh-review

它能做什么

这项技能为撰写 GitHub 审阅和评论设定规则与语气。适合审阅代码、并希望反馈直接、清晰的开发者。

适用场景

  • ✓当你要求智能体审阅拉取请求,并把结果发布到 GitHub 时。
  • ✓当你希望审阅评论直截了当,不含含糊或可选的措辞时。
  • ✓当你的智能体准备向 GitHub 发布评论,并希望它先检查发布账户时。

技能链接

https://github.com/mastra-ai/mastra/blob/main/.mastracode/skills/gh-review/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请为这个拉取请求撰写一份 GitHub 审阅,并确保你要求的每项改动都清楚且是必需的。”

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

工作原理

这项技能为智能体提供一份清单:先确认发布账户,然后为每项要求写明位置和理由,并给出清晰的结论。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

GitHub review voice

Load this the moment a review or diagnosis is about to become a GitHub comment. The investigation skill owns the evidence; this skill owns what gets written, posting authorization, and how it is posted.

Who is posting

Before drafting, run gh auth status once and record the active account for the target GitHub host in the review record. Do not dump environment variables or expose tokens.

Do not assume the answer. It may be the user's account or a bot account with its own identity; which one it is changes how you act:

  • Self-review means the posting account is the PR author. Compare the login above to the PR's author.login, and decide self-review from that comparison alone—not from who the user is.
  • Write in the posting account's voice. If it is not the author's account, do not refer to the PR as "mine".
  • The user is accountable for the content regardless of which account posts it—which is why the post gate below exists.

Check once per session, not before every post.

The rule

Ask for the changes you want, and every one of them is required. Small requests are still requests—post them. What you never do is label them: there is no "optional", no "nit", no "non-blocking", no "follow-up", no "future PR". The author satisfies the list; the review is not a menu.

Hedging is not politeness; it transfers the decision back to the author while pretending not to. A reviewer who has evidence states the request.

Voice

Be direct about required changes and precise about what the evidence establishes:

  • Imperative, present tense. "Advance attempt before the comparison." Not "you might want to consider advancing…".
  • Pointer, change, reason. Every request names the file and line, says what to change, and gives the consequence or evidence in one or two sentences.
  • No pleasantries. No "Thanks for the PR", "Great work overall", "Nice cleanup", "Let me know if you have questions", "Happy to discuss".
  • No softened requests. State required changes directly, not as optional suggestions or politeness questions ("You might want to advance attempt?", "Consider adding a test"). Preserve qualifications that express actual uncertainty or limits of evidence: "the contract does not guarantee this field" must not become "servers never return this field".
  • No restated verdict. GitHub already shows "requested changes" or "approved" above the body. Never open with "Request changes." / "Approve." / "Verdict:".
  • Questions only when the answer changes the request. State what you believe and what changes if the answer differs: "This drops the retry on 429. If that is intentional, document it in the option's JSDoc; otherwise restore the branch at client.ts:88."
  • Evidence over assertion. "Ran pnpm test:memory on this branch with the second tool call removed: fails at observer.test.ts:212." Not "this may break the tests".
  • Plain about severity. If it corrupts data, say it corrupts data.
  • Code, not people. Never characterize the author, their effort, or their experience.

Length is set by the requests, not by a budget. Each request is a pointer, the change, and the reason—nothing else—and every request you have evidence for is in the body. Eight requests make an eight-item review; do not shrink the list to look concise, and do not park requests in a "secondary" or "candidate" tier to be added if asked.

Structure of a PR review body

Request changes (fictional example):

The new retry setting reaches the normal path, but recovery still uses the old default. Both paths need to honor the same configured limit.

1. `src/client/retry.ts:41` — Pass the configured limit into the recovery path. It currently retries even when callers disable retries.
2. `src/client/retry.test.ts:88` — Cover the recovery path with retries disabled. The current test only exercises the normal path.

Verified: a recovery-path probe with retries disabled made three attempts.

Approve:

<Brief reason the approach and implementation satisfy the required outcome.>

Verified: <what you actually ran, only if it adds credibility>.

Lead with the review's central conclusion and why it matters, not the event label. Give each numbered request a clear resolving condition; group changes that must land together or state their dependencies. Put the request that most affects correctness first. If the author needs to make a product decision rather than a code change, say what decisio

常见问题

这项技能会自己发布评论吗?

它指导评论的撰写和发布方式,并要求智能体先检查以哪个 GitHub 账户发布。

智能体能把某项要求标记为可选吗?

不能。技能要求智能体避免使用“可选”或“小问题”之类的标签,确保每项要求都清楚明确。

这项技能适合谁?

适合在 GitHub 上审阅代码、并希望审阅评论保持一致且直接的人。

详情

作者的原始描述

Draft and post direct, unhedged GitHub PR reviews and issue comments — every item is a required change with a pointer and reason, PR reviews land as "request changes" or "approve" (never a bare comment), and nothing is marked optional or deferred to a follow-up. Use whenever understand-pr or understand-issue (or any review) is about to draft or post to GitHub.

repo: mastra-ai/mastra

热度

GitHub 星标
29k
排名
#9367
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能