Agent skill

Prepare PR Files

by QwenLM in QwenLM/qwen-code

Writes a PR title file and a template-filled PR body file from the current branch diff, without pushing, commenting or creating the pull request.

Apache-2.0Auto-check passedDevelopment

Install Prepare PR Files

skills CLI
$ npx skills add QwenLM/qwen-code --skill prepare-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install QwenLM/qwen-code prepare-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/QwenLM/qwen-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.qwen/skills/prepare-pr .claude/skills/prepare-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
prepare-pr
GitHub stars
28k
Token cost
~538 tokens
SKILL.md length
239 words
Files
1
Skills in repo
41
Repo updated
First seen
Licence
Apache-2.0

At a glance

Writes a PR title file and a template-filled PR body file from the current branch diff, without pushing, commenting or creating the pull request.

  • Works in 5 steps: Inspect the current branch diff with git… → Read /e2e-report.md if it exists. → Read .github/pull_request_template.md. → …
  • Generating PR title and body files in a CI autofix pipeline
  • SKILL.md covers Inputs, Required Outputs, Workflow and PR Body Rules, plus 1 more section
  • Calls git and gh

What it does

Meant for non-interactive CI and autofix runs, the skill produces only two files in an output directory, pr-title.txt and pr-body.md, which defaults to /tmp/autofix. It inspects the diff from origin/main to HEAD and the latest commit message, reads e2e-report.md when present, and reads .github/pull_request_template.md. The title follows Conventional Commit style.

The body fills the repository template in place with its headings untouched, using prose for motivation and changes, a concrete reviewer test plan, before and after evidence or N/A, honest tested-OS rows, and risk, out-of-scope and breaking-change notes. It adds a Fixes line when an issue number is known, keeps the Chinese details section with a translation of the English body, and warns against claiming checks passed when they were not run.

When your agent uses it

  • Generating PR title and body files in a CI autofix pipeline
  • Filling a repository's pull request template from a branch diff
  • Drafting PR text without pushing or opening the PR

Example prompts

  • “Prepare the PR title and body for this branch using the repository template, but do not push.”
  • “Fill the PR template from the current diff and record that only Linux was tested.”
  • “Write the PR files for this branch and link the issue number from the branch name.”

Requirements

  • A git checkout with an origin/main branch
  • A .github/pull_request_template.md file

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Inspect the current branch diff with git diff origin/main...HEAD and recent commit message with git log -1 --pretty=%B.
  2. Read /e2e-report.md if it exists.
  3. Read .github/pull_request_template.md.
  4. Write a Conventional Commit style title to pr-title.txt.
  5. Fill the repository PR template in place and write it to pr-body.md.

What it can do on your machine

Read from SKILL.md and the folder at commit 6386bb2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Prepare PR Files loads about 538 tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 239 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~538

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from QwenLM/qwen-code at commit 6386bb2, republished under its Apache-2.0 licence (© QwenLM). 239 words, ~538 tokens.

Download SKILL.mdSave it as .claude/skills/prepare-pr/SKILL.md (or your agent's skills folder).
name
prepare-pr
description
Prepare GitHub pull request title and body files from the current branch diff, especially for non-interactive CI/autofix flows that must follow the repository PR template without pushing or creating the PR.
argument-hint
<output-dir> [issue-number]

Prepare PR

Create PR metadata files only. Do not push, comment, or run gh pr create.

Inputs

  • Output directory: default /tmp/autofix
  • Issue number: from the argument, ISSUE, or the current branch name

Required Outputs

Write:

  • <output-dir>/pr-title.txt
  • <output-dir>/pr-body.md

Workflow

  1. Inspect the current branch diff with git diff origin/main...HEAD and recent commit message with git log -1 --pretty=%B.
  2. Read <output-dir>/e2e-report.md if it exists.
  3. Read .github/pull_request_template.md.
  4. Write a Conventional Commit style title to pr-title.txt.
  5. Fill the repository PR template in place and write it to pr-body.md.

PR Body Rules

  • Keep every template section heading exactly as written.
  • Do not replace template headings with Summary, Root Cause, Fix, or Tests.
  • Use prose for motivation and changes; avoid file-by-file implementation notes unless needed for reviewer clarity.
  • Include a useful Reviewer Test Plan with concrete behavior to verify.
  • Fill Evidence (Before & After) with concise before/after behavior or N/A for non-UI changes.
  • Mark tested OS rows honestly. For Linux-only CI verification, mark Linux tested and macOS/Windows not tested.
  • Include risk, out-of-scope, and breaking-change notes.
  • Add Fixes #<issue-number> under Linked Issues when an issue number is known.
  • Keep the <details><summary>中文说明</summary> section and translate the English body into Chinese there.
  • Do not hard-wrap paragraphs or list items at a fixed column width.

Common Mistakes

  • Writing a free-form PR body instead of filling the template.
  • Claiming checks passed when they were not run.
  • Omitting the Chinese details section.
  • Using closing keywords for unrelated issues.

© QwenLM, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .qwen/skills/prepare-pr of QwenLM/qwen-code.

Open the folder on GitHubat commit 6386bb2

Compare with similar skills

Prepare PR Files next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Prepare PR Files compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prepare PR Files this skillQwenLM/qwen-code28k—~538Automated safety check: PassApache-2.0
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Verdaccio Pull Request Workflowverdaccio/verdaccio18k—~1.9kAutomated safety check: PassMIT
Draft Pull Request Creatorwordpress-mobile/WordPress-Android3.2k—~881Automated safety check: NotesGPL-2.0
Submit PRtisfeng/Easydict15k—~595Automated safety check: PassGPL-3.0
Create PREmiyaaaaa/HiveMind1.1k—~1.7kAutomated safety check: PassCustom licence

Similar skills

  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Takes a change through a verdaccio pull request: branch, local checks, changeset, title and body, labels, CI and review rounds, and ports to other release lines.

    18k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draft Pull Request Creator

    wordpress-mobile/WordPress-Android

    Commits and pushes current changes, writes a pull request title and body from the branch history and template, and opens a draft PR on GitHub after you approve it.

    3.2k GitHub stars~881 tokensUpdated today
    DevelopmentAuto-check: notes
  • Submit PR

    tisfeng/Easydict

    创建或复用当前 checkout 已提交变更的 GitHub PR,必要时推送任务分支。PR 审查使用 review-pr;仅本地提交使用 git-commit。

    15k GitHub stars~595 tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Create PR

    Emiyaaaaa/HiveMind

    Create a GitHub pull request with gh pr create. An agent skill from Emiyaaaaa/HiveMind.

    1.1k GitHub stars~1.7k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Publishes a GitHub PR for the checked-out branch with a Conventional Commits style title, a description backed by commands run, and screenshots when the UI changed.

    6k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from QwenLM/qwen-code

All 41 skills in this repo
  • Reproduces a feature from Codex or Claude Code in Qwen Code by running the reference agent under capture, reading the traces, then implementing matching behavior.

    28k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Qwen Code E2E Testing

    QwenLM/qwen-code

    Guides end-to-end testing of the Qwen Code CLI in headless mode with real model calls, MCP test servers and inspection of raw API traffic.

    28k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Scheduled CI skill that scans a repository for small, certain docs, test and code hygiene issues and fixes them on one branch with a commit per finding.

    28k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Builds a rebranded Qwen Code desktop package from the Tauri shell using only a brand id and a logo, with sensible derived defaults.

    28k GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Walks through capturing and comparing V8 heap snapshots to find memory leaks in the Qwen Code Node.js CLI, using tmux and the chrome-devtools CLI.

    28k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • tmux Real User Testing

    QwenLM/qwen-code

    Drives Qwen Code in a real tmux session the way a user would and saves a readable step-by-step transcript of each screen for maintainers to review.

    28k GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Prepare PR Files

What does Prepare PR Files do?

Writes a PR title file and a template-filled PR body file from the current branch diff, without pushing, commenting or creating the pull request. md, which defaults to /tmp/autofix.md.

When should I use Prepare PR Files?

Prepare PR Files fits situations like: generating PR title and body files in a CI autofix pipeline; filling a repository's pull request template from a branch diff; drafting PR text without pushing or opening the PR.

How do I install Prepare PR Files in Claude Code?

Run `npx skills add QwenLM/qwen-code --skill prepare-pr -a claude-code`. Or copy the skill folder (.qwen/skills/prepare-pr in QwenLM/qwen-code) into .claude/skills/prepare-pr in your project. Claude Code loads it when a task matches its description.

How do I install Prepare PR Files in Codex?

Run `npx skills add QwenLM/qwen-code --skill prepare-pr -a codex`. Or copy the skill folder (.qwen/skills/prepare-pr in QwenLM/qwen-code) into .agents/skills/prepare-pr in your project. Codex loads it when a task matches its description.

Can I use Prepare PR Files in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add QwenLM/qwen-code --skill prepare-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prepare-pr, .gemini/skills/prepare-pr, .github/skills/prepare-pr and .opencode/skills/prepare-pr in your project.

What does Prepare PR Files need to run?

Going by SKILL.md and its folder, Prepare PR Files needs the command-line tools its instructions call (git and gh). Our summary lists: A git checkout with an origin/main branch; A .github/pull_request_template.md file.

Does Prepare PR Files access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Prepare PR Files safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Prepare PR Files use?

Prepare PR Files is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Prepare PR Files use?

About 538 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Prepare PR Files?

Skills that share tags, products or a category with Prepare PR Files: React Router Pull Request Creator (remix-run/react-router, 57k stars), Verdaccio Pull Request Workflow (verdaccio/verdaccio, 18k stars), Draft Pull Request Creator (wordpress-mobile/WordPress-Android, 3.2k stars) and Submit PR (tisfeng/Easydict, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prepare PR Files?

QwenLM (a GitHub organization) maintains it in QwenLM/qwen-code, which has 28,397 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 10, 2026.

Source: QwenLM/qwen-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.