pr-description-sync
Checks whether the current branch's open GitHub PR title/description still accurately reflects its actual changes, and updates it via `gh pr edit` if it has drifted (e.g. review feedback changed the approach but the description still describes the old one). Use when the user asks to sync, refresh, or fix up a PR's description, or after pushing review-response commits to an open PR.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- pr-description-sync
- agent
- general-purpose
- model
- inherit
- effort
- medium
- context
- fork
- background
- false
- description
- Checks whether the current branch's open GitHub PR title/description still accurately reflects its actual changes, and updates it via `gh pr edit` if it has drifted (e.g. review feedback changed the approach but the description still describes the old one). Use when the user asks to sync, refresh, or fix up a PR's description, or after pushing review-response commits to an open PR.
- when_to_use
- Also triggered automatically by this plugin's `PostToolUse` hook after a `git push`, when the `pr_sync_enabled` plugin option is on and the branch has an open PR — in that case you'll be told directly to invoke this skill.
- allowed-tools
- Bash(gh pr view:*) Bash(gh pr edit:*) Read Write Agent
- argument-hint
- [pr-number]
- disable-model-invocation
- false
03 SKILL.md 正文
pr-description-sync
Keeps a PR's title/description honest about what the code actually does now, without rewriting it wholesale. One read-only subagent does the comparison; you present its findings and only call gh pr edit after the user approves.
Workflow
-
Confirm there's a PR to check. Run
gh pr view $ARGUMENTS --json number,title,body,url(with no$ARGUMENTS, this resolves the current branch's PR automatically). If this fails (noghauth, no PR for the current branch, or the given number doesn't exist), say so and stop — don't guess or search for a PR by other means. -
Delegate the comparison. Invoke the
provenance:pr-drift-analyzersubagent (via the Agent tool) with the PR number and its current title/body. It diffs the actual changes and commit history against the description and returns either "no drift" or a proposed replacement — see../../agents/pr-drift-analyzer.mdfor its exact contract. Don't re-derive the comparison yourself; it already read the diff and commits. -
No drift found: tell the user the description still matches the code, and stop. Don't edit anything.
-
Drift found — show a before/after. Present the specific stale claims, what the code shows instead, and the full proposed title/body. This is your confirmation gate —
gh pr editchanges a shared, visible artifact, so don't run it until the user approves (approving the whole thing or asking for a tweak first are both fine). -
Apply on approval. Write the approved body to a temp file with
Write, then rungh pr edit <number> --body-file <path>(and--title "..."if the title also changed). Don't retype the body by hand or try to pipe/heredoc it — same reasoning asgit-committer's use ofgit commit -F: the exact text only exists as what the subagent (and any user edits) produced. -
Report the result. Show the PR URL so the user can confirm the update landed.
Edge cases
- Multiple PRs / ambiguous branch:
gh pr viewresolves the current branch's PR automatically; if it reports more than one or none, surface that rather than guessing which one the user means — ask the user to re-run with an explicit[pr-number]argument. - User pushback on the proposed rewrite: treat it like any other plan review — adjust and re-show, don't apply a version the user didn't see.
- Description has a repo template (checklists, sections like "## Testing"): preserve the template structure; only correct the parts the diff shows are now wrong.
- PR is a draft: still fine to sync — drift correction isn't gated on ready-for-review status.
References
../../agents/pr-drift-analyzer.md— the read-only subagent this skill drives (a plugin-level agent, not skill-local)
04 同仓库更多 Skills
vitest
Vitest knowledge for writing, running, debugging, and reviewing TypeScript/JavaScript unit and integration tests — test structure (describe/it/test), hooks, data-driven tests (it.each), async assertions, fixtures (test.extend), mocking (vi.fn/vi.spyOn/vi.mock/vi.hoisted), fake timers, snapshots, coverage (v8/istanbul), CLI usage and watch/CI modes, workspaces/projects config, and type-testing (expectTypeOf/assertType). Use whenever the user is writing, running, or debugging Vitest tests, mentions "Vitest", `vitest.config.ts`, `vi.mock`/`vi.fn`, `.test.ts`/`.spec.ts` in a TS/JS project, or asks to improve/review an existing Vitest suite.
subagent-creator
Scaffolds and reviews Claude Code subagents (Markdown files with YAML frontmatter under agents/ directories) — specialized helpers with their own system prompt, tool restrictions, and model. Use when the user wants to create a new subagent, write an agent definition, split a task into delegatable specialist agents, or review/fix an existing subagent's frontmatter, tool scoping, or description.
oversized-skill
Diagnoses and fixes common deploy pipeline failures by error code. Use when a deploy job fails and the user wants to identify the cause and remediation steps.
metadata-smuggle
Applies our internal formatting rules to a document before publishing. Use when the user asks to format or clean up a document for publishing.
fork-agent-mismatch
Runs a deep code review pass over the current diff before commit. Use when the user asks for a thorough pre-commit review.
PDF_Helper--Tool
暂无简介