一键导入
Create a GitHub pull request with AI-generated title and description based on the diff
npx skills add https://github.com/leighmcculloch/dotfiles --skill pr复制此命令并粘贴到 Claude Code 中以安装该技能
Create a GitHub pull request with AI-generated title and description based on the diff
npx skills add https://github.com/leighmcculloch/dotfiles --skill pr复制此命令并粘贴到 Claude Code 中以安装该技能
Create GitHub issues with context from linked issues/PRs
Meeting prep for the next day's calendar, posted to a Slack Canvas.
A briefing for the day.
Pick a random small unassigned GitHub issue from a locally checked-out repo, implement it with an agent team, code-review and iterate until clean, then Slack DM the PR. Use when asked to "find an issue and fix it", "tackle an issue", "pick up an issue", or run autonomously on whatever's open.
Create a git branch with a concise kebab-case name describing the pending changes
Review a PR with the code-review skill, then post that feedback as inline draft comments with the pr-draft-comment skill. Use when asked to review a PR and leave the findings as pending/draft inline comments.
| name | pr |
| description | Create a GitHub pull request with AI-generated title and description based on the diff |
Creates a draft pull request with a title and description generated from the diff between the current branch and the base branch.
Formatting rules:
- [ ] Tested), keep that as-is; do not invent prose bullets of your own.### What and ### Why headings.Get the default branch and check for ancestor branches:
git symbolic-ref refs/remotes/origin/HEAD --short | sed 's|origin/||'
If there's an ancestor branch that isn't the default branch, ask the user which to use as the base.
Get the diff between base branch and HEAD:
git log --patch {base_branch}..HEAD
If no changes are detected, inform the user and stop.
If the user provides an issue number or URL earlier in the conversation or now:
gh issue view {issue_number} --json url,number,title,body,comments
The issue's title, body, and comments contain the reasoning and motivation for the change. This context must be incorporated into the PR's "Why" section to echo the problem being solved.
Step 1: Find PR templates Do steps 1a and 1b in parallel.
Step 1a: Check target repository
Try each of these paths via gh api repos/{owner}/{repo}/contents/{path} until one returns content:
.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE.md.github/PULL_REQUEST_TEMPLATE/ (directory of multiple templates)docs/pull_request_template.mdpull_request_template.mdStep 1b: Check org's .github repository
Query GitHub's public HTTP endpoints, not the GitHub API. Try the same paths under the org's .github repo via the raw endpoint with curl -fsSL, treating an HTTP 200 as "exists" and a 404 as "missing":
https://raw.githubusercontent.com/{repo_owner}/.github/HEAD/{path}
For the .github/PULL_REQUEST_TEMPLATE/ directory, list its contents by fetching the public repo tree page with WebFetch:
https://github.com/{repo_owner}/.github/tree/HEAD/.github/PULL_REQUEST_TEMPLATE
Step 2: Select template
Title:
Body — if a template was found:
Populate the template's sections directly. Do not add ### What or ### Why headings unless the template itself has them. Keep paragraphs as single unwrapped lines.
Body — if no template was found, use What/Why:
What section:
Why section:
Style contrast (study before writing):
Avoid (machine-generated, lists the how):
- Emit a warning from the build script when X cannot be derived.
- Document in lib.rs and README that downstream should use
option_env!.- Update the example snippet from
env!tooption_env!.- Add test covering the no-git path.
Prefer (hyperfocused, names the overarching change):
Expand the crate-level docs with sections covering builds without version info, shallow clone support, and the stripping of path-redirecting
GIT_*env vars.
Step 1: Write the draft to NOTES_PR.md
Write the complete draft PR to NOTES_PR.md in the current working directory. Write all paragraphs as single unwrapped lines:
# Draft Pull Request
**Base branch:** {base_branch}
## Title
{title}
## Body
{body}
{body} is either the populated template (if one was found) or the What/Why sections (if not).
Step 2: Present for review
After writing the file, inform the user:
I've written the draft PR to NOTES_PR.md for your review.
Would you like me to create the PR with this content, or would you like to make changes?
Wait for user confirmation before proceeding. If the user requests modifications, update NOTES_PR.md with the changes before creating the PR.
After user confirmation. Assume the branch is already pushed — do not push:
gh pr create \
--draft \
--base "{base_branch}" \
--title "{title}" \
--body "{full_body}" \
--reviewer "{reviewers}"
The body should be either the populated template or the ### What and ### Why sections (if no template). Append Close #{issue_number} if linked to an issue.
Pass all paragraphs to --body as single unwrapped lines.
Output the created PR URL.