Create

From bendrucker/claude · View interactive version

Create is an AI agent skill from the GitHub repository bendrucker/claude. Create a pull request, merge request, or change request (PR, MR, CR). Use when the user asks to open one, including right after committing changes.

How to use this skill

Skill file

Create Pull Request

Give the reviewer what the diff cannot: the problem the change solves and what it does about it. Open the PR in the state the repo's workflow expects, so review starts without the user first fixing the title, the body, the base, or the labels.

The commit log, PR template, CONTRIBUTING notes, and review-bot config in the context below record conventions this document does not anticipate. Follow them over the defaults here.

Context

!bun "${CLAUDE_PLUGIN_ROOT}/scripts/git-context.ts"

!bun "${CLAUDE_PLUGIN_ROOT}/scripts/sem-context.ts" --stack-file "${user_config.stack_file}"

!bun "${CLAUDE_PLUGIN_ROOT}/scripts/contributing.ts"

Arguments

Parse $ARGUMENTS for these flags. With no flags, open a PR/MR ready for review.

Title

Match the repo's commit style, read from the log in the context above:

Name the primary change. A title that needs a serial comma names several: name the shared theme or the largest change, and put the rest in the body. Keep it under 50 characters by cutting scope rather than truncating words. Use the imperative mood and lowercase every word except proper nouns.

Body

Before drafting, load CODE0 and apply every rule in it.

Load the writing skill and cut the tropes it lists.

When the context above shows a detected PR template, load CODE0 and follow the template's structure in place of the default body format.

Workflow

  1. When the current branch is a default branch (main or master), stop and ask the user to switch to a feature branch.
  2. Stage any unstaged changes: git add .
  3. When the branch carries no commits yet, commit in the same format as the PR title.
  4. Local bot review: the Review bot line above reports repo config, CLI presence, and any cooldown. On a config hit with no cooldown, apply the gate in follow-up's SKILL.md to decide whether the diff needs a metered review, and run pull-request:follow-up --local before pushing when it does. With no config, decide from the hosted signals in follow-up's local.md. Skip it when a local bot pass already ran on this branch this session, the gate says skip, the provider is paused, detection finds nothing, or the user declines.
  5. Push the branch: git push -u origin HEAD
  6. Resolve every label against the repo before creating: each --label value, plus the review label when the gate warranted a metered review that no local pass already spent. Load CODE1 for the lookup and for a label that doesn't resolve.
  7. Draft the title and body.
  8. When --review-body applies, write the body to tmp/pr-body-<branch>.md, run ${user_config.body_review_skill} --doc tmp/pr-body-<branch>.md --kind pr-body --summary "<repo> <branch>: review the PR body", and fold the feedback into the file before creating. This step reviews the body alone.
  9. Create the PR/MR, appending --draft when set, --base <parent> when the branch is a stack layer, and --label <name> for each label that resolved:
  1. Chain a GitHub stack layer into its stack once the PR exists. Load github:stack for the gh stack link forms, the detection query that picks between them, and what an exit code 9 means.
  2. When --[no-]auto resolves on, enable auto-merge per CODE1.
  3. On a corporate or internal repo, suggest reviewers for the user to choose from and assign only the ones the user accepts. Load CODE0 for the visibility gate, the ranking script (${CLAUDE_PLUGIN_ROOT}/scripts/suggest-reviewers.ts), and username resolution.

Done when the PR/MR exists on the remote, every step above has either run or been skipped for a condition that step names, and you have reported the URL to the user along with any step that did not complete and why.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.