with one click
github-pr-workflow
// Code-delivery skill. Use only when the user explicitly asks for branch/commit/push/PR delivery workflow for finished code changes in this repo.
// Code-delivery skill. Use only when the user explicitly asks for branch/commit/push/PR delivery workflow for finished code changes in this repo.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | github-pr-workflow |
| description | Code-delivery skill. Use only when the user explicitly asks for branch/commit/push/PR delivery workflow for finished code changes in this repo. |
| metadata | {"family":"code","owner":"engineering","last_reviewed":"2026-04-30T00:00:00.000Z","version":"1.0.0"} |
This is a code-generation family skill. It is only for shipping finished code work.
Use this skill only if at least one is true:
Do not use this skill automatically just because code changes exist.
Publish a finished feature to GitHub with a clean branch, commit, push, and PR workflow using:
gitghRemote currently expected in this repo:
origin git@github.com:Adrienenjalbert/flex-carrer-hub.gitOptimize for a reviewer who is checking AI-generated PRs and wants:
These priorities override convenience.
If the work is finished but there is no suitable feature branch yet, create one before committing or pushing.
Do not keep finished feature-delivery work on main or master.
Before creating or switching delivery branches, fetch the latest remote state for:
developmain, only when origin/develop does not exist and must be created from latest origin/mainNew delivery branches must start from up-to-date remote state, not stale local refs.
Preferred branch pattern:
feature/<slug>fix/<slug>docs/<slug>refactor/<slug>chore/<slug>test/<slug>build/<slug>ci/<slug>deps/<slug>launch/week-<N>-<pillar> — reserved for the 8-week phased SEO launch.
Follow the dedicated template at
nextjs-app/docs/launch-plan/PR_TEMPLATE.md.Choose the prefix that matches the actual delivery scope.
Use a short, reviewer-readable slug that describes one feature or one fix.
Examples:
feature/paycheck-calculator-state-pagesfix/canonical-city-role-metadatarefactor/tool-registry-selectorsDo not create vague branch names like:
feature/stufffix/misctest/changesMandatory rule:
If the branch contains unrelated work, do not create the PR until scope is reduced or the user explicitly decides otherwise.
Default base branch:
developIf develop does not exist on origin at PR creation time, create it from the latest origin/main before creating the PR.
Exception:
Do not guess this dependency. Use a base other than develop only when:
Mandatory rule:
Before PR creation, update the source branch against the latest base branch and resolve conflicts locally. If conflicts occur and cannot be resolved cleanly, stop before PR creation and report the blocker.
The PR should contain only the files needed for the finished feature.
Do not include:
Before creating a PR, confirm all are true:
Always sync before branch creation, commit finalization, push, and PR creation:
git fetch origin developgit fetch origin <source-branch> when the source branch exists on originIf develop does not exist on origin, create it from the latest origin/main:
git fetch origin maingit push origin refs/remotes/origin/main:refs/heads/developgit fetch origin developDo not create develop from a stale local main.
Check:
git status --shortgit diff --statgit diff for changed files if neededGoal:
Use verification-checklist logic.
Default checks for code changes:
pnpm checkpnpm typecheckpnpm buildAlso run when relevant:
pnpm smokepnpm seo:auditIf checks are skipped or failing, say so explicitly before PR creation.
Check:
origin/develop and the source branch were fetched before creating any new branchdevelop exists remotely, creating it from latest origin/main only if neededUseful commands:
git branch --show-currentgit status -sbgit rev-parse --abbrev-ref --symbolic-full-name @{upstream} when usefulIf the current branch is unsuitable for delivery, create a new correctly named branch before committing:
git switch -c <type>/<slug> origin/developSuitability rules:
mainmasterdevelopStage only intended files.
Use:
git add <paths>git commit -m "<type>: <summary>"Commit rules:
feat:, fix:, refactor:, docs:, chore:Before pushing or creating a PR:
origin/<base-branch>Acceptable commands:
git fetch origin <base-branch>git merge --no-edit origin/<base-branch>git rebase origin/<base-branch> when the branch is not sharedIf this step reports conflicts, do not create the PR until the conflicts are resolved and verification has been rerun.
Use:
git push -u origin <branch> if upstream is missinggit pushghPreferred flow:
gh pr create --fill --base <base-branch> --head <branch>If --fill is weak, provide explicit title/body:
gh pr create --base <base-branch> --head <branch> --title "<title>" --body "<body>"Base branch rule:
develop by defaultBefore running gh pr create, confirm:
develop exists on origin, creating it from latest origin/main if neededorigin/<base-branch>Keep the PR body practical and short.
Include:
Also include, when useful:
developSuggested structure:
## Summary
- ...
## Verification
- `pnpm check`
- `pnpm typecheck`
- `pnpm build`
## Notes
- ...
develop unless explicitly required by stacked feature work or the user says so.origin/develop and the source branch.git add . blindly in a dirty tree.main, master, or develop.When done, report:
develop unless an explicit stacked base was requiredIf blocked, report the exact blocker:
gh auth missing