Skip to content

Guide · Agent skill

How to use the Prepare PR Metadata agent skill (prepare-pr)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The prepare-pr skill is an agent skill from the QwenLM/qwen-code repository that writes two text files for a GitHub pull request: a Conventional Commit style title and a body filled into your repository's own PR template. It is built for automated CI or autofix runs, and it deliberately does not push code, comment, or open the pull request. This guide explains what an agent skill is, how to install this one, how to trigger it, and what it needs before it runs.

Prepare PR MetadataQwenLM/qwen-code · Apache-2.0

Quick start

  1. 1Download and unzip. Download the prepare-pr ZIP from this page and unzip it so you have a prepare-pr folder containing SKILL.md.
  2. 2Place the skill folder. Move the folder to ~/.claude/skills/ for personal use or to .claude/skills/ inside your project.
  3. 3Confirm the prerequisites. Make sure git has origin/main available and that .github/pull_request_template.md exists in the repository.
  4. 4Ask for PR metadata. Request in plain language that the agent prepare PR title and body files for the current branch diff.
  5. 5Review the two files. Open pr-title.txt and pr-body.md in the output directory and check the content, test plan and tested-OS rows.
  6. 6Create the PR separately. Open the pull request with your own process or a later pipeline step, since the skill does not push or create it.

What an agent skill is and what prepare-pr makes the agent do

An agent skill is a folder containing a SKILL.md file with instructions that an AI coding agent loads when a task matches the skill's description. The skill tells the agent what to read, what to write and what to avoid.

With prepare-pr installed, the agent inspects the changes on your current branch with git diff origin/main...HEAD, reads the most recent commit message, reads an existing e2e-report.md if one is present, and reads .github/pull_request_template.md. It then writes pr-title.txt and pr-body.md into an output directory.

  • Output directory defaults to /tmp/autofix.
  • Issue number comes from the argument, the ISSUE variable, or the current branch name.
  • The body keeps every template heading exactly as written and fills in a Chinese summary inside a details block.

Install the prepare-pr skill

Download the ZIP for this skill from our page and unzip it. The skill is a folder that contains SKILL.md. Place that folder in one of two locations depending on how you want to use it.

For a personal install across all your projects, put it in ~/.claude/skills/. For a single project, put it in the project's .claude/skills/ folder so it travels with the repository.

You can also upload the skill in the Claude apps under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/prepare-pr/
  • Project: .claude/skills/prepare-pr/ inside your repository

Check the requirements before running it

The skill needs git with an origin/main reference available, because the diff is taken against origin/main. If origin/main is missing, fetch it first so the diff command can run.

The skill expects a GitHub PR template at .github/pull_request_template.md. It reads that file and fills it in, so a repository without the template is outside what this skill is built for.

The agent needs these tools: read_file, write_file, grep_search, glob and run_shell_command.

  • git with origin/main available
  • A .github/pull_request_template.md file in the repository
  • Agent tools: read_file, write_file, grep_search, glob, run_shell_command
git diff origin/main...HEAD git log -1 --pretty=%B

Trigger the skill with a natural request

Ask the agent in plain language to prepare PR metadata for the current branch. The skill's description covers preparing GitHub pull request title and body files from the branch diff, so requests about PR titles, PR descriptions, or PR metadata for CI should match it.

If you are running a non-interactive pipeline, you can pass the optional argument hint, which is output-dir followed by an optional issue number. Include the issue number so the body can contain a Fixes line under Linked Issues.

  • "Prepare PR metadata for this branch and write it to /tmp/autofix."
  • "Write the PR title and body for the current diff, linked to issue 123."
  • "Generate pr-title.txt and pr-body.md from the branch changes using the repo PR template."

Read the output and submit the PR yourself

The skill writes two files and stops. Review pr-title.txt and pr-body.md, then create the pull request with your normal process or a separate pipeline step. The skill itself is instructed never to run gh pr create or push.

Check the Reviewer Test Plan and the tested-OS rows before you submit. The skill is told to mark only the platforms actually tested, and to avoid claiming checks passed when they were not run.

  • pr-title.txt: one Conventional Commit style title line
  • pr-body.md: the repository template, filled in, with a 中文说明 details section

What people use it for

  • Generating a consistent PR title and template-filled body for each branch in a team that uses a fixed PR template.
  • Producing PR metadata files as a step in a non-interactive CI or autofix pipeline.
  • Drafting a Chinese summary section alongside an English PR body for bilingual teams.
  • Writing a Fixes line under Linked Issues when an issue number is supplied.

Frequently asked questions

Is the prepare-pr skill free to use?

The source material for this skill is licensed under Apache-2.0, which is the licence listed for the QwenLM/qwen-code repository. Check the repository's licence file for the terms that apply to your use.

Does prepare-pr create the pull request for me?

No. The skill forbids pushing code, commenting, and running gh pr create. It only writes pr-title.txt and pr-body.md, so you or another pipeline step must create the pull request.

What does prepare-pr need to run?

It needs git with an origin/main reference, a GitHub PR template at .github/pull_request_template.md, and the agent tools read_file, write_file, grep_search, glob and run_shell_command. The skill runs scripts and does not use the network, according to the listed details.

Why does the skill fail or produce a poor body if my repo has no PR template?

The skill expects .github/pull_request_template.md to exist and fills it in. Without that file there is no template to follow, so this skill is not suited to that repository.

Where should I install the skill?

Put the prepare-pr folder in ~/.claude/skills/ to use it across projects, or in .claude/skills/ inside one repository to keep it with that project. You can also upload it under Settings → Capabilities → Skills in the Claude apps.

How is this different from asking an agent to write a PR description directly?

prepare-pr follows fixed rules: it keeps the template headings exactly as written, avoids claiming unrun checks, and writes the title and body to named files for automation. A free-form request does not enforce these rules.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use prepare-pr if you maintain a repository with a GitHub PR template and want consistent, template-filled PR titles and bodies generated from your branch diff, especially in CI or autofix pipelines. Pick something else if you want an agent that opens pull requests for you, or if your repository has no .github/pull_request_template.md file.

Download the skill