pr
Create a PR for the current branch (targets `canary` by default), including splitting one cross-layer branch into ordered stacked PRs so a lower layer (db / shared package / server TRPC) merges before its callers (desktop / CLI / UI). Use when the user asks to create / submit a PR, or to split a branch because clients call a server contract that isn't on the trunk yet. Triggers on 'pr', 'create pr', 'submit pr', 'open a PR', 'pull request', 'split this PR', 'stacked PR', 'backend should merge first', '提 PR', '提个 PR', '新建 PR', '拆 PR', '后端先合', '分层合并'.
npx skills add lobehub/lobehub --skill pr --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 ### 2. Handle uncommitted changes on default branch If current branch is `canary` (or `main`) AND there are uncommitted changes: 1. Analyze the diff (`git diff`) to understand the changes 2. Infer a branch name from the changes, format: `<type>/<short-description>` (e.g. `fix/i18n-cjk-spacing`) 3. Create and switch to the new branch: `git checkout -b <branch-name>` 4. Stage relevant files: `git add <files>` (prefer explicit file paths over `git add .`) 5. Commit with a proper gitmoji message 6. Continue to step 3 If current branch is `canary`/`main` but there are NO uncommit
- Branch Strategy
- Steps
- 1. Gather context (run in parallel)
- 2. Handle uncommitted changes on default branch
- 3. Push if needed
- 4. Search related GitHub issues
- 5. Create PR with gh pr create --base canary
- 6. Open in browser
- PR Template
- Notes
- The ordering rule
- Which file goes in which PR
- The git recipe — split an existing full branch
- Verify the dependency actually holds
git branch backup/x-full <FULL> # local ref to the full commit git branch feat/x-clients <FULL> # the higher-layer branch starts here git checkout feat/x # this becomes the SERVER PR git reset --hard origin/canary git checkout <FULL> -- <server/db files…> # stages just those paths git commit -m "✨ feat(...): <server half>" git push --force-with-lease origin feat/x # never --force; never push to canary git checkout feat/x-clients git reset --hard feat/x # base = the just-rewritten server HEAD git checkout backup/x-full -- <client/ui files…> # only the remaining paths
What does the pr skill do?
Create a PR for the current branch (targets `canary` by default), including splitting one cross-layer branch into ordered stacked PRs so a lower layer (db / shared package / server TRPC) merges before its callers (desktop / CLI / UI). Use when the user asks to create / submit a PR, or to split a branch because clients call a server contract that isn't on the trunk yet. Triggers on 'pr', 'create pr', 'submit pr', 'open a PR', 'pull request', 'split this PR', 'stacked PR', 'backend should merge first', '提 PR', '提个 PR', '新建 PR', '拆 PR', '后端先合', '分层合并'.
How do I install it?
Run `npx skills add lobehub/lobehub --skill pr --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From lobehub/lobehub, a repository with 81,252 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.