AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Pre Pr Review

skill-sirguanzz-claude-skills-pre-pr-review · by SirGuanZz

>-

No reviews yet
0 installs
29 views
0.0% view→install

Install

$ agentstack add skill-sirguanzz-claude-skills-pre-pr-review

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-sirguanzz-claude-skills-pre-pr-review)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Pre Pr Review? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

pre-pr-review: 提交 PR 前的安全 + 测试专项审查

职责:在提交 PR 前只做两件事,不越界:

  • 安全性:注入、XSS、敏感信息泄漏、鉴权 / 权限绕过、不安全跳转、SSR 私密配置泄漏、不安全依赖使用。
  • 测试与回归:新增分支的测试或手工验证清单、现有测试的更新点、高风险改动的构建 / 类型 / lint 验证提示。

不在本 skill 范围:

  • 交给 vue-fe-review:响应式陷阱、SSR 反模式、路由 404、页面加载速度、首屏包体积、请求瀑布、内存泄漏、未清理的监听器 / 定时器
  • 两个 skill 都不管:类型完整性、any / 断言滥用、设计纪律、命名风格、代码格式、a11y 深扫

审到 Vue 代码问题时,只提醒用户"建议再跑一次 vue-fe-review",不要在本 skill 里输出结论。

核心纪律:只读不改代码。 用户明确说「按审查结果修」「帮我改」后,才进入修改流程。


启动:确定审查范围

默认范围是当前未提交改动:

  1. git diff --cached
  2. git diff
  3. git status --short

如果 staged 和 unstaged 都为空,告知没有可审查 diff,让用户指定:

| 范围 | 读取方式 | |------|----------| | 当前分支相对 main | git diff main...HEAD | | 指定 commit / ref | git show git diff .. | | 指定文件 / 目录 | 读取目标文件并结合引用搜索 | | PR URL / 编号 | 用 gh pr view / gh pr diff 读取 |

范围明确后,一句话说明:审查模式、文件数、主要改动类型。


先读项目上下文

只读与安全 / 测试判断相关的最少文件:

  • package.json:测试脚本、lint、类型检查、依赖来源。
  • 请求封装:api/request.*services/**、拦截器 — 判断是否绕过统一鉴权 / CSRF / 错误码。
  • SSR / 框架配置:nuxt.config.* / next.config.* 中的 runtimeConfig / env / publicRuntimeConfig,判断私密字段有没有被暴露。
  • 路由入口:仅在 diff 出现 redirect / next / returnUrl 等参数时读,判断开放重定向。
  • 测试目录:tests/**__tests__/**e2e/**cypress/**vitest.config.* — 判断是否有可复用测试框架。

只深入与 diff 有关的上下文。不主动扫业务逻辑。


审查维度

1. 安全性

必须检查:

  • 用户输入是否进入 v-htmlinnerHTMLdangerouslySetInnerHTML、模板字符串 HTML、Markdown 渲染。
  • URL、query、redirect、returnUrl、next 参数是否可能造成开放重定向。
  • API 请求是否绕过统一 request 封装、鉴权 header、错误码处理或 CSRF 防护。
  • 是否把 token、cookie、手机号、身份证、密钥、内部域名等敏感信息打到日志、URL、localStorage 或前端 bundle。
  • SSR / 服务端代码是否把私密 runtimeConfig 暴露到客户端(缺 public. 前缀、错放 env)。
  • 下载、预览、跳转、iframe、window.open 是否缺少协议白名单或 noopener / noreferrer
  • 依赖或动态 import() 是否从用户可控路径加载。
  • 新引入的第三方依赖是否可疑(名称近似 / 无 star / 无维护),是否有已知 CVE。

不做攻击脚本或利用链演示;只指出风险、位置和安全改法。

2. 测试与回归

必须检查:

  • 新增业务分支是否有对应单测 / 组件测试 / e2e 覆盖;缺失时给手工验证清单。
  • 现有测试是否需要更新快照、mock、fixture、类型断言。
  • 高风险改动是否需要在 PR 说明里提示跑 typecheck / lint / build
  • 涉及登录 / 支付 / 权限 / 数据写入的改动,是否有回归路径可验证。

没有测试框架时,输出手工验证清单,不要擅自引入依赖。UI 层的 375 / 768 / 1280 响应式验证 不在本 skill 范围,由 vue-fe-review 覆盖。


分级标准

| 等级 | 含义 | 必须处理 | |------|------|----------| | P0 阻断 | 安全漏洞、鉴权绕过、敏感信息已经泄漏到 bundle / 日志 / URL | PR 前必须修 | | P1 必改 | 明确线上安全风险、SSR 私密配置暴露、开放重定向、危险跳转、关键测试缺失 | PR 前建议修 | | P2 建议 | 安全加固建议、测试覆盖缺口、验证清单补充 | 可本 PR 修或记录 |

默认只输出 P0 / P1 / P2。不为凑数输出低价值项。


执行流程

1. 获取 diff 与文件清单
2. 读安全 / 测试相关的项目上下文
3. 按 1. 安全性 → 2. 测试与回归 顺序审查
4. 对每条发现做证据核对:文件:行、触发条件、影响范围、建议修法
5. 内部自省一次:是否遗漏 P0 安全项、是否有安全修法引出的连锁风险
6. 输出一轮报告并收口;若发现属于 vue-fe-review 范围的疑点,只在末尾单独列一节提醒

大型 diff 策略:

  • 改动文件 >30 个:优先审 request 层、SSR 配置、鉴权 / 权限逻辑、跳转 / 重定向、日志输出、依赖变更。
  • 只做抽样时必须明说抽样范围和未覆盖文件。
  • 不确定的点标为「需确认」,不要脑补。

输出格式

## pre-pr-review 完成

**范围**: 当前 diff / 指定 ref / 指定文件,共 N 个文件
**结论**: 可提交 / 建议修完再提交 / 阻断提交
**统计**: 安全 P0 x / P1 x / P2 x    测试 P1 x / P2 x

## P0 阻断
1. `path/to/file.ts:42` — 问题标题
   - 类型:安全 / 测试
   - 影响:会导致什么线上问题
   - 证据:为什么确定是问题
   - 建议:具体改法或代码方向

## P1 必改
...

## P2 建议
...

## 验证清单
- [ ] typecheck / lint / test / build
- [ ] 关键业务路径手工验证(登录 / 支付 / 权限 / 数据写入)
- [ ] 新增分支的单测 / e2e / 手工步骤

## 疑似 Vue 专项(建议再跑 vue-fe-review)
- `file:line` — 一句话说明看到了什么,不下结论
- 如果没有,写「无」。

## 未覆盖 / 需确认
- 如果没有,写「无」。

无问题时:

## pre-pr-review 完成

**范围**: 当前 diff,共 N 个文件
**结论**: 未发现 P0/P1/P2 安全或测试问题,可提交。
**验证建议**: typecheck、lint、相关测试、关键鉴权 / 跳转路径手工验证。

禁止

  • 禁止在审查阶段改代码。
  • 禁止跳过项目上下文只凭 diff 猜测。
  • 禁止越界输出性能 / 类型 / 响应式 / SSR / 设计等 Vue 专项结论(只在末尾提醒去跑 vue-fe-review)。
  • 禁止泛泛输出「注意安全」,必须有文件、行号和可执行建议。
  • 禁止把历史旧问题算到本次 PR,除非本次 diff 触发或放大该问题。
  • 禁止输出 exploit 细节、攻击 payload 或绕过检测方法。
  • 禁止为了显得严格而凑问题。
  • 禁止在报告 / 中文回复中使用斜体(*文字* / _文字_);需要强调统一用粗体,引用文件 / 行号 / 字段名 / 命令用反引号。

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.