Skip to content

docs(create-pr): read live PR body before editing in update mode - #531

Merged
dylanschmittle-uniswap merged 3 commits into
nextfrom
docs/create-pr-read-body-before-edit
Jun 17, 2026
Merged

docs(create-pr): read live PR body before editing in update mode#531
dylanschmittle-uniswap merged 3 commits into
nextfrom
docs/create-pr-read-body-before-edit

Conversation

@dylanschmittle-uniswap

@dylanschmittle-uniswap dylanschmittle-uniswap commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

What

Update-mode in the create-pr skill currently says: "gh pr edit if the PR title or body also need updating." That invites regenerating the body from scratch.

This adds a guard: read the live body first (gh pr view <n> --json body -q .body), edit from it, and apply with gh pr edit <n> --body-file <tmp>.

Why

A PR body can contain content that exists only in the live body — author hand-edits and pasted screenshots (![](https://github.com/user-attachments/...)). Regenerating from the diff/template silently destroys those. Reading-then-splicing preserves them.

Blast radius

One bullet in one skill's "Error Handling" section (development-planning/skills/create-pr). Docs-only; no code or behavior in the skill's tooling changes.

Test plan

  • Markdown renders correctly in the SKILL.md
  • Guidance is consistent with the existing gh pr edit flow
AI-Generated Description

What

Update-mode in the create-pr skill currently says: "gh pr edit if the PR title or body also need updating." That invites regenerating the body from scratch.
This adds a guard: read the live body first (gh pr view <n> --json body -q .body), edit from it, and apply with gh pr edit <n> --body-file <tmp>.

Why

A PR body can contain content that exists only in the live body — author hand-edits and pasted screenshots (![](https://github.com/user-attachments/...)). Regenerating from the diff/template silently destroys those. Reading-then-splicing preserves them.

Blast radius

One bullet in one skill's "Error Handling" section (development-planning/skills/create-pr). Docs-only; no code or behavior in the skill's tooling changes.

Test plan

  • Markdown renders correctly in the SKILL.md
  • Guidance is consistent with the existing gh pr edit flow
AI-Generated Description ## What Update-mode in the `create-pr` skill currently said: *"`gh pr edit` if the PR title or body also need updating."* That phrasing invites regenerating the body from scratch. This rewrites the bullet to add a guard: **read the live body first** (`gh pr view --json body -q .body`), edit *from* it, and apply the result with `gh pr edit --body-file `. ## Why A live PR body can contain content that exists **only** in the live body — author hand-edits and pasted screenshots (`![](https://github.com/user-attachments/...)`). Regenerating from the diff/template silently destroys those. Reading-then-splicing preserves them. ## Changes | File | Change | |------|--------| | `packages/plugins/development-planning/skills/create-pr/SKILL.md` | Single bullet rewritten in the **Error Handling** section to require reading the live body before editing and to call out hand-edits / `user-attachments` images as the failure mode | | `packages/plugins/development-planning/.claude-plugin/plugin.json` | `version`: `2.0.5` → `2.0.6` (patch bump for the docs-only change to a skill, per the root `CLAUDE.md` mandatory-bump policy) | Total diff: +2 / -2 across 2 files. ## Diff ```diff - **PR already exists for this branch**: Switch to update mode; run `git push` to publish the latest commits (use `gt submit` for Graphite), then `gh pr edit` if the PR title or body also need updating + **PR already exists for this branch**: Switch to update mode; run `git push` to publish the latest commits (use `gt submit` for Graphite). If the PR title or body also need updating, **read the live body first** (`gh pr view --json body -q .body`) and edit *from* it — never regenerate the body from scratch. The author may have hand-edited the description or pasted images/screenshots (`![](https://github.com/user-attachments/...)`) that exist only in the live body, not in any file; overwriting silently destroys them. Splice your change into the current body and apply with `gh pr edit --body-file `. ``` ## Why patch (not minor) Docs-only change to a single bullet in one skill's "Error Handling" section. No new skills, agents, commands, or MCP servers; no behavioral code change in the skill's tooling. That fits the patch criteria in the root policy ("Bug fixes, minor documentation updates, typo fixes"). ## Blast radius One bullet in one skill (`development-planning/skills/create-pr`) plus the mandatory plugin version bump. Docs-only; no code or behavior in the skill's tooling changes. ## Test plan - [ ] Markdown renders correctly in the SKILL.md - [ ] Guidance is consistent with the existing `gh pr edit` flow - [ ] Next `/create-pr` invocation against an existing PR reads the live body via `gh pr view --json body -q .body` before composing the new body - [ ] `plugin.json` version matches the **Current plugins** table row in root `CLAUDE.md` (note: table-row sync may land in a follow-up if not included here)

@dylanschmittle-uniswap
dylanschmittle-uniswap requested a review from a team as a code owner June 2, 2026 18:18
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-toolkit-slack-oauth-backend Ready Ready Preview, Comment Jun 17, 2026 12:22pm

Request Review

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Review still valid — No new code changes detected since the last review.

💡 To force a fresh review, add a comment containing @request-claude-review.

Review Summary

Small docs-only change to create-pr/SKILL.md plus a corresponding patch version bump (2.0.5 → 2.0.6). The new guidance instructs the skill to read the live PR body via gh pr view --json body -q .body before editing, and splice changes into the current body rather than regenerating from scratch — protecting hand-edits and pasted screenshots/images that exist only in the live body.

Assessment

  • The safety reasoning is sound: regenerating a PR body wholesale can destroy author edits and image attachments (![](https://github.com/user-attachments/...)), which are not recoverable from local files.
  • The instruction is concrete and actionable, naming both the read command (gh pr view <n> --json body -q .body) and the apply command (gh pr edit <n> --body-file <tmp>).
  • Version bump policy (mandatory per CLAUDE.md for any change under packages/plugins/) is satisfied with the 2.0.5 → 2.0.6 patch bump — appropriate for a docs-only safety improvement.

Note

The CLAUDE.md "Current plugins" table still lists development-planning at 2.0.1. That table is documented as needing to stay in sync with versions, but it's already stale relative to the prior 2.0.5 baseline — not introduced by this PR, so not blocking here.

No bugs, security issues, or breaking changes. Safe to merge.


💡 Want a fresh review? Add a comment containing @request-claude-review to trigger a new review at any time.

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check ✅

Verdict: Passed

Plugin version was bumped (2.0.5 → 2.0.6) as required. The SKILL.md change is a documentation/behavioral improvement to error handling — no structural changes, no new or removed components.


PR #531 Documentation Check

Changes reviewed:

  • packages/plugins/development-planning/.claude-plugin/plugin.json: version bumped 2.0.5 → 2.0.6
  • packages/plugins/development-planning/skills/create-pr/SKILL.md: error handling section updated to require reading the live PR body before editing, preventing accidental overwrites of hand-edited descriptions and embedded images.

Version bump: Present and correctly scoped as a patch bump — this is a documentation/behavioral improvement with no user-facing API changes.

CLAUDE.md: If packages/plugins/development-planning/CLAUDE.md describes the create-pr skill's update-mode behavior, it may benefit from a note about the live-body-read requirement, but this is informational only.

README.md: No structural changes (no skills added/removed), so no README update is required.

Overall: All required documentation is in order. The version bump satisfies the mandatory versioning policy.

Suggestions (1)

💡 Inline suggestions have been posted as review comments. Click "Commit suggestion" to apply each fix directly.

  • ℹ️ packages/plugins/development-planning/CLAUDE.md: The SKILL.md change introduced an important behavioral invariant (never regenerate PR body from scratch; read-then-splice). If CLAUDE.md describes this skill's workflow, documenting this invariant there would help future contributors understand why the live-read step is mandatory.

🤖 Generated by Claude Documentation Validator | Mode: suggest

github-actions[bot]
github-actions Bot previously approved these changes Jun 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: APPROVE

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only. 1 inline comment(s) are attached below.

Comment thread packages/plugins/development-planning/skills/create-pr/SKILL.md
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude PR Metadata Generation

Status: ❌ Error
Job: View workflow run


⚠️ Generation Failed

The automated PR title and description generation encountered an error.

Next Steps:

  1. Check the workflow logs for details
  2. Verify the GitHub Actions configuration
  3. Ensure the Anthropic API key is valid

You can manually set the PR title and description, or re-trigger by pushing a new commit.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Status: ⚠️ Partial (script error)
Job: View workflow run


The review was completed but there was an error posting inline comments.

Raw Review Output
No review output available

Please check the workflow logs for details.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude Code Review

Status: ❌ Error
Job: View workflow run


⚠️ Review Failed

The automated code review encountered an error and could not complete.

Next Steps:

  1. Check the workflow logs for details
  2. Verify the GitHub Actions configuration
  3. Ensure the Anthropic API key is valid
  4. Check for any permission issues

If the problem persists, please contact your repository administrator.


You can manually re-trigger the review by pushing a new commit or re-running the workflow.

github-actions[bot]
github-actions Bot previously approved these changes Jun 16, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: APPROVE

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only.

@github-actions
github-actions Bot dismissed their stale review June 17, 2026 12:07

Superseded by new review after PR update

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: APPROVE

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only.

dylanschmittle-uniswap and others added 3 commits June 17, 2026 08:20
When a PR already exists and update mode edits the title/body, the skill said only to run `gh pr edit`. That invites regenerating the body from scratch, which silently destroys author hand-edits and pasted screenshots (github user-attachments) that live only in the live PR body. Tell the skill to read the current body first (`gh pr view <n> --json body -q .body`) and splice the change into it.
Per CLAUDE.md versioning policy, bump plugin version for SKILL.md
documentation update to the create-pr error-handling guidance.

Co-authored-by: Nick Koutrelakos <wkoutre@users.noreply.github.com>
@dylanschmittle-uniswap
dylanschmittle-uniswap force-pushed the docs/create-pr-read-body-before-edit branch from 36efdda to f334393 Compare June 17, 2026 12:20
@dylanschmittle-uniswap
dylanschmittle-uniswap merged commit 882b69e into next Jun 17, 2026
20 checks passed
@dylanschmittle-uniswap
dylanschmittle-uniswap deleted the docs/create-pr-read-body-before-edit branch June 17, 2026 12:22
wkoutre added a commit that referenced this pull request Jun 25, 2026
Patch bumps for plugins with functional model: frontmatter changes in the
claude-opus-4-7 → claude-opus-4-8 model reference update, per mandatory
versioning rules in CLAUDE.md:

- claude-setup: 1.0.4 → 1.0.5
- development-codebase-tools: 2.6.0 → 2.6.1
- development-planning: 2.0.6 → 2.0.7

development-planning's existing 2.0.6 on next was bumped for unrelated PRs
(#531, #492, #491), not this PR's model change, so it needs its own bump.

Also corrects the version table in root CLAUDE.md to match.

Co-authored-by: Nick Koutrelakos <wkoutre@users.noreply.github.com>

Claude-Session: https://claude.ai/code/session_01W62gurznvTz2w81B8dcwG9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants