pr

- Target branch: canary (development branch, cloud production)

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pr" with this command: npx skills add lobehub/lobehub/lobehub-lobehub-pr

Create Pull Request

Branch Strategy

  • Target branch: canary (development branch, cloud production)

  • main is the release branch — never PR directly to main

Steps

  1. Gather context (run in parallel)
  • git branch --show-current — current branch name

  • git status --short — uncommitted changes

  • git rev-parse --abbrev-ref @{u} 2>/dev/null — remote tracking status

  • git log --oneline origin/canary..HEAD — unpushed commits

  • gh pr list --head "$(git branch --show-current)" --json number,title,state,url — existing PR

  • git diff --stat --stat-count=20 origin/canary..HEAD — change summary

  1. Handle uncommitted changes on default branch

If current branch is canary (or main ) AND there are uncommitted changes:

  • Analyze the diff (git diff ) to understand the changes

  • Infer a branch name from the changes, format: <type>/<short-description> (e.g. fix/i18n-cjk-spacing )

  • Create and switch to the new branch: git checkout -b <branch-name>

  • Stage relevant files: git add <files> (prefer explicit file paths over git add . )

  • Commit with a proper gitmoji message

  • Continue to step 3

If current branch is canary /main but there are NO uncommitted changes and no unpushed commits, abort — nothing to create a PR for.

  1. Push if needed
  • No upstream: git push -u origin $(git branch --show-current)

  • Has upstream: git push origin $(git branch --show-current)

  1. Search related GitHub issues
  • gh issue list --search "<keywords>" --state all --limit 10

  • Only link issues with matching scope (avoid large umbrella issues)

  • Skip if no matching issue found

  1. Create PR with gh pr create --base canary
  • Title: <gitmoji> <type>(<scope>): <description>

  • Body: based on PR template (.github/PULL_REQUEST_TEMPLATE.md ), fill checkboxes

  • Link related GitHub issues using magic keywords (Fixes #123 , Closes #123 )

  • Link Linear issues if applicable (Fixes LOBE-xxx )

  • Use HEREDOC for body to preserve formatting

  1. Open in browser

gh pr view --web

PR Template

Use .github/PULL_REQUEST_TEMPLATE.md as the body structure. Key sections:

  • Change Type: Check the appropriate gitmoji type

  • Related Issue: Link GitHub/Linear issues with magic keywords

  • Description of Change: Summarize what and why

  • How to Test: Describe test approach, check relevant boxes

Notes

  • Release impact: PR titles with ✨ feat/ or 🐛 fix trigger releases — use carefully

  • Language: All PR content must be in English

  • If a PR already exists for the branch, inform the user instead of creating a duplicate

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

typescript

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

cli

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

pr

No summary provided by upstream source.

Repository SourceNeeds Review