スキル一覧に戻る
kristofferremback

update-pr

by kristofferremback

1🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: update-pr description: Update a pull request description. Use when asked to update PR description, edit PR body, or refresh PR details.

Update Pull Request Description

Update an existing PR's description, working around sandbox heredoc limitations.

Instructions

1. Get current PR info

# View current PR (assumes on feature branch)
gh pr view --json number,title,body

# Or specify PR number
gh pr view 123 --json number,title,body

2. Write the new body to a temp file

Use printf to avoid heredoc issues:

printf '%s\n' \
  '## Problem' \
  '' \
  'Description of the problem...' \
  '' \
  '## Solution' \
  '' \
  'Description of the solution...' \
  > /tmp/claude/pr-body.md

For longer content, build it incrementally:

# Start fresh
> /tmp/claude/pr-body.md

# Add sections
printf '%s\n' '## Problem' '' >> /tmp/claude/pr-body.md
printf '%s\n' 'The issue is...' '' >> /tmp/claude/pr-body.md
printf '%s\n' '## Solution' '' >> /tmp/claude/pr-body.md
printf '%s\n' 'We fixed it by...' >> /tmp/claude/pr-body.md

3. Update the PR

# Using body-file (may show GraphQL warning but still works)
gh pr edit 123 --body-file /tmp/claude/pr-body.md

# If that fails, use the API directly
gh api repos/{owner}/{repo}/pulls/123 --method PATCH \
  -f body="$(cat /tmp/claude/pr-body.md)"

4. Verify the update

gh pr view 123 --json body -q '.body' | head -20

5. Clean up

rm /tmp/claude/pr-body.md

Common Issues

GraphQL Projects (classic) warning: This warning appears but the update usually still succeeds. Verify with gh pr view.

Heredoc fails: Expected in sandbox mode. Use printf approach.

Body too long for single printf: Build the file incrementally with append (>>).

Special characters: Use single quotes. For apostrophes: 'Don'\''t'

PR Body Structure

Follow this template for consistency:

## Problem

[What issue exists?]

## Solution

[High-level approach]

### Key design decisions

**1. [Decision]**
[Explanation]

## Files changed

| File           | Change      |
| -------------- | ----------- |
| `path/file.ts` | Description |

## Test plan

- [ ] Test item

---

🤖 _PR by [Claude Code](https://claude.com/claude-code)_

Examples

Quick body update:

printf '%s\n' '## Problem' '' 'Users cannot login' '' '## Solution' '' 'Fixed auth token validation' '' '---' '🤖 _PR by [Claude Code](https://claude.com/claude-code)_' > /tmp/claude/pr-body.md
gh pr edit 123 --body-file /tmp/claude/pr-body.md

Using API fallback:

gh api repos/myorg/myrepo/pulls/123 --method PATCH \
  -f body="$(cat /tmp/claude/pr-body.md)"

スコア

総合スコア

40/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です