Skip to main content
skill CX Codex

commit-pr · zaxbyhub — Claude Code skill for PR publishing and setup

The commit-pr skill guides commits, pull request updates, and CI checks in opencode-swarm. Use it when publishing issue-related code changes or closing out a PR.

MIT ★ 539 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill commit-pr -a claude-code
Open on GitHub

What commit-pr does

commit-pr defines the publication workflow for opencode-swarm. Before committing or changing a PR, read the canonical skill at .claude/skills/commit-pr/SKILL.md. It directs Codex to use the shell for GitHub, build, test, and CI commands, and apply_patch for manual edits. When a branch already has a PR, update that PR rather than opening another.

The workflow distinguishes new PRs, follow-up work, and closeout. For an existing PR, inspect feedback and remote checks, then confirm that check results match the branch’s current head SHA. Required checks must be green before claiming merge readiness unless the user explicitly accepts a different state. A passing local run alone does not establish the status of GitHub checks.

What it helps with

  • publish code changes from a GitHub issue
  • update an existing PR after review feedback
  • check CI results against the current branch head
  • verify whether required checks allow merge readiness
  • post the required comment on a closing issue

Example prompts for the agent

  • Publish the changes for this issue and check remote CI before wrapping up the PR.
  • Update the existing PR with the review fixes, then verify checks match the current branch head.
  • Prepare the PR for merge by refreshing its body and checking required CI results.

How to install commit-pr

1Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill commit-pr -a claude-code

2Manually: put the files in place

~/.claude/skills/commit-pr/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/commit-pr/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about commit-pr

How do I install commit-pr in Claude Code?

Run npx skills add ZaxbyHub/opencode-swarm --skill commit-pr -a claude-code. The skill file is at ~/.claude/skills/commit-pr/SKILL.md.

What does the commit-pr skill do?

It sets the workflow for commits and PR publication in opencode-swarm, including remote CI review, updates to existing PRs, and merge-readiness checks.

Does commit-pr check whether CI results match the latest branch head?

Yes. It requires verifying that remote check data belongs to the current head SHA and says not to call a PR merge-ready while required checks remain non-green, unless the user accepts that state.

Source text

SKILL.md · MIT
---
name: commit-pr
description: >
  Mandatory Codex/Copilot publication adapter for opencode-swarm. Use for every
  GitHub issue assignment that results in code changes, commits, pushes, draft PRs,
  PR body edits, PR readying, release notes, or CI closeout. Must be loaded before
  `git push`, `gh pr create`, `gh pr edit`, or `gh pr ready`. Routes to the single
  canonical source of truth at `.claude/skills/commit-pr/SKILL.md`.
metadata:
  audience: swarm-plugin
---

# Commit & PR

Use this skill for Codex-side publication work in `opencode-swarm`.

## Source Of Truth

Read and follow [`../../../.claude/skills/commit-pr/SKILL.md`](../../../.claude/skills/commit-pr/SKILL.md) in full before committing, pushing, opening, or updating a PR.

That Claude skill remains the repository's canonical publish protocol. This Codex-native skill is the adapter layer: it tells Codex which tools to use, how to handle existing PRs, and how to finish the post-open lifecycle without drifting from the repo contract.

If instructions conflict:

1. `AGENTS.md`
2. `docs/engineering-invariants.md`
3. `../../../.claude/skills/commit-pr/SKILL.md`
4. this file

## Codex Execution Rules

- Use the available shell execution tool for `git`, `gh`, build, test, and CI commands.
- Use `apply_patch` for manual file edits.
- Use the runtime's parallel-execution capability for independent reads, status checks, and non-conflicting repo inspections.
- Do not stage `.Codex/`, IDE-local files, or unrelated worktree changes.
- Do not open a second PR when one already exists for the branch. Update the existing PR instead.

## Publish Modes

Infer the mode from the user request and branch state:

- `new-pr`: branch is ready to publish and no PR exists yet
- `pr-followup`: a PR already exists and you are addressing review feedback or syncing validation
- `closeout`: a PR already exists and you are updating body text, waiting on CI, marking ready, or confirming merge prerequisites

## Required Follow-Through

### Existing PR updates

If the branch already has a PR:

- inspect unresolved PR feedback surfaces before updating or readying the PR:
  review threads/comments, requested-changes reviews, CI/check failures,
  mergeability/conflicts, and whether check data belongs to the current head SHA
- update the existing PR body instead of creating a new PR
- refresh `## Summary`, `## Invariant audit`, and `## Test plan` when validation counts, caveats, or evidence changed
- verify the PR still points at the pushed branch head after any force-push
- use `$swarm-pr-feedback` when feedback needs fixes before closeout

### Draft vs ready

Default behavior:

- open or keep the PR as draft while follow-up edits are still expected, required checks are pending, or known caveats still need explanation
- mark the PR ready only after the body is current and required remote checks are green

If the user explicitly asks for a ready PR sooner, obey that request and document any remaining CI state clearly.

### Remote checks are authoritative

When the user asks to open, ship, ready, or close out a PR:

1. inspect remote checks with `gh pr view <n> --json statusCheckRollup,...` or `gh pr checks <n>`
2. verify check data belongs to the current `headRefOid` after every follow-up push
3. if a required job is `cancelled` and downstream jobs are `skipped`, inspect the run and rerun failed/cancelled jobs
4. if an obsolete older-head run is already failed or still consuming concurrency, inspect it before cancellation and cancel only when it is no longer the PR head under validation
5. wait for required checks to finish when practical
6. after conflict resolution, verify GitHub reports both `mergeable: MERGEABLE` and `mergeStateStatus: CLEAN`; local conflict-marker cleanup is not enough, and branch drift must appear in the closure ledger when it affected the PR
7. when `gh pr checks` looks stale, inspect the workflow run directly with `gh run view <run-id> --json headSha,status,conclusion,jobs,url`, and keep watching downstream integration/smoke jobs after unit jobs pass
8. if you edit the PR body after checks are green, expect PR Standards/title checks to rerun and re-check before calling the PR green
9. do not call the PR merge-ready while a required check is `cancelled`, `skipped`, `in_progress`, or otherwise non-green unless the user explicitly accepts that state

Recommended commands:

```powershell
gh pr view <number> --json body,headRefName,headRefOid,isDraft,mergeable,mergeStateStatus,state,statusCheckRollup,url
gh pr checks <number> --watch --fail-fast
gh run view <run-id> --json headSha,status,conclusion,jobs,url
gh run rerun <run-id> --failed
```

`dist/` is generated output and is not committed (#1047); do not stage it and there is no `dist-check` drift gate. If `package-check` fails, inspect the CI log: it is a source / build / `package.json#files` problem (an incomplete or unbuildable tarball), not generated-file drift. Fix the source or manifest and rerun `bun run package:smoke` locally.

After a forced install on Windows, `EPERM` while reading refreshed `node_modules`
is usually host friction; rerun the exact focused command with approved access
before treating it as a code failure.

### Issue comment requirement

If the PR closes an issue:

- confirm the issue comment exists with the PR link, what changed, how to use it, and migration notes
- if the PR merged before the comment was posted, add the missing issue comment immediately

## Working Pattern

1. Read `AGENTS.md`, `docs/engineering-invariants.md` as needed, and the canonical Claude `commit-pr` skill.
2. Run the required local validation from the canonical skill.
3. Stage only intended files.
4. Create or update the PR.
5. Refresh PR body text if the branch changed after review feedback.
6. Watch remote checks to a useful conclusion when the user asked for publication or closeout.
7. Verify issue comments, ready/draft state, and merge-readiness claims before finishing.

## Clean-Main And CI Reality Checks

When local validation is noisy or host-limited:

- compare suspicious failures against a clean `origin/main` worktree before blaming the branch
- document proven pre-existing failures in the PR body
- use remote CI as the cross-platform source of truth for merge-readiness

## Final Sanity Check

- one branch, one PR
- PR head matches pushed `HEAD`
- PR body matches current validation evidence
- issue comment exists when the PR closes an issue
- draft or ready state matches user intent
- required remote checks are green, or any remaining non-green state is explicitly explained

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

Similar skills

All skills for Git and GitHub →

commit-pr by other authors comes first.

commit-pr ZaxbyHub commit-pr — a checklist the agent must clear before it commits, pushes or opens a PR. Built for the case where an AI agent publishes the branch, not a person. CX Codex +1 ★ 539repo stars commit-pr ZaxbyHub commit-pr — a portable skill that verifies your code before push, writes conventional commits, and fills in a PR body. Guards against accidentally committing generated files or secrets. CX Codex +1 ★ 539repo stars commit-pr ZaxbyHub Guides an agent through checks, commit preparation, and PR publication. Useful when a change must follow the opencode-swarm release process. CX Codex +1 ★ 539repo stars ce-commit-push-pr EveryInc The ce-commit-push-pr skill commits changes, pushes the branch, and opens a PR. It can also draft or rewrite a PR description without shipping code. CX Codex +1 3,600installs commit-push-pr dyoshikawa The commit-push-pr skill commits the current work, pushes the branch, and creates or updates a pull request. Use it when a change is ready to ship through GitHub. CX Codex +1 ★ 1,636repo stars gh-axi Kun Chen (kunchenguid) gh-axi is a Claude Code skill that handles GitHub tasks through a CLI, from issues and pull requests to releases and Actions. The agent uses it for work involving GitHub. CX Codex +1 10,400installs ship-it jssblck ship-it takes a finished change all the way to a ready pull request: commits, pushes, opens the PR and watches CI until it passes. CX Codex +1 1,700installs pr-create Garrick Aden-Buie (@gadenbuie) pr-create is a Claude Code skill that branches, commits changes, opens a GitHub PR, and monitors CI, pushing fixes until checks pass. CX Codex +1 807installs babysit jssblck babysit watches a GitHub pull request until its checks finish, then reports failures, missing checks, and blockers. Use it when CI needs supervised waiting. CX Codex +1 668installs

From the same set121

The whole set →
fork-pr-operations fork-pr-operations guides agents through fork pull request workflows: GitHub Actions approval, safe rebasing with force-with-lease, and handling multi-round bot reviews. CX Codex +1 ★ 539repo stars parallel-work-check parallel-work-check is a Claude Code skill that compares local and remote commits on an existing branch and reviews new changes. It helps catch overlapping work before editing. CX Codex +1 ★ 539repo stars design-docs Writes and syncs a project's design docs: domain, technical spec, behavior spec, plus a traceability registry and changelog. CX Codex +1 ★ 539repo stars orchestrating-subagents orchestrating-subagents is a Claude Code skill for dividing project tasks among subagents, with parallel explorers and independent code review in isolated contexts. CX Codex +1 ★ 539repo stars contributing contributing walks an agent through the full pull-request cycle in the opencode-swarm repo: branch naming, commit format, a release-notes fragment, local checks and the PR template. CX Codex +1 ★ 539repo stars clarify-spec clarify-spec resolves spec clarification markers and ambiguous requirements in Swarm projects by asking targeted questions one at a time. CX Codex +1 ★ 539repo stars pre-phase-briefing pre-phase-briefing builds phase-start context, reviews prior retrospectives, and checks whether the referenced codebase matches the planned work. CX Codex +1 ★ 539repo stars rust-crate-ci rust-crate-ci — a skill for editing the runners/swarm-sandbox-runner crate: it fixes the order of local checks and flags Windows breakage that only CI would catch. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open