Back to Skills

create-pull-request

pjt222
Updated 6 days ago
14 views
17
2
17
View on GitHub
Metawordaiautomation

About

This skill automates GitHub pull request creation and management using GitHub CLI, handling branch preparation, PR descriptions, and review workflows. It's designed for developers proposing changes from feature/fix branches, merging work into main, and requesting code reviews. Key capabilities include setting titles/descriptions, managing feedback, and executing merge/cleanup operations.

Quick Install

Claude Code

Recommended
Primary
npx skills add pjt222/agent-almanac -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/pjt222/agent-almanac
Git CloneAlternative
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/create-pull-request

Copy and paste this command in Claude Code to install this skill

Documentation

造拉請

建含明標、結述、正枝設之 GitHub 拉請。

  • 自能或修枝提變以評
  • 併畢工於主枝
  • 求合作碼評
  • 備一組變之目與範

  • :含承變之能枝
  • :併入基枝(常 main
  • :求評者
  • :標或里程
  • :草態

一:保枝備

驗枝與基枝同且諸變已承:

# Check for uncommitted changes
git status

# Fetch latest from remote
git fetch origin

# Rebase on latest main (or merge)
git rebase origin/main

得: 枝先於 origin/main 無未承變且無衝。

敗: Rebase 衝→解(見 resolve-git-conflicts)、續 git rebase --continue。枝大漂→考 git merge origin/main

二:評枝上諸變

察 PR 中將含之全差與承:

# See all commits on this branch (not on main)
git log origin/main..HEAD --oneline

# See the full diff against main
git diff origin/main...HEAD

# Check if branch tracks remote and is pushed
git status -sb

得: 諸承皆合 PR。差僅顯意變。

敗: 含無關承→考互動 rebase 清史後建 PR。

三:推枝

# Push branch to remote (set upstream tracking)
git push -u origin HEAD

得: 枝現於 GitHub 遠。

敗: 推拒→先 git pull --rebase origin <branch> 解衝。

四:書 PR 標與述

標 70 字符內。體為細:

gh pr create --title "Add weighted mean calculation" --body "$(cat <<'EOF'
## Summary
- Implement `weighted_mean()` with NA handling and zero-weight filtering
- Add input validation for mismatched vector lengths
- Include unit tests covering edge cases

## Test plan
- [ ] `devtools::test()` passes with no failures
- [ ] Manual verification with example data
- [ ] Edge cases: empty vectors, all-NA weights, zero-length input

🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"

草 PR:

gh pr create --title "WIP: Add authentication" --body "..." --draft

得: PR 於 GitHub 建、返 URL。述明達何變與試法。

敗: gh 未證→行 gh auth login。基枝誤→以 --base main 指。

五:理評回

應評論、推更:

# View PR comments
gh api repos/{owner}/{repo}/pulls/{number}/comments

# View PR review status
gh pr checks

# After making changes, commit and push
git add <files>
git commit -m "$(cat <<'EOF'
fix: address review feedback on input validation

EOF
)"
git push

得: 新承現於 PR。評論已應。

敗: 推後 CI 敗→以 gh pr checks 讀出、修問再求重評。

六:併與清

通過後:

# Merge the PR (squash merge keeps history clean)
gh pr merge --squash --delete-branch

# Or merge with all commits preserved
gh pr merge --merge --delete-branch

# Or rebase merge (linear history)
gh pr merge --rebase --delete-branch

併後更地 main:

git checkout main
git pull origin main

得: PR 已併、遠枝刪、地 main 更。

敗: 併為敗察或缺核阻→先治。勿強併跨阻。

  • PR 標簡(70 字符內)且述
  • PR 體含變結與試謀
  • 枝上諸承皆關 PR
  • CI 察通
  • 枝與基枝同
  • 評者已指(若庫設需)
  • 差無敏感

  • PR 過大:PR 當專於單能或修。大 PR 難評而易衝
  • 缺試謀:恆述如何驗變、備 PR 亦然
  • 陳枝:基枝大前→建 PR 前 rebase 以減衝
  • 評中強推:避強推於含開評之枝。推新承使評者見漸變
  • 不讀 CI 出:求重評前察 gh pr checks。敗 CI 費評者時
  • 忘刪枝:併用 --delete-branch 保遠潔

  • commit-changes - 為 PR 建承
  • manage-git-branches - 枝建與命規
  • resolve-git-conflicts - rebase/merge 中衝
  • create-github-release - 併後發

GitHub Repository

pjt222/agent-almanac
Path: i18n/wenyan-ultra/skills/create-pull-request
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

Related Skills

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

polymarket

Meta

This skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.

View skill

creating-opencode-plugins

Meta

This skill helps developers create OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It provides the plugin structure, event API specifications, and implementation patterns for JavaScript/TypeScript modules. Use it when you need to intercept, monitor, or extend the OpenCode AI assistant's lifecycle with custom event-driven logic.

View skill

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill