用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/bentford/dotfiles --skill pr命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | pr |
| description | Create a pull request with an auto-generated description |
| allowed-tools | Bash, Read, Grep, Glob |
Determine the base branch by running:
git remote show origin
Look for the "HEAD branch" line to identify whether the default branch is master or main. Use that as the base branch.
Ensure the current branch is pushed to origin. If it does not already track a remote branch, push with:
git push -u origin HEAD
Gather context for the PR description:
Get all commit messages on this branch:
git log <base>..HEAD --oneline
Get the full diff of changes:
git diff <base>...HEAD
Extract a ticket ID from the current branch name using the pattern [A-Z]+-[0-9]+ (e.g. MCB-29 from ben/MCB-29-add-admin-tool). If a ticket ID is found, prepare a Linear link: https://linear.app/issue/<TICKET>.
Generate a PR title — a concise summary of the changes, under 70 characters.
Generate a PR description in this format:
## Summary
<1-3 bullet points describing what changed and why>
## Test plan
<bulleted checklist of how to verify the changes>
<Linear ticket link if a ticket ID was found, otherwise omit>
Create the PR using gh pr create targeting the detected base branch. Use a HEREDOC for the body to preserve formatting:
gh pr create --base <base> --title "the pr title" --body "$(cat <<'EOF'
## Summary
...
## Test plan
...
https://linear.app/issue/TICKET-123
EOF
)"
Enable auto-merge (unless the user passed --no-auto-merge or no-auto-merge as an argument):
gh pr merge --auto --merge
Output the PR URL returned by gh pr create.
gh pr create fails because a PR already exists, inform the user and show the existing PR URL.--no-auto-merge to skip it.