create-github-pull-request-from-specification
SKILL.md
Create GitHub Pull Request from Specification
Create or update a GitHub pull request using the specification at ${workspaceFolder}/.github/pull_request_template.md.
If the template file does not exist, create it first from assets/default-pull-request-template.md.
Prerequisites
- Run inside a Git repository with a checked out feature branch.
ghmust be installed and authenticated.${input:targetBranch}must be a valid base branch name.
Process
- Check whether
${workspaceFolder}/.github/pull_request_template.mdexists. - If it is missing, create
${workspaceFolder}/.github/and copyassets/default-pull-request-template.mdto.github/pull_request_template.md. - Read
${workspaceFolder}/.github/pull_request_template.mdand extract the required sections for the pull request title and body. - Determine the current branch and confirm
${input:targetBranch}as the base branch. - Check whether a pull request already exists for the current branch. Use
gh pr list --head <current-branch>orgh pr view <current-branch>for this lookup. - If no pull request exists, create a draft pull request targeting
${input:targetBranch}. Usegh pr create --draft --base <target-branch>. - Once the pull request exists, inspect its code changes with
gh pr diffso the title and body reflect the actual diff, not only the template text. - Update the pull request title and body with the extracted template content and diff summary. Use
gh pr edit --title ... --body .... - Mark the pull request ready for review after the draft content is complete. Use
gh pr ready. - Fetch the authenticated GitHub username with
gh api userand assign that user to the pull request. Usegh pr edit --add-assignee <username>. - Return the pull request URL to the user.
Requirements
- Single pull request for the complete specification
- Clear title identifying the specification and the implemented change
- Fill the pull request body with enough detail from
pull_request_template.md - When the template is missing, create it from the bundled default template before continuing
- Verify against existing pull requests before creation
- Do not create a duplicate pull request for the same branch
- Stop and report the error if
ghis unavailable, unauthenticated, or a required command fails
Weekly Installs
1
Repository
kweaver-ai/skillsFirst Seen
7 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
warp1