Skills and plugins / /kosuke:open-pr

/kosuke:open-pr.

/kosuke:open-pr commits your session's work, pushes the branch and opens a pull request with a title and a description. If the branch already has an open pull request, it brings that one up to date instead. Open a pull request covers the whole flow.

When to use it

Run it when the work is ready for review, or to refresh the description after more changes. Asking the agent in the chat to open a pull request runs it too. Type it yourself when you want a draft, reviewers or evidence links.

The agent commits and pushes its changes at the end of every turn. Review the diff before opening the pull request.

Run it

Type /kosuke:open-pr, or $kosuke:open-pr in a Codex session.

ArgumentWhat it doesDefault
--target-branch <branch>The branch the pull request targets.The project's Target Branch
-d, --draftOpens the pull request as a draft. Ignored once a pull request is open.Ready for review
--readyRequires the head pushed and QA passed on it, marks the draft pull request ready for review, then waits for its CI. It commits, pushes and opens nothing. Red CI turns it back into a draft and answers not ready; a pull request in conflict has no pull request CI, which the reply names.Off
-r, --reviewers <names>Requests reviewers, separated by commas or spaces. First names and nicknames match the repository's collaborators.Nobody
-e, --evidence <links>Adds an Evidence section with links that show the change working, such as a recording or a Preview link.No Evidence section
Any other textExtra context for the description.None
/kosuke:open-pr
/kosuke:open-pr -d -r tom,alice
/kosuke:open-pr -r alice -e https://example.com/recording.mp4 Mention the new export limit

What it does

  1. It commits the pending work. It stages only what belongs to the change and leaves out secrets, build output and scratch files. When a git hook fails, it fixes what the hook reports.
  2. It pushes the branch. If the remote branch moved, it merges it in first.
  3. It writes the title and the description from what is on the branch.
  4. It matches each reviewer name to a GitHub login. When a name matches several logins or none, it asks you which one you meant.
  5. It opens the pull request, or updates the open one.
  6. It replies with the link, the branch it targets, whether it is a draft, the reviewers, and anything it could not do.

On an update, it rewrites the description and keeps any text a person added by hand. It changes the title only when the work has moved past it. With -r, the requested reviewers are replaced by the ones you name, and requested teams stay. Without -r, the reviewers stay as they are.

If the open pull request targets a different branch from the Target Branch, it asks whether to keep it there or move it. When it moves it and the branch holds commits from elsewhere, it suggests a Sync.

/kosuke:ship pushes, runs QA, then checks CI at the head before marking the pull request ready. It fixes red CI in the same turn and gives a known flaky failure one rerun; a pull request in conflict has no GitHub pull request CI, so it goes on and says so in the reply, and under the merge train the conflict comes back to its session as /kosuke:sync-branch.

What you get

  • Commits with the pending work, pushed to the branch.
  • A pull request with a Summary, a list of Changes and, with -e, an Evidence section. Links to the chat session and to its QA Report, when it has one, follow.
  • A session in Under Review when the pull request is ready for review, or still Active when it is a draft.
  • A session title that matches the pull request title.

The pull request opens as you when you have a GitHub Connection, and as Kosuke App otherwise. If your GitHub Connection cannot write to the repository, Kosuke App opens it. When Kosuke App opens it, the description names you in a Created by: line.

Next steps