公关

工程开发 社区

技能解读

当前原文的自动摘译,尚未人工审校。

第1步:检查分支

运行git branch --show-current。如果在main,告诉用户他们无法从主分支创建 PR 并停止。运行 git log main..HEAD --oneline 以检查 main 之前的提交。如果没有提交并且工作目录是干净的,则告诉用户没有什么可以创建 PR 并停止。

步骤 2:检查工作目录

运行git status检查工作目录是否干净。干净:继续步骤 3。 脏(任何暂存、未暂存或未跟踪的更改):询问用户:首先提交更改 - 建议使用/ci,然后停止并让用户运行它。忽略本地更改并继续仅基于现有提交创建 PR。

第 3 步:推送并创建 PR

运行git push -u origin HEAD来推送分支。运行git log main..HEAD来分析该分支上的所有提交。根据它们生成简洁、不言自明的公关描述。运行 gh pr create,标题遵循 Conventional Commits 模式。基础分支是main。

第 4 步:请求审核代理

创建 PR 后,自动向可用的审核代理请求代码审核:运行gh pr edit --add-reviewer @copilot 请求 Copilot 代码审核。如果命令成功,请注意已请求​​ Copilot 审核。如果失败(例如,Copilot 无法用于存储库),请静默跳过并继续。

第5步:显示结果

向用户显示 PR URL 以及审核请求状态。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
工程开发
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

## Quick Reference
```
/pr                 # Create GitHub PR from current branch
```

## Workflow

### Step 1: Check branch

Run `git branch --show-current`. If on `main`, tell the user they cannot create a PR from the main branch and stop.

Run `git log main..HEAD --oneline` to check for commits ahead of main. If there are no commits AND the working directory is clean, tell the user there is nothing to create a PR for and stop.

### Step 2: Check working directory

Run `git status` to check if the working directory is clean.

- **Clean**: Proceed to Step 3.
- **Dirty** (any staged, unstaged, or untracked changes): Ask the user:
  1. Commit changes first — suggest using `/ci`, then stop and let the user run it.
  2. Ignore local changes and continue creating the PR based on existing commits only.

### Step 3: Push and create PR

1. Run `git push -u origin HEAD` to push the branch.
2. Run `git log main..HEAD` to analyze all commits on this branch. Generate a succinct, self-explanatory PR description from them.
3. Run `gh pr create` with a title following `Conventional Commits` pattern. Base branch is `main`.

### Step 4: Request review agents

After the PR is created, automatically request code review from available review agents:

1. Run `gh pr edit --add-reviewer @copilot` to request Copilot code review.
2. If the command succeeds, note that Copilot review has been requested.
3. If it fails (e.g., Copilot not available for the repo), skip silently and continue.

### Step 5: Show result

Display the PR URL to the user, along with the review request status.

## Rules

- This skill only creates PRs. It does not format, stage, or commit code.
- The PR title must follow Conventional Commits pattern (e.g., `feat:`, `fix:`, `refactor:`).
- If a PR already exists for this branch, display the existing PR URL instead of creating a new one.

---
> Source: [darknight/cc-deck](https://github.com/darknight/cc-deck) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。