Agent skill · Frontend

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', '后端先合', '分层合并'.

LobeHub80,937★ · +310/wk · 1 repos on radarProfile →
claude-codeNOASSERTION
Install
npx skills add lobehub/lobehub --skill pr --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 8 KB
Bundled scripts: none
Path: .agents/skills/pr/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 81,252 · +315 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Branch Strategy
  2. Steps
  3. 1. Gather context (run in parallel)
  4. 2. Handle uncommitted changes on default branch
  5. 3. Push if needed
  6. 4. Search related GitHub issues
  7. 5. Create PR with gh pr create --base canary
  8. 6. Open in browser
  9. PR Template
  10. Notes
  11. The ordering rule
  12. Which file goes in which PR
  13. The git recipe — split an existing full branch
  14. Verify the dependency actually holds
Ships with 1 file
  • agents/openai.yaml
Commands it runs
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
More from lobehub
All skills →
About this skill
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.

Keep going