Draft PRs with conventional commit-style titles and Gus work item refs. Use when drafting PRs, PR titles, PR descriptions, opening PRs, or Git2Gus workflows.
Install
npx skillscat add forcedotcom/salesforcedx-vscode/pr-draft Install via the SkillsCat registry.
SKILL.md
PR Draft
Draft PR titles and bodies per salesforcedx-vscode conventions. Requires a Gus work item number.
Work item
Confirmation required: Never create or update work items without explicit user confirmation. Present proposed fields (Subject, Epic, Details, etc.) and wait for user to approve before any sf data create record or sf data update record.
Safety never use --no-verify
- If branch name contains
W-XXXXX, confirm it exists in GUS, resembles the work done on the branch, and use that - Else ask: "Do you have a Gus work item (W-XXXXX) for this PR?"
- If yes → try to find it using gus-cli/SKILL.md. Confirm with the user that you got it right, or ask them to choose if several could be right.
- If no → offer to create via Gus. Follow gus-cli/SKILL.md. Before creating: show user Subject, Epic, Details, assignee. Ask: "Create this work item?" Do not run
sf data create recorduntil user says yes. - Before creating PR: push current branch to remote if it doesn't already exist (
git push -u origin $(git branch --show-current)or equivalent). Never push todevelop/main - After PR created: update work item
Details__cwith PR link. Query currentDetails__c, append"\nPR: <url>"(or prepend if empty). Before updating: show user the new Details__c. Ask: "Update work item with PR link?" Do not runsf data update recorduntil user says yes. - After PR created: offer Ready for Review. Ask: "Put WI in Ready for Review? Who should review?" Choices:
- Named: user picks one (e.g. "Shane", "Daphne") → match first or full name to gus-cli Team members, use Id
- Random (Gus Spinner): pick one at random from team members, excluding current
Assignee__c
SetStatus__c='Ready for Review',QA_Engineer__c='<selected userId>'. Before updating: show user Statusc, QA_Engineerc. Ask user to confirm. Do not runsf data update recorduntil user says yes.
Target branch
- Default
develop - From other branch (≠ develop, ≠ main)? Use it. Detect:
git reflog show <branch> | tail -1→ "moving from X" / "Created from X" - Never
main; inferred main → develop
Title format
type(scope): description W-XXXXX
- Types: feat, fix, docs, style, refactor, perf, test, ci, chore
- Scope: optional
- Work item:
W-XXXXXat end
Body format
- Write body content per concise/SKILL.md
- Include
@W-XXXXX@in "What issues does this PR fix or reference?" per .github/PULL_REQUEST_TEMPLATE.md: - Delete the before/after section if you have nothing to say there
### What issues does this PR fix or reference?
#<GitHub Issue>, @W-XXXXX@