gh-pr-publish
Create, update, and publish GitHub pull requests with a clean title, durable body, branch hygiene, validation notes, and safe push/PR gates. Use when opening a PR, updating a PR description, preparing a draft PR, or publishing local changes to GitHub.
What this skill does
# GH PR Publish
Create or update a GitHub pull request from local changes without losing context
or pushing unsafe work.
## Contract
Inputs:
- Repository root
- Current branch, target branch, and optional existing PR number
- Optional user preference: draft or ready PR
Outputs:
- PR URL
- Title/body summary
- Checks run or skipped
- Any remaining approval gates
Creates/Modifies:
- May create a local branch, stage files, create commits, push, and create or
edit a GitHub PR after approval
- May create a temporary PR body file
External Side Effects:
- Writes git history when committing
- Pushes branches to GitHub
- Creates or edits GitHub pull requests
Confirmation Required:
- Before staging broad/unrelated files
- Before creating a commit
- Before pushing
- Before creating or editing a PR
- Before marking a draft PR ready
Delegates To:
- `commit-summary` to create a Conventional Commit
- `gh-fix-ci` when PR checks fail
- `release-pr-gates` for develop/staging/production promotion PRs
- `gh-project-board` when the PR must be added to a project board
## Workflow
1. Verify GitHub and git context:
```bash
gh auth status -h github.com
gh repo view --json nameWithOwner,defaultBranchRef,url
git status -sb
git branch --show-current
git remote -v
```
2. Protect default branches:
- If on `main`, `master`, `develop`, or `staging`, create a feature branch
before committing unless the user explicitly requested a release PR.
- Use branch prefix `codex/` unless the repo has a stronger convention.
- Never rewrite shared branch history.
3. Inspect work before writing:
```bash
git diff --stat
git diff --cached --stat
git log --oneline --decorate -10
```
If unrelated files are present, list them and get approval before staging.
4. Commit only after approval:
```bash
git add <approved-paths>
git diff --staged --stat
git commit -m "<message>"
```
5. Build the PR body from evidence:
- Summary: what changed and why
- Changes: concise bullets grouped by behavior or subsystem
- Verification: exact checks run, or `Not run` with reason
- Risk: migrations, env vars, data changes, rollout notes
- Follow-ups: only real remaining work
Preserve useful existing body sections when updating an open PR.
6. Find or create the PR:
```bash
gh pr list --head <branch> --state open --json number,title,url,baseRefName
gh pr create --base <base> --head <branch> --draft --title "<title>" --body-file <body-file>
gh pr edit <number> --title "<title>" --body-file <body-file>
```
Default to draft unless the user asked for ready review or the repo convention
clearly requires ready PRs.
7. Push only after approval:
```bash
git push -u origin <branch>
```
8. Report:
- PR URL
- Branch and base
- Draft/ready state
- Checks run
- Any required human action
## PR Body Rules
- Use real newlines via `--body-file`; do not pass escaped markdown inline.
- Do not use `--fill` as the final body if the diff needs context.
- Do not claim tests passed unless they were run in this session or clearly
visible from CI.
- If the PR closes issues, include `Closes #123` only when the issue is truly
resolved by the PR.
- If there is no meaningful body, write a short one; blank PR bodies rot.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.