Skip to content
cccskills
FreePublished on GitHub

gh-create-pr

Create or update GitHub pull requests using the project's required template. Organize changes and test results, preserve every template section, and check target branches and release notes against the documented workflow.

OriginalShow the original description

Create or update GitHub pull requests using the repository-required workflow and template compliance. Use when asked to create/open/update a PR so the assistant reads `.github/pull_request_template.md`, fills every template section, preserves markdown structure exactly, and marks missing data as N/A or None instead of skipping sections.

Works withGitHub
See how to install

Good for

  • Create a pull request using the required template
  • Organize changes and test results for a draft pull request
  • Check hotfix and backport requirements

Files included (2)

  • SKILL.md10.1 KB
  • agents/openai.yaml218 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

GitHub PR Creation

Stack tooling

This repository ships .agents/skills/gh-stack/SKILL.md as a public project skill; developers do not install the agent skill separately. Read it before operating on stacked branches or PRs. Agents that consume .agents/skills/ discover it directly. If a Claude checkout is missing .claude/skills/gh-stack, run pnpm skills:sync followed by pnpm skills:check; do not download a separate global copy.

Before the first gh stack command in a task, verify the GitHub CLI and install the official extension if it is missing:

command -v gh >/dev/null 2>&1 || {
  echo "GitHub CLI is required: https://cli.github.com/" >&2
  exit 1
}
gh auth status
if ! gh stack --help >/dev/null 2>&1; then
  gh extension install github/gh-stack
fi
gh stack --help >/dev/null

Stop if authentication, installation, or the final verification fails. Do not infer a stack with ad hoc Git commands. For human-authored Cherry PRs, use gh stack push, create each compliant PR through this skill from bottom to top, then link the existing PRs with gh stack link; gh stack submit --auto creates PRs outside the template-compliant body flow and must not bypass this workflow.

Workflow

  1. Read .github/pull_request_template.md before drafting the PR body.
  2. Collect PR context from the current branch (base/head, scope, linked issues, testing status, breaking changes, release note content). Resolve the live base and run pnpm change:scope --base <verified-base-ref>; do not infer scope from the latest commit alone.
  3. Read .agents/notes/README.md and classify the change:
    • Fill Agent Note with the repository path, or N/A — <reason> for a local/mechanical change.
    • For a Spec PR, fill Spec PR: This PR and list every AC.
    • For an implementation layer, link the Spec PR and list only the AC IDs covered by this layer. Verify an APPROVED review whose commit_id equals the current Spec head; a stale approval does not authorize implementation.
    • For a direct bug fix with durable rationale, link its implemented bug-fix note and use Spec PR: N/A.
    • Automation-authored PRs (repository workflows and Dependabot) are exempt from these metadata fields. Do not make their bodies imitate a human-authored PR.
  4. For an implementation PR, complete the stack tooling preflight, then run gh stack view --json. If it exits 2, follow the gh-stack skill's remote-discovery procedure; missing local metadata does not prove the PR is standalone. Inspect every downstack implementation PR and aggregate only ACs backed by actual verification. Keep the note proposed on intermediate layers. If the current PR is the final layer and cumulative evidence covers the complete approved Spec, move the bilingual triplet to implemented/ and run pnpm agent-notes:check-transition --base <verified-spec-ref> before publishing.
  5. Fill Verification with commands and scenarios actually run. Never present a planned, pending, skipped, or CI-only check as passed.
  6. Check if the current branch has been pushed to remote. If not, push it first:
    • Default remote is origin, but ask the user if they want to use a different remote.
    git push -u <remote> <head-branch>
    
  7. Determine the base branch:
    • Inspect the head branch before applying any default. If the head is release/v<version>, stop: never open a pull request from a release branch, especially not to main. Put an isolated fix on a topic branch and target the release branch, or let Post Release create the metadata sync branch.
    • Before defaulting an arbitrary topic branch to main, inspect its merge base and upstream. A product-code fix that started from release/v<version> must stop and be recreated from main as a hotfix; only a release-only repair or explicit backport recovery topic may target that exact release branch.
    • A backport/v<version>/pr-<number> head must target the matching release/v<version> base and its body must contain <!-- release-backport-source-pr: <number> --> on its own line for the exact source hotfix PR. A release-sync/v<version> head must target main, use the exact title chore(release): sync v<version> metadata, retain the release-metadata-boundary: v<version> body marker, and be squash-merged.
    • For official repo(CherryHQ/cherry-studio) as origin: default base is main from origin, but allow the user to explicitly indicate a base branch.
    • main is the active development line, including hotfix PRs. Do not target an old maintenance branch unless the user explicitly requests it.
    • Only classify a PR as a release hotfix when the user explicitly says it must be included in the active draft release. Use the title hotfix: <description> or hotfix(<kebab-case-scope>): <description> with a lowercase alphanumeric kebab-case scope, exactly one space after the colon, and a non-empty description. The title grammar synchronizes the hotfix label automatically. Merging opens a separate backport PR only when exactly one draft semantic-version release has a matching active release/v<version> branch; otherwise automation stops without guessing a target.
    • If the hotfix is user-facing, provide one release-note line in each language so automation can update the active draft and stable release history. Put this exact structure inside the template's existing release-note fence; do not include bullet prefixes:
      <!--LANG:en-->
      [Component] English description.
      <!--LANG:zh-CN-->
      [组件] 中文说明。
      <!--LANG:END-->
      
    • If the hotfix has no user-facing release note, keep NONE in the template's release-note fence. The code is still backported, but release metadata is unchanged. A provided bilingual block must satisfy the exact structure above.
    • For fork repo as origin: check available remotes with git remote -v, default base may be upstream/main or another remote. Always assume that user wants to merge head to CherryHQ/cherry-studio/main, unless the user explicitly indicates a base branch.
    • Ask the user to confirm the base branch if it's not the default.
  8. Create a temp file and write the PR body using a single Bash heredoc (avoids mktemp + Write tool path-mismatch on Windows):
    pr_body_file="/tmp/gh-pr-body-$(date +%s).md"
    cat > "$pr_body_file" <<'EOF'
    ...filled template body...
    EOF
    
    Fill content using the template structure exactly (keep section order, headings, checkbox formatting). If not applicable, write N/A or None.
  9. Inspect the temp file content via Bash cat "$pr_body_file" (the Read tool can fail on /tmp/... paths on Windows). If the user requests a preview or confirmation, show the full body and follow that request; otherwise, proceed with the authorized PR creation.
  10. Create the PR, adding --draft when the user requests a draft:
gh pr create --base <base> --head <head> --title "<title>" --body-file "$pr_body_file"

For a release hotfix, use an exact classifier-compatible title so the workflow synchronizes the label and separately validates any provided bilingual note:

gh pr create --base main --head <head> --title "hotfix: <description>" --body-file "$pr_body_file"

After creation, verify that the classifier added hotfix; if it did not, fix the title instead of adding the label manually. Also fix any malformed optional release-note block reported by the workflow. 11. Clean up the temp file: rm -f "$pr_body_file" 12. Report the created PR URL and summarize title/base/head, Agent Note/Spec, AC coverage, actual verification, and any required follow-up.

Constraints

  • Never skip template sections.

  • Never rewrite the template format.

  • Keep content concise and specific to the current change set.

  • PR title and body must be written in English.

  • Never use a hotfix title or label for an ordinary bug fix. It opts the PR into an automatic backport PR after merge when one matching draft release is active.

  • A release hotfix may use NONE when it has no user-facing release note. Never provide a partial, single-language, or otherwise malformed bilingual note; the backport workflow fails closed on malformed content.

  • Never default a release/v<version> head to main; a release branch is not a pull request source branch.

  • Never publish an implementation PR as ready when its current Spec head lacks an exact-head Approval. A Spec may remain unmerged and serve as the stack base.

  • Every human-authored PR fills Agent Note, Spec PR, and Acceptance criteria; N/A requires a concise reason. Automation-authored PRs (repository workflows and Dependabot) are exempt from this metadata requirement.

  • Release note & Documentation checkbox — both are driven by whether the change is user-facing. Use the table below:

    Change typeRelease noteDocs [x]
    New user-facing feature / setting / UIDescribe the change✅
    Bug fix visible to usersDescribe the fix✅ if behavior changed
    Behavior change / default value changeDescribe + action required✅
    Security fix in a user-facing dependencyDescribe the fix✅ if usage changed
    CI / GitHub Actions changesNONE❌
    Internal refactoring (user cannot tell)NONE❌
    Dev / build tooling changesNONE❌
    Dev-only dependency bumpNONE❌
    Test-only / code style changesNONE❌

Command Pattern

# read template
cat .github/pull_request_template.md

# prepare and inspect the PR body
pr_body_file="/tmp/gh-pr-body-$(date +%s).md"
cat > "$pr_body_file" <<'EOF'
...filled template body...
EOF
cat "$pr_body_file"

# create the authorized PR; add --draft when requested
gh pr create --base <base> --head <head> --title "<title>" --body-file "$pr_body_file"
rm -f "$pr_body_file"

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

agent-notes

FreeSummary

Record durable Cherry Studio engineering decisions in Agent Notes. Determine which changes need a note, prepare specifications with verifiable acceptance criteria, and manage approval, implementation, rejection, and replacement while preserving the reasoning behind decisions.

  • Deciding whether a change needs a lasting decision record
  • Documenting bug fixes with significant tradeoffs
  • Preparing specifications for approval before implementation
CherryHQ/cherry-studio52.7KUpdated Oct 19, 2026

Get answers about Cherry Studio from the installed version’s product information. The skill explains features, settings locations, and shortcuts, provides clickable navigation entries, and helps diagnose connection failures, configuration problems, and runtime errors.

  • Finding a feature or settings page
  • Checking supported providers and default shortcuts
  • Diagnosing connection failures and runtime errors
CherryHQ/cherry-studio52.7KUpdated Oct 19, 2026

cherry-browser

FreeSummary

Operate the visible browser pane in a Cherry Studio conversation to navigate pages, click controls, fill forms, capture screenshots, and investigate browser issues. It can work with authenticated websites while checking page state and action outcomes.

  • Navigate and operate an authenticated website
  • Fill forms and verify the resulting page state
  • Capture screenshots of a page or specific section
CherryHQ/cherry-studio52.7KUpdated Oct 19, 2026

cherry-computer

FreeSummary

Operates native desktop apps through Cherry Studio Computer Use. It reads interface information, types, clicks, and captures windows, using fresh observations to choose actions and verify results within the permissions and capabilities available.

  • Open a desktop app and inspect its interface
  • Enter text and click controls in an app
  • Capture a window when interface details are unclear
CherryHQ/cherry-studio52.7KUpdated Oct 19, 2026

Develop and verify changes in a tracked Cherry Studio Electron instance, a running desktop app. Use real UI behavior, logs, and performance measurements to investigate problems, compare fixes, or test a pull request and report the results.

  • Implement UI changes and verify them in the app
  • Reproduce bugs and inspect runtime logs
  • Compare performance before and after a fix
CherryHQ/cherry-studio52.7KUpdated Oct 19, 2026

Run repeatable tests of Cherry Studio’s key workflows with Playwright, which checks application behavior through automated interactions. Collect results on macOS and Windows and produce English reports for release acceptance or development validation.

  • Checking key workflows before a release
  • Validating application behavior on a development branch
  • Running regression tests for a specific task
CherryHQ/cherry-studio52.7KUpdated Oct 19, 2026

See all skills by CherryHQ

Report a problem with this skill