跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
其他技能

audit-pr

Use when asked to audit, review or check a pull request, whether a pull request is safe or "perfectly safe" to merge, whether it is completely finished, or to fix what a review found before merging.

reyxdz · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add reyxdz/going-dark --skill audit-pr

技能说明


name: audit-pr description: Use when asked to audit, review or check a pull request, whether a pull request is safe or "perfectly safe" to merge, whether it is completely finished, or to fix what a review found before merging.

Audit a pull request

What this skill is for

You decide whether a pull request is perfectly safe to merge while keeping its purpose, and you fix what stops it, on its own branch. Then you report in a fixed format.

  • Anything that needs even a little attention is fixed, not only reported.
  • If the pull request is already fine, say so plainly. Never invent findings to look thorough.
  • Being asked to audit is being asked to fix and push. You do not need to ask again before pushing fixes to the pull request's branch.

How to follow this file

  1. Do the steps in order, from Step 1 to Step 9. Do not skip a step. Do not change the order.
  2. Each step has three parts:
    • Do — what to do. Commands are shown in code blocks. Replace every <word in angle brackets> with the real value and remove the brackets.
    • Check — what must be true before you go on.
    • If not — what to do when the check fails.
  3. When this file says STOP, stop working, send the message it gives, and wait for the answer.
  4. Never invent a fact. Every finding must point to a file and the text in it, a command output, or the pull request's own words. For something that is missing (a promised job that is not in the diff), quote the words that promise it.
  5. When you cannot check something — no access, a command fails, a file is missing — do not guess. Write it under Not verified in the report, with why and how to check it, and go on.
  6. The project's own rules win. If a file you read in Step 1 says something different from this file, do what the project says, and say so in the report: The project's rule "<quote>" replaced this skill's rule "<quote>".
  7. Never merge the pull request, approve it, close it, or force-push. Only the owner merges.

Words used in this file

WordMeaning
ownerThe person who merges pull requests. Step 1 shows how to find them.
base branchThe branch the pull request goes into, usually main.
head branchThe pull request's own branch.
forkA pull request from someone else's copy of the repository. You usually cannot push to it.
scratch copyA separate folder with its own checkout (a git worktree), outside the person's own folder. All your work happens there.
scratch folderA folder outside the repository for temporary files. Use the one your tool gives you (a scratchpad or temp folder). If it gives none: /tmp/going-dark on macOS and Linux, %TEMP%\going-dark on Windows.
acceptance criteriaWhat the pull request must do, taken from its issue's "What to build" and "Verify" sections and its plan's phase. The pull request's description is a claim to check, not the specification.
findingAnything that needs attention. Each finding gets one of: fixed, blocker, question, not worth holding.
blockerA finding that makes the pull request unsafe to merge until it is fixed or decided.
behaviour fixA fix that changes what runs: source code, SQL, migrations, config, scripts, CI.
records fixA fix that changes only words: docs, plans, decision records, index tables, comments, the pull request description.
test fixA fix that changes only test files: removing an unrelated test, making a test deterministic. It needs no extra test.
unsafeWould fall under severity 1, 2 or 3 in Step 6: breaks the deploy or loses data, a security or privacy problem, or broken for users.
unrelatedNot needed for any acceptance criterion or anything the description promises.
smallAll of these are true: under about 50 changed lines; no new dependency; no new table, column or migration; no new scheduled job, service, environment variable or setting; no new text users read that the owner has not approved; no product decision.
cosmeticChanges nothing about behaviour, safety, data, accessibility, the accuracy of records, or what users read. Example: blank lines in code, word order in a code comment.
deployment skewDuring a release, the new frontend may talk to the old backend (or the reverse) for a few minutes. Both must keep working.

Step 1 — Read the pull request and its context

Do:

  1. Get the latest state:

    git fetch origin
    
  2. Read the pull request:

    gh pr view <N> --json number,title,body,state,isDraft,isCrossRepository,baseRefName,headRefName,mergeable,files,commits
    

    Write down: its state, base branch, head branch, whether it is from a fork (isCrossRepository), its files and its commit messages.

  3. Read the project's rule files, every one that exists:

    git ls-files AGENTS.md CLAUDE.md GEMINI.md CONTRIBUTING.md .github/copilot-instructions.md .github/pull_request_template.md "docs/guides/*"
    

    Note: the owner (look for "owner", "maintainer", "only … merges"; also .github/CODEOWNERS), the check commands, how migrations run, rules about releases and old clients, and any pull request check.

  4. Find the pull request check, if any: in package.json under "scripts", a name containing pr or check; in .github/workflows/, a workflow that reads the pull request body. Write down its command, or "none".

  5. Read the issue it names (Closes #<n> or Part of #<n>) and the plan that issue names:

    gh issue view <issue number> --comments
    git grep -l "#<issue number>" origin/<base branch> -- docs
    git show origin/<base branch>:<plan path>
    

    Write the acceptance criteria as a numbered list.

  6. Choose the mode. Use the first rule that matches:

    IfMode
    The state is CLOSED (not merged)STOP.
阅读完整来源 ↗