关于 prowler-pr
prowler-pr 是用于创建和维护 Prowler Pull Request 的技能,指导变更分析、模板填写、组件专项检查及评审沟通。
主要功能
- 01分析分支提交与变更内容
- 02按组件选择变更日志和检查
- 03遵循 Conventional Commits 标题
- 04创建 PR 的模板与命令
- 05重新请求评审前清理讨论
适用场景
- 01汇总分支变更并撰写 PR
- 02检查组件对应的提交要求
- 03处理评审线程后重新请求审查
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ prowler-cloud/ prowler --skill prowler-pr安装后在 Claude Code 中输入/prowler-pr确认已加载。
附带文件references/pr-docs.md
详细介绍
PR 创建流程
- 分析变更:使用
git diff main...HEAD了解所有提交 - 确定受影响的组件:SDK、API、UI、MCP、文档
- 根据变更填写模板各部分
- 使用
gh pr create创建 PR
PR 模板结构
### Context
{Why this change? Link issues with `Fix #XXXX`}
### Description
{Summary of changes and dependencies}
### Steps to review
{How to test/verify the changes}
### Checklist
<details>
<summary><b>Community Checklist</b></summary>
- [ ] This feature/issue is listed in [here](https://github.com/prowler-cloud/prowler/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen) or roadmap.prowler.com
- [ ] Is it assigned to me, if not, request it via the issue/feature in [here](https://github.com/prowler-cloud/prowler/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen) or [Prowler Community Slack](goto.prowler.com/slack)
</details>
- Are there new checks included in this PR? Yes / No
- If so, do we need to update permissions for the provider?
- [ ] Review if the code is being covered by tests.
- [ ] Review if code is being documented following https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings
- [ ] Review if backport is needed.
- [ ] Review if is needed to change the Readme.md
- [ ] Ensure a changelog fragment is added under <component>/changelog.d/, if applicable.
#### SDK/CLI
- Are there new checks included in this PR? Yes / No
- If so, do we need to update permissions for the provider? Please review this carefully.
#### UI (if applicable)
- [ ] All issue/task requirements work as expected on the UI
- [ ] Screenshots/Video - Mobile (X < 640px)
- [ ] Screenshots/Video - Tablet (640px > X < 1024px)
- [ ] Screenshots/Video - Desktop (X > 1024px)
- [ ] Ensure a changelog fragment is added under ui/changelog.d/
#### API (if applicable)
- [ ] All issue/task requirements work as expected on the API
- [ ] Endpoint response output (if applicable)
- [ ] EXPLAIN ANALYZE output for new/modified queries or indexes (if applicable)
- [ ] Performance test results (if applicable)
- [ ] Any other relevant evidence of the implementation (if applicable)
- [ ] Verify if API specs need to be regenerated.
- [ ] Check if version updates are required.
- [ ] Ensure a changelog fragment is added under api/changelog.d/
### License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
组件专属规则
| 组件 | 变更日志片段 | 额外检查 |
|---|---|---|
| SDK | prowler/changelog.d/ | 新检查项是否需要更新权限? |
| API | api/changelog.d/ | API 规范、版本升级、端点输出、EXPLAIN ANALYZE、性能 |
| UI | ui/changelog.d/ | Mobile/Tablet/Desktop 的截图 |
| MCP | mcp_server/changelog.d/ | 不适用 |
命令
# Check current branch status
git status
git log main..HEAD --oneline
# View full diff
git diff main...HEAD
# Create PR with heredoc for body
gh pr create --title "feat: description" --body "$(cat <<'EOF'
### Context
...
EOF
)"
# Create draft PR
gh pr create --draft --title "feat: description"
标题规范
遵循 Conventional Commits 规范:
feat:新功能fix:错误修复docs:文档chore:维护refactor:代码重构test:测试
创建 PR 前
- ✅ 所有测试均在本地通过
- ✅ Lint 检查通过(
make lint或组件专属检查) - ✅ 已添加变更日志片段(如适用)
- ✅ 分支已与 main 保持同步
- ✅ 提交整洁且描述清晰
重新请求审查前(必需)
重新请求审查前,解决或回复每一条未处理的内联审查讨论:
- 同意并已修复:提交变更,并回复提交哈希,以便审查者快速验证:
已在
abc1234中修复。 - 同意但暂缓处理:说明为何此事不在本 PR 的范围内,以及后续跟踪位置。
- 不同意:给出清晰的技术理由。不要让讨论默默地处于未处理状态。
- 只有在所有讨论均已妥善处理后,才能重新请求审查——即已解决或已明确回复。
经验法则:审查者重新打开 PR 时,不应疑惑“对方看到我的评论了吗?”
资源
- 文档:参阅 references/ 中的本地开发指南链接
评论
支持 Markdown