Token导航 LogoToken导航

Agent Skill · 开发

pr-fix(公关修复)

pr-fix 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

pr-fix 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 19,141。

总安装 291周安装 12GitHub Stars 22,828下载 95核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/iofficeai/aionui --skill pr-fix

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在需要整理仓库状态、代码变更或协作事项时使用。可结合来源仓库和 README 核验具体用法。

安装命令:npx skills add https://github.com/iofficeai/aionui --skill pr-fix。建议确认权限范围、维护状态及是否触发联网或命令执行。

来源仓库内路径:skills/pr-fix

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/iofficeai/aionui --skill pr-fix;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

pr-fix 怎么安装?

在终端执行 npx skills add https://github.com/iofficeai/aionui --skill pr-fix。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

pr-fix 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

pr-fix 需要什么权限?

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

pr-fix 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

pr-fix 用的人多吗?

公开数据是累计安装 291 次,近一周安装 12 次,下载 95 次,GitHub 22,828 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

pr-fix 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 22,828 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
pr-fix

公关修复 · 本页

29122,828需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

PR Review Fix Skill

Automated workflow to resolve all issues surfaced in a pr-review report — parse summary → detect PR status → create fix branch or checkout original branch → triage & validate → fix by priority → quality gate → commit → publish → verify.

Announce at start: "I'm using pr-fix skill to fix all review issues."

Usage

/pr-fix [pr_number]

pr_number is optional. The skill requires a pr-review report to be present in the current session.


Mode Detection

At the very start of execution, check $ARGUMENTS for the --automation flag:

# $ARGUMENTS example: "123 --automation" or "123"
AUTOMATION_MODE=false
if echo "$ARGUMENTS" | grep -q -- '--automation'; then
  AUTOMATION_MODE=true
fi

In automation mode:

  • Skip all yes/no confirmation prompts — follow the default best path

Steps

Step 0 — Locate the Review Report

The pr-review skill must have been executed in the current session. The review report (containing a "汇总" table) must be present in the conversation.

If no review report is found in the current session, abort immediately with:

No pr-review report found in this session. Please run /pr-review <pr_number> first.

Extract the PR number from the report header:

## Code Review:<PR 标题> (#<PR_NUMBER>)

If pr_number is provided as an argument, use it to override the extracted number.


Step 1 — Parse the Summary Table

Locate the 汇总 section in the review report:

| #   | 严重级别    | 文件        | 问题 |
| --- | ----------- | ----------- | ---- |
| 1   | 🔴 CRITICAL | `file.ts:N` | ...  |

Build an ordered issue list, grouped by severity:

PrioritySeverityEmoji
1CRITICAL🔴
2HIGH🟠
3MEDIUM🟡
4LOW🔵

If the 汇总 table is empty, abort with:

No issues found in the review summary. Nothing to fix.

LOW issues: Skip — do not fix.

After filtering out LOW issues, if no CRITICAL / HIGH / MEDIUM issues remain, abort with:

All issues are LOW severity — nothing actionable to fix. (pr-fix only addresses CRITICAL, HIGH, and MEDIUM issues)

This guard prevents running the full workflow (checkout, quality gate, commit) with no changes to make.


Step 2 — Pre-flight Checks

gh pr view <PR_NUMBER> \
  --json headRefName,baseRefName,state,isCrossRepository,maintainerCanModify,headRepositoryOwner \
  --jq '{head: .headRefName, base: .baseRefName, state: .state, isFork: .isCrossRepository, canModify: .maintainerCanModify, forkOwner: .headRepositoryOwner.login}'

Save <head_branch>, <base_branch>, <state>, <IS_FORK>, <CAN_MODIFY>, and <FORK_OWNER> for later steps.

Determine path based on results:

stateIS_FORKCAN_MODIFYPath
MERGEDanyanyAbort — nothing to fix
OPENfalseanySame-repo — push to original branch
OPENtruetrueFork — push to fork branch via gh checkout
OPENtruefalseFork fallback — create fix branch on main repo

If state is MERGED: abort with:

PR #<PR_NUMBER> has already been merged. Nothing to fix.

If IS_FORK=true AND CAN_MODIFY=false: set FORK_FALLBACK=true and continue. In this path (Step 3 onwards), fixes are applied on a new branch in the main repo instead of the fork. Save FIX_BRANCH=bot/fix-pr-<PR_NUMBER> for use in Step 3 and Step 8.


Step 3 — Create Worktree and Prepare Branch

Create an isolated worktree for this PR fix. The main repo stays on its current branch.

REPO_ROOT=$(git rev-parse --show-toplevel)
PR_NUMBER=<PR_NUMBER>
WORKTREE_DIR="/tmp/aionui-pr-${PR_NUMBER}"

# Clean up any stale worktree from a previous crash
git worktree remove "$WORKTREE_DIR" --force 2>/dev/null || true

Same-repo PR (IS_FORK=false):

git fetch origin <head_branch>
git worktree add "$WORKTREE_DIR" origin/<head_branch> --detach
cd "$WORKTREE_DIR"

Fork PR with maintainer access (IS_FORK=true, CAN_MODIFY=true):

git worktree add "$WORKTREE_DIR" --detach
cd "$WORKTREE_DIR"
gh pr checkout <PR_NUMBER>

gh pr checkout inside the worktree sets up the fork remote and branch tracking correctly.

Fork PR without maintainer access (FORK_FALLBACK=true):

git fetch origin <base_branch>
git worktree add "$WORKTREE_DIR" origin/<base_branch> --detach
cd "$WORKTREE_DIR"
# Merge PR's commits into the detached HEAD
gh pr checkout <PR_NUMBER> --detach
git checkout -  # back to the base commit
git merge --no-ff --no-edit FETCH_HEAD

All paths — symlink node_modules and rebuild native modules:

ln -s "$REPO_ROOT/node_modules" "$WORKTREE_DIR/node_modules"
cd "$WORKTREE_DIR"
npx electron-rebuild -f -w better-sqlite3 2>/dev/null || true

The electron-rebuild step recompiles native modules (e.g., better-sqlite3) against the Electron version used by this project, ensuring ABI compatibility.

Save REPO_ROOT and WORKTREE_DIR for later steps. All file reads, edits, lint, and test commands from this point forward run inside WORKTREE_DIR.


Step 4 — Triage & Validate

Before fixing anything, independently verify each issue from the review report. This prevents blind application of potentially incorrect or suboptimal fixes.

All file operations in this step use worktree paths ($WORKTREE_DIR/<relative_path>).

For each CRITICAL / HIGH / MEDIUM issue (skip LOW), perform three-layer triage:

Layer 1 — Is the issue real?

Read the target file and the surrounding context. Independently assess whether the reported problem actually exists:

  • Does the problematic code pattern still exist at the reported location? (Review may be based on an older version)
  • Is the reported behavior actually a bug, or is it intentional design? (Check PR description, related files, project conventions)
  • Does the reviewer's reasoning hold up given the full context?

If the issue is not real → mark as DISMISSED with a clear reason.

Layer 2 — Is the suggested fix reasonable?

If the issue is real, evaluate the review report's "修复建议":

  • Does the suggested fix actually resolve the problem?
  • Does it introduce side effects (type errors, behavioral changes, broken imports)?
  • Is it consistent with the project's patterns and conventions?

If the suggestion is reasonable → mark as FIX (adopt the original suggestion).

Layer 3 — Is there a better fix?

If the suggestion is flawed or suboptimal, consider an alternative:

  • The alternative must target the same file(s) and same code area — do not expand scope
  • The alternative must solve the same problem, just with a different approach
  • The alternative's diff should not be significantly larger than the original suggestion — if it is, the change likely exceeds fix scope and should be a separate PR

If a better fix exists → mark as FIX_ALT with the alternative plan. If no better fix exists → fall back to FIX (adopt the original suggestion despite its flaws, as long as it doesn't make things worse).

Triage output

Build an enhanced issue list. Each issue now has:

FieldValuesDescription
verdictFIX / FIX_ALT / DISMISSEDTriage decision
reasonfree textWhy this verdict was chosen
fix_plancode/descriptionThe actual fix to apply (FIX: original suggestion; FIX_ALT: alternative)
CRITICAL issue constraints

Automation mode (--automation): CRITICAL issues cannot be dismissed. If triage concludes a CRITICAL issue is a false positive, the fixer must escalate — abort the fix workflow and transfer to human review:

gh pr edit <PR_NUMBER> --remove-label "bot:fixing" --add-label "bot:needs-human-review"
gh pr comment <PR_NUMBER> --body "<!-- pr-automation-bot -->
⚠️ Triage 阶段发现 CRITICAL 问题 #<issue_number> 可能为误报,但自动化流程无法自行驳回 CRITICAL 级别问题,已转交人工确认。

**问题:** <issue description>
**驳回理由:** <reason>"

Then EXIT.

Interactive mode (no --automation): Present the dismissal reasoning to the user and ask for confirmation:

Triage 认为 CRITICAL 问题 #N 可能是误报: 是否同意驳回此问题?(yes/no)
  • User says yes → mark as DISMISSED
  • User says no → mark as FIX (apply original suggestion)
Post-triage check

After triage, if all non-LOW issues are DISMISSED, abort with:

All issues were dismissed during triage — nothing to fix.

In automation mode, also transfer to human review (since at least one issue was CRITICAL/HIGH/MEDIUM but all were dismissed, a human should confirm):

gh pr edit <PR_NUMBER> --remove-label "bot:fixing" --add-label "bot:needs-human-review"

Step 5 — Fix Issues by Priority

All file operations in this step use worktree paths. The Read tool should target $WORKTREE_DIR/<relative_path>, and the Edit tool should modify files at the same worktree paths.

Process only issues with verdict FIX or FIX_ALT from the triage output, in order CRITICAL → HIGH → MEDIUM. For each issue:

  1. Read the target file (use Read tool at the file path from the summary table)
  2. Locate the exact problem — match the review report's quoted code and line number
  3. Apply the fix_plan from triage (original suggestion for FIX, alternative for FIX_ALT)
  4. After fixing each file batch, run a quick type check:
bunx tsc --noEmit

Resolve any type errors before moving to the next issue.

Batching: Group issues in the same file into a single pass.


Step 6 — Full Quality Gate

All commands run inside the worktree ($WORKTREE_DIR):

bun run lint:fix
bun run format
bunx tsc --noEmit
bun run test

All four must pass. Fix any failures caused by the current changes before proceeding.


Step 7 — Commit

Follow the commit skill workflow. Commit message must reference the original PR:

fix(<scope>): address review issues from PR #<PR_NUMBER>

- Fix <CRITICAL/HIGH issue 1 description>
- Fix <issue 2 description>
- ...

Review follow-up for #<PR_NUMBER>

Step 8 — Publish

Same-repo PR (IS_FORK=false):

cd "$WORKTREE_DIR"
git push origin HEAD:<head_branch>

Fork PR with maintainer access (IS_FORK=true, CAN_MODIFY=true):

cd "$WORKTREE_DIR"
git push <FORK_OWNER> HEAD:<head_branch>

gh pr checkout set up <FORK_OWNER> as the remote pointing to the fork. Pushing with HEAD:<head_branch> ensures the commit lands on the fork's branch, which is the PR's actual head.

Output to user:

已推送到 <head_branch>,PR #<PR_NUMBER> 已自动更新。无需创建新 PR。

Fork PR without maintainer access (FORK_FALLBACK=true):

Push the fix branch to the main repo and open a new PR:

cd "$WORKTREE_DIR"
git push origin HEAD:bot/fix-pr-<PR_NUMBER>

Then open a new PR and immediately enable auto-merge:

NEW_PR_URL=$(gh pr create \
  --base <BASE_REF> \
  --head bot/fix-pr-<PR_NUMBER> \
  --label "bot:done" \
  --title "fix: address review issues from fork PR #<PR_NUMBER>" \
  --body "$(cat <<'EOF'
This PR applies fixes identified during review of #<PR_NUMBER>.

The original fork PR has no maintainer push access, so fixes are applied here as a follow-up.
Local quality gate (lint/test/tsc) already passed — auto-merging once CI is green.

Closes #<PR_NUMBER>
EOF
)")

NEW_PR_NUMBER=$(echo "$NEW_PR_URL" | grep -o '[0-9]*$')
gh pr merge "$NEW_PR_NUMBER" --squash --auto

# Close original fork PR immediately with a comment (don't wait for Closes #N)
gh pr close <PR_NUMBER> --comment "<!-- pr-fix-verification -->
原 PR 为 fork 且未开启 maintainer 写入权限,无法直接推送修复。
已在主仓库创建跟进 PR #${NEW_PR_NUMBER},包含本次 review 的所有修复,CI 通过后将自动合并。"

Closing immediately ensures pr-automation won't pick up the original PR in the next round (closed PRs are excluded by --state open in Step 1). No need to set bot:done label since the PR is closed.

Output to user:

Fork PR 无 maintainer 写入权限,已在主仓库创建跟进 PR #<NEW_PR_NUMBER>,CI 通过后自动合并。

Step 9 — Verification Report

For each issue in the original summary table, verify the fix exists in actual code:

  1. Read the relevant file (Read tool)
  2. Grep for the original problematic pattern to confirm it is gone
  3. Confirm the corrected code is in place

Post the verification report as a PR comment AND output it in the conversation. The report now includes a Triage 决策 section before the fix table:

gh pr comment <PR_NUMBER> --body "$(cat <<'EOF'
<!-- pr-fix-verification -->
## PR Fix 验证报告

**原始 PR:** #<PR_NUMBER>
**修复方式:** 直接推送到 `<head_branch>`

### Triage 决策

| # | 严重级别 | 原始问题 | 判定 | 理由 |
|---|---------|---------|------|------|
| 2 | 🟠 HIGH | <问题描述> | ⏭️ 驳回 | <驳回理由,引用具体代码或项目约定> |
| 3 | 🟡 MEDIUM | <问题描述> | 🔄 替代方案 | <为什么原建议不适用,替代方案是什么> |

> 仅列出被驳回(DISMISSED)或使用替代方案(FIX_ALT)的问题。采纳原建议(FIX)的问题不在此表中。
> 若所有问题均采纳原建议,省略此区块。

### 修复结果

| # | 严重级别 | 文件 | 问题 | 修复方式 | 状态 |
|---|---------|------|------|---------|------|
| 1 | 🔴 CRITICAL | `file.ts:N` | <原始问题> | <修复措施> | ✅ 已修复 |
| 2 | 🟠 HIGH     | `file.ts:N` | <原始问题> | <修复措施> | ✅ 已修复(替代方案) |
| 3 | 🟡 MEDIUM   | `file.ts:N` | <原始问题> | — | ⏭️ 驳回 |

**总结:** ✅ 已修复 N 个 | 🔄 替代方案 N 个 | ⏭️ 驳回 N 个 | ❌ 未能修复 N 个

> 🔵 LOW 级别问题已跳过(不阻塞合并,修复优先级低)。
EOF
)"

After posting, output the same verification table in the conversation for immediate review.


Step 10 — Cleanup

Remove the worktree. All paths use --detach so no local branches were created.

cd "$REPO_ROOT"
git worktree remove "$WORKTREE_DIR" --force 2>/dev/null || true

Mandatory Rules

  • No AI signature — no Co-Authored-By, Generated with, or any AI byline
  • Always reference original PR — every commit and PR body must include Review follow-up for #<PR_NUMBER>
  • No issue creation — this skill skips the issue-association step in pr skill
  • Fix, don't workaround — no // @ts-ignore, no lint suppression; address the root cause
  • Triage before fix — never blindly apply review suggestions; independently verify each issue and evaluate the proposed fix
  • Fix scope = review scope — alternative fixes must target the same files and same problem; do not expand scope or refactor beyond what the issue requires
  • CRITICAL cannot be auto-dismissed — in automation mode, dismissing a CRITICAL issue requires human escalation

Quick Reference

 0. Require pr-review report in current session — abort if not found
 1. Parse summary table → ordered issue list
 2. Pre-flight: fetch PR info (state, isCrossRepository, maintainerCanModify, forkOwner)
    → ABORT: state=MERGED
 3. Create worktree at /tmp/aionui-pr-<PR_NUMBER> (all paths use --detach):
    → same-repo:        git fetch + git worktree add --detach
    → fork+canModify:   git worktree add --detach + gh pr checkout <PR_NUMBER>
    → fork+fallback:    git worktree add --detach + merge fork head
 4. Triage & Validate: verify each issue independently (3-layer check)
    → Layer 1: is issue real? → DISMISSED if false positive
    → Layer 2: is suggested fix reasonable? → FIX if yes
    → Layer 3: is there a better fix? → FIX_ALT if yes
    → CRITICAL cannot be auto-dismissed in automation mode (escalate to human)
 5. Fix issues with verdict FIX/FIX_ALT, CRITICAL→HIGH→MEDIUM; tsc after each batch
 6. bun run lint:fix && bun run format && bunx tsc --noEmit && bun run test (in worktree)
 7. Commit: fix(<scope>): address review issues from PR #N
 8. Push from worktree (same-repo / fork+canModify / fork+fallback)
 9. Verify → post Triage 决策 + 修复结果 as gh pr comment + output in conversation
10. Cleanup: git worktree remove + git branch -D (worktree and local branches)

平台分布

Codex

35.77%
按下载量换算34

Claude

29.21%
按下载量换算28

Cursor

19.25%
按下载量换算18

Gemini CLI

9.19%
按下载量换算9

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

可疑

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills