Contains Shell Commands
This skill contains shell command directives (
!command
) that may execute system commands. Review carefully before installing.
Git Commit, Push, and PR
Go from working changes to an open pull request, or rewrite an existing PR description.
Asking the user:
When this skill says "ask the user", use the platform's blocking question tool (
AskUserQuestion
in Claude Code,
request_user_input
in Codex,
ask_user
in Gemini). If unavailable, present the question and wait for a reply.
Mode detection
If the user is asking to update, refresh, or rewrite an existing PR description (with no mention of committing or pushing), this is a
description-only update
. The user may also provide a focus (e.g., "update the PR description and add the benchmarking results"). Note any focus for DU-3.
For description-only updates, follow the Description Update workflow below. Otherwise, follow the full workflow.
Context
If you are not Claude Code
, skip to the "Context fallback" section below and run the command there to gather context.
If you are Claude Code
, the six labeled sections below contain pre-populated data. Use them directly -- do not re-run these commands.
Git status:
!
git status
Working tree diff:
!
git diff HEAD
Current branch:
!
git branch --show-current
Recent commits:
!
git log --oneline -10
Remote default branch:
!
git rev-parse --abbrev-ref origin/HEAD 2>/dev/null || echo 'DEFAULT_BRANCH_UNRESOLVED'
Existing PR check:
!
gh pr view --json url,title,state 2>/dev/null || echo 'NO_OPEN_PR'
Context fallback
If you are Claude Code, skip this section — the data above is already available.
Run this single command to gather all context:
printf
'=== STATUS ===\n'
;
git
status
;
printf
'\n=== DIFF ===\n'
;
git
diff
HEAD
;
printf
'\n=== BRANCH ===\n'
;
git
branch --show-current
;
printf
'\n=== LOG ===\n'
;
git
log
--oneline
-10
;
printf
'\n=== DEFAULT_BRANCH ===\n'
;
git
rev-parse --abbrev-ref origin/HEAD
2
/dev/null || echo 'DEFAULT_BRANCH_UNRESOLVED' ; printf '\n=== PR_CHECK ===\n' ; gh pr view --json url,title,state 2
/dev/null || echo 'NO_OPEN_PR' Description Update workflow DU-1: Confirm intent Ask the user: "Update the PR description for this branch?" If declined, stop. DU-2: Find the PR Use the current branch and existing PR check from context. If the current branch is empty (detached HEAD), report no branch and stop. If the PR check returned state: OPEN , note the PR url from the context block — this is the unambiguous reference to pass downstream — and proceed to DU-3. Otherwise, report no open PR and stop. DU-3: Write and apply the updated description Read the current PR description to drive the compare-and-confirm step later: gh pr view --json body --jq '.body' Generate the updated title and body — load the ce-pr-description skill with the PR URL from DU-2 (e.g., https://github.com/owner/repo/pull/123 ). The URL preserves repo/PR identity even when invoked from a worktree or subdirectory where the current repo is ambiguous. If the user provided a focus (e.g., "include the benchmarking results"), append it as free-text steering after the URL. The skill returns a {title, body_file} block (body in an OS temp file) without applying or prompting. If ce-pr-description returns a "not open" or other graceful-exit message instead of a {title, body_file} pair, report that message and stop. Evidence decision: ce-pr-description preserves any existing
Demo
or
Screenshots
block from the current body by default. If the user's focus asks to refresh or remove evidence, pass that intent as steering text — the skill will honor it. If no evidence block exists and one would benefit the reader, invoke
ce-demo-reel
separately to capture, then re-invoke
ce-pr-description
with updated steering that references the captured evidence.
Compare and confirm
— briefly explain what the new description covers differently from the old one. This helps the user decide whether to apply; the description itself does not narrate these differences. Summarize from the body already in context (from the bash call that wrote
body_file
); do not
cat
the temp file, which would re-emit the body.
If the user provided a focus, confirm it was addressed.
Ask the user to confirm before applying.
If confirmed, apply with the returned title and body file:
gh
pr
edit
--title
"
Use origin . If none resolve, ask the user to specify the target branch. Gather the full branch diff (before evidence decision). The working-tree diff from Step 1 only reflects uncommitted changes at invocation time — on the common "feature branch, all pushed, open PR" path, Step 1 skips the commit/push steps and the working-tree diff is empty. The evidence decision below needs the real branch diff to judge whether behavior is observable, so compute it explicitly against the base resolved above. Only fetch when the local ref isn't available — if
/ already resolves locally, run the diff from local state so offline / restricted-network / expired-auth environments don't hard-fail: git rev-parse --verify < base-remote / < base-branch
/dev/null 2
&1 \ || git fetch --no-tags < base-remote
< base-branch
git diff < base-remote
/ < base-branch
.. .HEAD Use this branch diff (not the working-tree diff) for the evidence decision. If the branch diff is empty (e.g., HEAD is already merged into the base or the branch has no unique commits), skip the evidence prompt and continue to delegation. Evidence decision (before delegation). If the branch diff changes observable behavior (UI, CLI output, API behavior with runnable code, generated artifacts, workflow output) and evidence is not otherwise blocked (unavailable credentials, paid services, deploy-only infrastructure, hardware), ask: "This PR has observable behavior. Capture evidence for the PR description?" Capture now -- load the ce-demo-reel skill with a target description inferred from the branch diff. ce-demo-reel returns Tier , Description , and URL . Note the captured evidence so it can be passed as free-text steering to ce-pr-description (e.g., "include the captured demo: as a
Demo
section") or spliced into the returned body before apply. If capture returns
Tier: skipped
or
URL: "none"
, proceed with no evidence.
Use existing evidence
-- ask for the URL or markdown embed, then pass it as free-text steering to
ce-pr-description
or splice in before apply.
Skip
-- proceed with no evidence section.
When evidence is not possible (docs-only, markdown-only, changelog-only, release metadata, CI/config-only, test-only, or pure internal refactors), skip without asking.
Delegate title and body generation to
ce-pr-description
.
Load the
ce-pr-description
skill:
For a new PR
(no existing PR found in Step 3): invoke with
base:
Demo
section").
For an existing PR
(found in Step 3): invoke with the full PR URL from the Step 3 context (e.g.,
https://github.com/owner/repo/pull/123
). The URL preserves repo/PR identity even when invoked from a worktree or subdirectory; the skill reads the PR's own
baseRefName
so no
base:
override is needed. Append any focus steering as free text after the URL.
ce-pr-description
returns a
{title, body_file}
block (body in an OS temp file). It applies the value-first writing principles, commit classification, sizing, narrative framing, writing voice, visual communication, numbering rules, and the Compound Engineering badge footer internally. Use the returned values verbatim in Step 7; do not layer manual edits onto them unless a focused adjustment is required (e.g., splicing an evidence block captured in this step that was not passed as steering text — in that case, edit the body file directly before applying).
If
ce-pr-description
returns a graceful-exit message instead of
{title, body_file}
(e.g., closed PR, no commits to describe, base ref unresolved), report the message and stop — do not create or edit the PR.
Step 7: Create or update the PR
New PR (no existing PR from Step 3)
Using the
{title, body_file}
returned by
ce-pr-description
:
gh
pr
create
--title
"