qv-sdk-pr-create
Skill697 starsChanged 18 days agoApache-2.0View on GitHub
Generate PR descriptions for SDK pod packages following template and format rules. Use when creating an SDK pod PR or invoking /qv-sdk-pr-create.
- Commits and pushes
We split this skill into the rules it gives an agent
32 rules. About 0 are common, 18 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
Base (target): must be exactly release-<pkg>-<x.y.z> (e.g.
- Very specific: line 49
Head (working branch): must not start with release- when pushed to the org remote.
- Distinctive: line 75
Only ask user for input when inference confidence is low
- Distinctive: line 83
If base is a release branch, chain into the dual-PR flow (see "Release Target Dual-PR Flow" below)
- Distinctive: line 92
ASK only if no ticket found
- Distinctive: line 96
Use majority prefix from commit messages
- Distinctive: line 97
If no conventional commits, infer from diff:
- Very specific: line 100
Only .md files → doc
- Very specific: line 101
Only test files → test
- Distinctive: line 102
ASK only if mixed signals or unclear
- Distinctive: line 108
ASK only if change scope is ambiguous
- Distinctive: line 112
If test files modified → "Unit tests added/updated for X"
- Distinctive: line 113
If no tests → ASK what manual testing was done
- Very specific: line 128
If triggered and packages/cli is unchanged:
- Distinctive: line 130
ASK: "CLI not updated. Add CLI in this PR, mark library-only in the body, or skip?"
- Distinctive: line 131
Add CLI: stop until the CLI diff is present.
- Distinctive: line 135
ALWAYS output the PR in this copy-ready format, even when making corrections:
- Very specific: line 152
After generating the PR description, check for gh CLI:
- Very specific: line 154
Check if gh is installed: which gh
- Very specific: line 155
Check remotes: git remote -v — identify the org remote (tetherto/qvac) and any fork remote
- Distinctive: line 156
If available, ask user: "Create PR now with gh CLI?" [Yes / No / Preview first]
- Distinctive: line 157
If yes, ensure changes are committed, then push the head branch to the org remote when the user has write access.
- Very specific: line 188
Do not add fork trust gates on org-branch PRs.
- Distinctive: line 189
Commit and push before creating PR
- Distinctive: line 191
If gh not available, output the copy-ready markdown format above
- Very specific: line 207
If triggered, ask user: "PR touches sdk's deps/version.
- Very specific: line 208
If yes, read .agents/skills/qv-sdk-inference-version/SKILL.md and follow it inline.
- Very specific: line 209
Verify: npm run enforce-inference-versions in packages/sdk and packages/sdk-python generate.py --check must both pass.
- Very specific: line 222
When triggered, ask: "user-facing SDK/CLI change with no docs-website diff.
- Very specific: line 223
If yes, read .agents/skills/qv-docs-update/SKILL.md and follow it.
- Distinctive: line 224
If no (library-only), put the library-only note in the PR body — one line on why the change needs no docs.
- Distinctive: line 281
Before outputting the PR description, verify:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SDK Pod PR Creation
Generate PR titles and descriptions for SDK pod packages, following the team's template and format rules.
When to use this skill
Applies to SDK pod packages whose paths are owned by .github/teams/sdk.json.
Use when:
- Creating a PR for any SDK pod package
- User asks to generate PR description
- User invokes
/qv-sdk-pr-create
Branch / remote preference
Preferred path for internal SDK work: push the head branch to the org repo (tetherto/qvac) and open a same-repo PR. Org-branch ready PRs get baseline CI without any fork trust gate. Heavy tiers still opt in via labels (test-e2e-smoke / test-e2e-full, addon stage labels, etc.). Prefer Ready for review over Draft when you want baseline checks to run (drafts run nothing until ready).
Fallback: personal-fork → org PRs still work, but a personal fork counts as external. Privileged CI needs a merge/release-team member to approve the fork-ci environment on each workflow run for the current head SHA; each new push re-prompts. Do not ask the PR author to self-approve fork-ci.
Resolve remotes from git remote -v:
- Org remote — URL contains
tetherto/qvac(often namedupstream, sometimesorigin) - Fork remote — contributor fork, if present (often named
originwhen org isupstream)
In command examples below, ORG_REMOTE / FORK_REMOTE / BRANCH are placeholders — substitute the resolved remote and branch names. Do not run those tokens literally.
Release PR branch naming (org-branch path)
publish-sdk.yml (and sibling publish workflows) run Release Merge Guard on
push to any release-* ref. The guard validates github.ref_name — the branch
that was pushed — not the PR base. It requires
release-<pkg>-x.y.z (three-part semver).
A release train base is release-train-<train>-<x.y.z> instead (see
qv-release-train); pr-release-guard.yml checks it. Rules 2 and 3 below apply
unchanged; for rule 1, read release-train-<train>-<x.y.z> and prefer a head of
chore/<train>-train-<x.y.z>-changelog.
Consequences for release changelog / metadata PRs:
- Base (target) must be exactly
release-<pkg>-<x.y.z>(e.g.release-sdk-0.17.0). Short cuts likerelease-sdk-0.17fail the guard on merge/publish. If the cut is short-named, STOP and ask a repo admin to rename it to the three-part form before relying on publish (protected-branch rename needs admin). - Head (working branch) must not start with
release-when pushed to the org remote. Preferchore/<pkg>-<x.y.z>-changelog(e.g.chore/sdk-0.17.0-changelog). Names likerelease-sdk-0.17.0-changelogtrip Release Merge Guard on the helper push and can leave a failing check on that commit SHA. - GitHub cannot retarget a PR's head. To rename a bad head: push the same
commits under the new name, open a new PR, close the old one, delete the old
remote head. If the new PR still shows a stale Release Merge Guard fail on the
same SHA, push an empty
[skiplog]commit so checks reattach to a fresh SHA.
backmerge/release-<pkg>-<x.y.z> heads are fine — they do not match the
release-* push trigger.
Release changelog PRs (metadata + notes onto release-<pkg>-x.y.z):
- Title is
chore:(optional[mod]when the cut is catalog-only). Do not put[bc]on the release title; breaking lives inbreaking.md. - Body API / Models / Breaking sections are copied from
changelog/<this version>/, not from an earlier hop or the generator summary. Delete a section only when that file is absent.
Workflow
- Identify base and current branch — note whether the base is
mainor arelease-<pkg>-<x.y.z>branch. For release PRs, apply Release PR branch naming above (base three-part; head notrelease-*) - Resolve the head remote (prefer org remote; see above). Collect commits/diff from
<base>...<head-remote>/<branch>(or localHEADif not yet pushed) - Infer ticket, prefix, and tags from changes (see Inference Strategy)
- Only ask user for input when inference confidence is low
- Generate title:
TICKET prefix[tags]: subject - Fill template sections based on changes
- Validate tag requirements ([bc]/[api]/[mod])
- If the diff exposes or changes a user-facing SDK capability, apply first-class product parity (see below) before outputting the description
- If diff touches the
versionofpackages/sdkor its@qvac/inferencerange, or sdk's dep blocks, chain into theqv-sdk-inference-versionskill (see "SDK @qvac/inference Version Trigger" below) - If the diff touches user-facing paths under
packages/sdk,packages/cli, orpackages/sdk-pythonanddocs/website/content/docsis not already in the diff, apply the docs website trigger (see "Docs Website Trigger" below) before outputting the description - Output complete PR description
- If base is a release branch, chain into the dual-PR flow (see "Release Target Dual-PR Flow" below)
Inference Strategy
Infer first, ask only if uncertain:
Ticket number:
- Extract from branch name pattern:
QVAC-\d+,SDK-\d+ - Extract from commit messages if referenced
- ASK only if no ticket found
Prefix (feat/fix/doc/test/chore/infra):
- Extract from branch name prefix:
feat/,fix/,infra/, etc. - Use majority prefix from commit messages
- If no conventional commits, infer from diff:
- New files/exports →
feat - Bug-related changes →
fix - Only .md files →
doc - Only test files →
test
- New files/exports →
- ASK only if mixed signals or unclear
Tags ([api]/[bc]/[mod]):
[api]: new exported functions/types in public API[bc]: removed/changed existing public API signatures[mod]: changes to model constant definitions- ASK only if change scope is ambiguous
- Release changelog PRs (base
release-*, diff is notes / NOTICE / version / generated docs): title ischore:(optional[mod]). Do not copy[bc]/[api]from the notes into the title. Body API / Models / Breaking still copychangelog/<this version>/.
Testing section:
- If test files modified → "Unit tests added/updated for X"
- If no tests → ASK what manual testing was done
Format References
- PR title format: See
docs/gitflow.mdand the validation rules below - PR body template: See
.github/PULL_REQUEST_TEMPLATE/sdk-pod.md
Fill template sections based on the diff analysis. Delete sections that don't apply.
First-class product parity (CLI)
Trigger: the diff touches packages/sdk/server/bare/plugins/**, packages/sdk/client/api/**, a plugin *-config.ts schema, or a request/sampling schema used by serve, and the change is a user-facing inference capability (new modality, new request field, new load-time modelConfig field). Native addon-only diffs skip this.
See packages/sdk/AGENTS.md.
If triggered and packages/cli is unchanged:
- ASK: "CLI not updated. Add CLI in this PR, mark library-only in the body, or skip?"
- Add CLI: stop until the CLI diff is present. Library-only: one-line why in the body. Skip: reminder at the end.
Output Format
ALWAYS output the PR in this copy-ready format, even when making corrections:
## PR Title
```
TICKET prefix[tags]: subject
```
## PR Body
```markdown
## 🎯 What problem does this PR solve?
...
```gh CLI Integration
After generating the PR description, check for gh CLI:
- Check if
ghis installed:which gh - Check remotes:
git remote -v— identify the org remote (tetherto/qvac) and any fork remote - If available, ask user: "Create PR now with gh CLI?" [Yes / No / Preview first]
- If yes, ensure changes are committed, then push the head branch to the org remote when the user has write access. Only push to a personal fork when org push is unavailable or the user explicitly chooses the fork path
- Create the PR:
# Preferred — org-branch (same-repo) PR.
# ORG_REMOTE = remote whose URL is tetherto/qvac (often `upstream` or `origin`).
git push -u ORG_REMOTE BRANCH
gh pr create \
--repo tetherto/qvac \
--base main \
--head BRANCH \
--title "TICKET prefix: subject" \
--body "..."
# Fallback — personal fork -> org PR (external CI path; needs merge/release fork-ci approval per run):
git push -u FORK_REMOTE BRANCH
gh pr create \
--repo tetherto/qvac \
--base main \
--head FORK_OWNER:BRANCH \
--title "TICKET prefix: subject" \
--body "..."
# Then open in browser:
gh pr view --repo tetherto/qvac BRANCH --webImportant:
--webalone only opens browser for manual creation, does NOT create the PR- For fork PRs, must specify
--repo,--base, and--head FORK_OWNER:BRANCHexplicitly - For org-branch PRs,
--head BRANCH(noowner:) is enough when--repo tetherto/qvac - Do not add fork trust gates on org-branch PRs; baseline CI runs without them. For fork PRs, tell the user a merge/release reviewer must approve the pending
fork-cideployment after reviewing the current head - Commit and push before creating PR
- If gh not available, output the copy-ready markdown format above
- As part of the output, provide a clickable hyperlink (not plain text) to the PR on GitHub.
SDK @qvac/inference Version Trigger
Trigger: the PR diff (<base>...<head-remote>/<branch> or local HEAD) modifies the version of packages/sdk/package.json or its @qvac/inference range, or sdk's dependencies / optionalDependencies / peerDependencies.
When triggered, prompt the user to run qv-sdk-inference-version so the versions and the generated Python client are right in the same commit/PR: @qvac/sdk's version and its @qvac/inference range sharing a major.minor, and tetherto-qvac-sdk (generated SDK_VERSION / _generated/) at the SDK's version. A range on a different major.minor fails the SDK's lint on every PR.
A change to packages/inference/package.json alone is not a trigger — the engine has its own version and its own release.
Steps (after Step 8 of Workflow above)
- Detect the trigger condition by inspecting the diff:
git diff <base>...<head-remote>/<branch> -- packages/sdk/package.json(or vs localHEAD) shows changes- Changes touch sdk's
versionline, its@qvac/inferencerange, OR sdk'sdependencies/optionalDependencies/peerDependenciesblock
- If triggered, ask user: "PR touches sdk's deps/version. Run
qv-sdk-inference-version(version + sdk-python)?" [Yes / No (skip)] - If yes, read
.agents/skills/qv-sdk-inference-version/SKILL.mdand follow it inline. - Verify:
npm run enforce-inference-versionsinpackages/sdkandpackages/sdk-pythongenerate.py --checkmust both pass. - Stage and commit the version changes onto the same branch BEFORE proceeding to Output step.
Opt-out
To skip this sync for a single run, the user can invoke /qv-sdk-pr-create --no-sync. The skill proceeds normally and emits a reminder at the end: "Reminder: sdk deps/version changed but the @qvac/inference version was not synced. Run /qv-sdk-inference-version before merge."
Docs Website Trigger
Trigger: diff touches user-facing paths under packages/sdk, packages/cli, or packages/sdk-python, and docs/website/content/docs is not already in the diff.
Steps (after Step 9 of Workflow above)
- When triggered, ask: "user-facing SDK/CLI change with no docs-website diff. run
/qv-docs-updatebefore opening the PR?" [Yes / No (library-only)] - If yes, read
.agents/skills/qv-docs-update/SKILL.mdand follow it. Don't open the PR until it reportsDONE,NO_DOCS_IMPACT, orGENERATED_DOCS_ONLY. - If no (library-only), put the library-only note in the PR body — one line on why the change needs no docs.
This is not the generated API summary — that still ships via qv-sdk-changelog on release.
Docs Artifacts (SDK Releases)
Context: for @qvac/sdk releases, the qv-sdk-changelog skill (Step 8)
now generates the documentation-site API reference + release notes locally and
ships them in this same release PR. There is no longer a separate
auto-generated docs PR (the old docs-release.yml workflow was removed).
Staging works the same as for the rest of the release commit — no special
handling is needed. Step 8's committable surfaces — the API summary (minor
only) and the release notes of the SDK's current documentation line,
docs/website/content/docs/sdk/(v<X.Y>)/reference/{api,release-notes}.mdx —
show up in git status alongside the
changelog, while every generation/build byproduct
(api-data.json, .next/, .source/, out/, dist/, next-env.d.ts,
packages/sdk/dist/) is gitignored and therefore never appears. Review
git status and commit the shown files as usual.
Reviewers should expect the reference/api + reference/release-notes diff in
the release PR alongside the changelog.
Release Target Dual-PR Flow
Trigger: the just-created PR's base is release-<pkg>-<x.y.z> for any SDK pod package, or a release train branch release-train-<train>-<x.y.z>. A train gets one backmerge for the whole train (backmerge/release-train-<train>-<x.y.z>), not one per package.
When triggered, automatically chain into the sdk-backmerge skill so a follow-up PR is also opened against main with the same version-bump + changelog metadata. This applies the gitflow.md "Keep main aligned" rule at PR-creation time so nobody has to remember a follow-up step after the release PR merges.
Preflight before opening the release PR: confirm base matches
^release-<pkg>-\d+\.\d+\.\d+$ (or ^release-train-<train>-\d+\.\d+\.\d+$) and the org head is not release-*
(see Release PR branch naming). Do not open / chain the dual-PR flow against
a short-named cut if publish is expected on merge.
Steps (after Step 5 of gh CLI Integration above)
- Capture context for the backmerge:
- Just-created release PR number and URL
- Release branch name (
release-<pkg>-<x.y.z>orrelease-train-<train>-<x.y.z>) and parsed<pkg>or<train>/<x.y.z> - Source head branch, org-remote-qualified when possible (e.g.
ORG_REMOTE/<branch>, or the release PRheadRefOidif the remote tip is missing) - Ticket number from the title
- Invoke the
sdk-backmergeworkflow inline with these inputs (read.agents/skills/qv-sdk-backmerge/SKILL.mdand follow it). - Fail-stop policy — if the backmerge cherry-pick produces a conflict outside
sdk-backmerge's auto-resolve list, STOP. Print:- The release PR URL (success — PR #1 is open)
- The current
git status -sbfrom the conflicted cherry-pick - Resume instructions:
git add <files> && git cherry-pick --continue, then run/qv-sdk-backmerge --resume
- On success, print both PR URLs as clickable hyperlinks, ordered:
- Release PR (target:
release-<pkg>-<x.y.z>) - Backmerge PR (target:
main)
- Release PR (target:
Opt-out
To skip the backmerge for a single run, the user can invoke /qv-sdk-pr-create --no-backmerge. The skill still creates PR #1 normally and prints a reminder pointing to /qv-sdk-backmerge for later.
Quality Checklist
Before outputting the PR description, verify:
- Title follows format:
TICKET prefix[tags]: subject - "What problem" describes user impact, not implementation
- "How it solves" is high-level approach, not line-by-line
- Unused sections are deleted
[bc]tag has BEFORE/AFTER code examples (feature PRs). Release changelog PRs: no[bc]on the title; Breaking section copiesbreaking.mdwhen that file exists[api]tag has usage example[mod]tag has Added/Removed models list- Description is concise - bullet points, no fluff
- Generated helper notes, template instructions, and tool footers are removed from the PR body
- If the diff is a user-facing SDK capability, CLI was updated in this PR, the body says library-only, or the skip reminder was emitted
- If diff touches sdk's
version/@qvac/inferencerange (or sdk's deps),qv-sdk-inference-versionran (or--no-syncwas set with a reminder emitted), and the version checks plus sdk-python checks pass - For sdk releases with generated docs,
git statusshows only the current line'sreference/api.mdx(minor) andreference/release-notes.mdxas committable docs changes, neversrc/lib/versions.tsorpublic/_redirects— disposable byproducts (api-data.json,out/,.next/,dist/, etc.) are gitignored - If base is
release-<pkg>-<x.y.z>orrelease-train-<train>-<x.y.z>, the dual-PR flow ran (or--no-backmergewas set), and both PR URLs are reported - Release PRs: base is three-part
release-<pkg>-x.y.z; org head ischore/<pkg>-<x.y.z>-changelog(or other non-release-*name) - Release changelog PRs: title is
chore:(no[bc]); body API / Models / Breaking matchchangelog/<this version>/ - Head was pushed to the org remote when write access allows; fork path only used as fallback (with
fork-cire-approval called out) - PR is Ready for review when baseline CI is expected (not left as Draft unintentionally)
References
- SDK pod ownership:
.github/teams/sdk.json - Shared SDK and first-class product guidance:
packages/sdk/AGENTS.md - PR template:
.github/PULL_REQUEST_TEMPLATE/sdk-pod.md - Format rules:
docs/gitflow.mdand this skill's validation section - Backmerge skill:
.agents/skills/qv-sdk-backmerge/SKILL.md - sdk @qvac/inference version:
.agents/skills/qv-sdk-inference-version/SKILL.md - GitFlow:
docs/gitflow.md— still documents fork-first contribution; for internal SDK PRs, prefer the org-branch path in this skill until DevOps updates gitflow - Fork CI trust model:
docs/ci/LABELS.md(fork-ci environment +fork-approval)
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/agent-integrations.mdcCursor rule
- .cursor/rules/cpp/string-api-conventions.mdcCursor rule
- .cursor/rules/devops/main.mdcCursor rule
- .cursor/rules/no-remote-code-execution.mdcCursor rule
- .cursor/rules/qip-triage.mdcCursor rule
- .cursor/rules/sdk/commit-and-pr-format.mdcCursor rule
- .cursor/rules/sdk/error-handling.mdcCursor rule
- .cursor/rules/sdk/first-class-product-parity.mdcCursor rule
- .cursor/rules/sdk/main.mdcCursor rule
- .cursor/rules/sdk/public-constants-contract.mdcCursor rule
- .cursor/rules/sdk/request-lifecycle-primitives.mdcCursor rule
- .cursor/rules/sdk/sdk-pod-packages.mdcCursor rule
- .cursor/rules/sdk/skill-authoring-guidelines.mdcCursor rule
- cpp-string-api-reviewSkill
- qv-addon-changelogSkill
- qv-addon-pr-createSkill
- qv-addon-release-notesSkill
- qv-agent-stack-syncSkill
- qv-asana-syncSkill
- qv-daily-work-updateSkill
- qv-dev-diary-setupSkill
- qv-dev-diarySkill
- qv-devops-daily-updateSkill
- qv-devops-pr-createSkill
- qv-devops-pr-reviewSkill
- qv-devops-pr-statusSkill
- qv-devops-runner-queueSkill
- qv-devops-why-my-pr-notSkill
- qv-docs-solution-createSkill
- qv-docs-updateSkill
- qv-holepunch-devSkill
- qv-merge-guard-wireSkill
- qv-mobile-test-dispatchSkill
- qv-notice-generateSkill
- qv-pr-mineSkill
- qv-pr-reviewSkill
- qv-pr-testSkill
- qv-qip-createSkill
- qv-qip-reviewSkill
- qv-qip-triageSkill
- qv-quality-reportingSkill
- qv-registry-autobase-patternsSkill
- qv-release-trainSkill
- qv-sdk-backmergeSkill
- qv-sdk-changelogSkill
- qv-sdk-e2e-createSkill
- qv-sdk-inference-versionSkill
- qv-sdk-pr-statusSkill
- qv-sdk-update-modelsSkill
- qv-skill-listSkill
- setupSkill
- setupSkill
- qv-nx-ciSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

