Create a Pull Request for the current issue branch
Automatically creates a PR for the current issue branch after running pre-flight checks (typecheck/lint). Captures optional screenshots if session token provided, then creates PR with issue details and updates labels.
/plugin marketplace add builtby-win/skills/plugin install pr@builtby-win-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Create a PR that links to and closes the current issue, with optional screenshot support.
/prBEFORE capturing screenshots or creating PR, run these checks:
# Run typecheck (if project has it)
echo "🔍 Running typecheck..."
npm run typecheck # or pnpm/yarn equivalent
if [ $? -ne 0 ]; then
echo "❌ Typecheck failed. Fix type errors before creating PR."
echo "Hint: Review errors and fix manually."
exit 1
fi
# Run lint (if project has it)
echo "🔍 Running lint..."
npm run lint # or pnpm/yarn equivalent
if [ $? -ne 0 ]; then
echo "❌ Lint errors found."
echo "💡 Try running auto-fix command if available (e.g., 'npm run check')."
echo "Then review remaining errors and fix manually."
exit 1
fi
echo "✅ Pre-flight checks passed - proceeding to PR creation"
Note: Adjust the commands (npm/pnpm/yarn, typecheck/lint) based on your project's configuration.
If checks fail:
Note: This step is optional and depends on your project having:
If your project supports it:
Ask user for session token: Example: "Would you like me to capture a screenshot of the changes? If so, please provide your session token from https://yourproject.com/dev/session"
If user provides token, capture screenshot:
a. Ensure dev server is running
b. Navigate to session import page and import token
c. Navigate to the relevant page (e.g., dashboard, feature page)
d. Take screenshot: .github/pr-screenshots/pr-{issue-number}.png
e. Commit the screenshot:
mkdir -p .github/pr-screenshots
git add .github/pr-screenshots/pr-{N}.png
git commit -m "docs: add screenshot for PR"
If user declines or project doesn't support it, skip to Step 1.
git branch --show-current
Parse the branch name to extract issue number:
{PROJECT_PREFIX}/issue-{N}-*myproject/issue-15-dark-mode → Issue #15If not on an issue branch, ask user which issue this PR is for.
gh issue view {N} --json title,body
git push
Create a summary from:
git log main..HEAD --onelinegh pr create \
--title "feat: {issue title}" \
--body "Closes #{N}
## Summary
{brief summary of changes}
## Changes
{list key changes or auto-generate from commits}
## Screenshot
{If screenshot was captured in Step 0, include:}

{If no screenshot, omit this section}
## Test Plan
- [ ] Manual testing completed
- [ ] Build passes
- [ ] No regressions
" \
--base main
gh issue edit {N} --remove-label "status:in-progress"
gh issue edit {N} --add-label "status:pr-ready"
Output:
Created PR #{PR_NUM}: feat: {title}
{PR URL}
Closes #{N}
Status updated: pr-ready
Waiting for review.
Match the issue type:
feat: for new featuresfix: for bug fixesdocs: for documentationrefactor: for refactoringstyle: for styling changestest: for test additionsCloses #N which auto-closes the issue on mergeIn your project's CLAUDE.md, set:
## GitHub Workflow Configuration
PROJECT_PREFIX=your-project-name
Example configurations:
PROJECT_PREFIX=myappPROJECT_PREFIX=builtby-win-web