pr
GitHub用于创建或更新针对 main 分支的 Draft PR。流程包括读取模板、检查变更、运行验证脚本,并根据分支类型决定是否先执行发布技能。最终生成符合规范的 PR 并返回预览部署 URL。
Trigger Scenarios
用户希望打开拉取请求
完成分支交接
Install
npx skills add zacharyfmarion/openscad-studio --skill pr -g -y
SKILL.md
Frontmatter
{
"name": "pr",
"description": "Use when the user wants to open a pull request or finish a branch handoff. Read the PR template, inspect changes vs main, run the release skill first if the branch name looks like a version, validate the branch with the shared repo checks, open a draft PR targeting main, and return the preview deployment URL when one applies."
}
Open Pull Request
- Read
.github/PULL_REQUEST_TEMPLATE.mdand understand its required sections. - Inspect what has changed on this branch vs
main. If there are unrelated changes, stop and ask the user what to do. - If the branch name looks like a release branch or versioned release workflow, run the release skill first before continuing.
- Choose the right validation scopes for the changed files and run them through
scripts/validate-changes.sh. - Prefer
bash scripts/validate-changes.sh --scope baselinefor normal TS or workflow changes. Add scopes when needed:--scope formatterfor formatter behavior changes--scope rustforapps/ui/src-taurior other desktop-only changes--scope e2e-webfor materially changed user-facing web flows
- If formatting fixes are still needed before validation, run
pnpm formatintentionally first, then rerun the validation helper in check mode. Do not rely on the helper to mutate files unless you explicitly choose--fix. - Draft a PR title and body that follow the template exactly, filling each section from the actual branch changes, validations run, validations skipped, and tests added.
- Open or update a draft PR against
main:- Create with
gh pr create --draft --base mainwhen no PR exists for the branch. - Update the existing PR body when one already exists.
- Create with
- After the PR exists, wait for the
Deploy PR Previewworkflow when the change is web-relevant. - Return:
- the full PR URL
- the preview URL when one applies
- any explicit follow-up if the preview deploy or sticky comment failed
Preview Expectations
- Web-relevant PRs should publish to
https://pr-<number>.openscad-studio.pages.dev - Docs-only and desktop-only PRs may skip preview deployment
- If Cloudflare deploy succeeds but the sticky comment fails, report that separately instead of pretending the preview is unavailable
Version History
- 285da7d Current 2026-08-20 14:04


