Context
- Current branch: !
git branch --show-current - Git status: !
git status --short - Commits ahead of default branch: !
git log --oneline origin/HEAD..HEAD 2>/dev/null || echo "(unknown)" - Existing PR: !
gh pr view --json url --jq .url 2>/dev/null || echo "none" - Diff summary: !
git diff HEAD --stat - Full diff: !
git diff HEAD
Your task
If Commits ahead of default branch is (unknown), origin/HEAD couldn't be resolved — stop and tell the user to run git remote set-head origin -a (or otherwise set the default branch) before retrying, since the simplify step also depends on it. Otherwise, if Git status, Commits ahead of default branch, and Existing PR are all empty/none, stop and reply nothing to ship.. Otherwise:
Before doing any step, output the full 7-step checklist below in your first response so it stays in recent context across sub-skill calls. Do not skip this — it's what keeps you from stopping after simplify.
Use this PR body shape when creating or refreshing descriptions:
## Summary
Briefly explain the user intent from session history and the meaningful behavior/system change. If intent cannot be determined from the session or diff, ask the user before creating or refreshing the PR. Do not write a file-by-file changelog.
## Validation
- List proof of validation: commands, screenshots, telemetry, Loom, or `Not run: <reason>`.
## Notes
Optional: ticket links, rollout plan, residual risk, or areas for reviewers to focus on.
- Omit
## Noteswhen there are no useful notes. - Do not invent ticket links, validation evidence, rollout plans, or risks. Use
Not run: <reason>when validation was not run.
Script paths in this procedure are written as scripts/..., relative to this SKILL.md. When executing a bundled script, run it from this skill directory or resolve it to this skill's installed directory; do not look for it at the repository root.
Create a new branch if on main (e.g.,
feat/add-user-validation,fix/null-check-in-parser).Run the
simplifyskill on the full PR diff —git diff $(git merge-base HEAD origin/HEAD)..HEADplus any uncommitted changes. When it returns, your very next action is to restate the remaining steps (3–7) and continue with step 3 in the same turn. Do not stop, do not end the turn with a simplify summary.If
git status --shortshows changes, create a single conventional commit withgit commit --no-gpg-sign.Push the branch to origin.
Look up the current agent session ID by running this skill's bundled script:
bash scripts/find-session-id.sh '<phrase>'. Pass a distinctive verbatim chunk (≥10 words) from the most recent user message; see the script header for quoting constraints. If the script printscodex <id>, useAgent session: `codex resume <id>`. If it printsclaude-code <id>, useAgent session: `claude --resume <id>`. Keep the resume command in backticks so it renders as code in the PR description. If empty, there is no session footer line.Check for an existing PR with
gh pr view.PR title format: conventional-commit type + description, with no scope, plus the Linear ticket in parentheses at the end when one applies (e.g.,
feat: add resume command (STAFF-123)). This differs from the commit subject, which keeps its scope. Derive the ticket from the branch name, commit body, or session context; omit the parenthetical when no ticket applies.- No PR: create with
gh pr createusing the PR title format above. Description = the PR body shape above, followed by the session footer line if known and the agent footer<sub>🤖 <code>commit-push-pr:created v1 core@3.6.0</code></sub>on its own line. - PR exists: if the title doesn't match the format above, correct it with
gh pr edit --title. Refresh the body viagh pr edit --bodyso (a) the new commit's changes are reflected in the prose while existing## Summary,## Validation, and## Notessections are preserved unless clearly stale, (b) any known session footer line is appended if missing, never removing or rewriting existingAgent session: ...orAgent session ID: ...lines, and (c) any existing footer carrying the substringcommit-push-pr:created v1is preserved verbatim, appending<sub>🤖 <code>commit-push-pr:created v1 core@3.6.0</code></sub>only if absent. Then report the URL.
- No PR: create with
End with one short text response: branch name and the full PR URL (e.g.,
https://github.com/clipboardhealth/core-utils/pull/123). Never use shorthand likerepo#123— always output the complete URL.