AgentSkillsCN

jj-pr

从 jj 仓库发起 GitHub 拉取请求。当被要求从 jj 仓库创建拉取请求时使用此指令。在此情境下,正确运用 `gh` 和 `jj` 命令,以达成预期结果。

SKILL.md
--- frontmatter
name: jj-pr
description: |-
  Create a pull request on GitHub from a jj repository. This is to be used when you are asked to
  create a pull request from a jj repository. This instructs on proper use of the `gh` and `jj`
  commands in this context to achieve the correct result.
user-invocable: false
allowed-tools:
  - Bash(jj bookmark create:*)
  - Bash(jj git push --allow-new -r:*)
  - Bash(gh pr create:*)

Workflow

  1. If needed, create a new bookmark using jj bookmark create <BOOKMARK_NAME> using a short, descriptive <BOOKMARK_NAME> according to the user's preference or instructions
  2. Push the <BOOKMARK_NAME> to GitHub using jj git push -r <BOOKMARK_NAME>
  3. Create the PR on GitHub using gh pr create --head <BOOKMARK_NAME>, adding --draft if the user requested a draft Pull Request
  4. Return the URL to the PR to the user.