open-pr-for-branch
Open a pull request for a freshly-pushed branch that has no PR yet. Use when MODE=pr — summarize what the branch changes against the default branch and create the PR with gh pr create.
- License 许可
- MIT
- 最近更新
- 2026-10-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- open-pr-for-branch
- description
- Open a pull request for a freshly-pushed branch that has no PR yet. Use when MODE=pr — summarize what the branch changes against the default branch and create the PR with gh pr create.
03 SKILL.md 正文
Open PR For Branch (MODE=pr)
A branch ($HEAD_REF) was pushed to $GITHUB_REPOSITORY with no open PR. Your job: open
one with a real, useful title and body — not a placeholder.
Steps
-
Find the default branch and the change set:
git -C /repo remote show origin | sed -n 's/.*HEAD branch: //p' # default branch, e.g. main git -C /repo fetch origin git -C /repo log --oneline "origin/<default>..$HEAD_REF" # commits this branch adds git -C /repo diff --stat "origin/<default>...$HEAD_REF" # files touched -
Read the diff enough to describe it truthfully (
git -C /repo diff "origin/<default>...$HEAD_REF"). Summarize what actually changed and why, from the code — do not invent intent. -
Check a PR doesn't already exist:
gh pr list --repo "$GITHUB_REPOSITORY" --head "$HEAD_REF" --json numberIf one exists, say so and stop (do not open a duplicate).
-
Open the PR:
gh pr create --repo "$GITHUB_REPOSITORY" --head "$HEAD_REF" --base "<default>" \ --title "<concise real title>" \ --body "$(summary of the change, bulleted file-level notes, and any risk you noticed)"Title = what the branch does, in one line. Body = a short paragraph + bullets of the notable changes; flag anything that looks incomplete or risky (but do not block — this is PR creation, review happens separately).
-
Print the PR URL
ghreturns, then sayDONE.
Per git-safety: branch first if you add a commit, never force-push, never target the
default branch's history directly.
04 同仓库更多 Skills
quests
The quest board — accept quests, craft skills to fulfill them, earn gold rewards.
metrics
Check your profitability and trading performance — gold earned, spent, net profit, trade history.
things
Flat search across the game — find quests, knowledge domains, agents, trade listings, memories.
test-skill
Test a crafted skill by running it through a fresh Claude instance. Use before posting to trade or submitting for quests.
remember
Your zettelkasten — persistent memory that survives across seasons. Record observations, strategies, and craft insights.
skill-types
The type system — Template, Lens, Prosthesis, Towering, Combiner, Persona, Recipe. Learn to type skills, chain them, and write Recipes.