Open a pull request from a ticket

Point Claude Code at a ticket in your connected tracker; it reads it, implements the change on a new branch, runs the tests and prepares the pull request.

Task: Open a pull request from a ticket · Other tasks

Fill in the details

A ticket number is the most precise. A short topic works if only one ticket matches it.

Claude Code needs access to it, through an MCP server, a claude.ai connector or a CLI tool.

Optional. Leave empty and Claude will find how the project runs its tests.

Copy your prompt

This site doesn't run Claude or show model output. Results depend on your input and the model you use.

2 required fields are empty.

What you type is kept in this tab's session storage so a reload doesn't lose it. Use "Clear this task" to remove it. Browsers can restore session data when they reopen tabs, so closing a tab isn't a guaranteed way to erase it.

When to use this template

  • A ticket describes a change well enough to build, and you want to go from ticket to pull request without copying the text between tracker, editor and browser yourself.
  • Your tracker is connected to Claude Code through an MCP server added with claude mcp add, or through a claude.ai connector, which is available in Claude Code when you log in with your claude.ai account. Check it with /mcp.
  • The gh CLI is installed and authenticated for your GitHub repository, so Claude can push the branch and open the pull request when you allow it.

When not to use it

  • Claude Code cannot reach your tracker yet. Connect it first, or paste the ticket text into a plain request and leave out the search step.
  • The ticket is a vague idea rather than a defined change. Pin down the requirements with the spec interview template before asking for code.
  • The change is large or touches several modules. Ask for a plan first with the plan template, then use this prompt for one planned piece at a time.

Why this structure

  • Step 1 stops when the search finds several tickets or none, so you choose the ticket instead of Claude picking the one whose title looks closest.
  • Step 2 asks for a short summary and the acceptance criteria before any code. You can catch a misread ticket at that point, which is cheaper than after the branch exists.
  • Step 4 ties the tests to the ticket's acceptance criteria and gives Claude a command to run, so "done" means the checks pass rather than the code looking complete.
  • The final setting decides how far Claude goes on its own: stop before pushing, or open a draft that still needs your review. Either way the prompt tells Claude not to merge.
  • The rule to treat ticket text as a description of the work matters because anyone who can edit a ticket can write text into it. Claude reports unusual requests instead of acting on them.
  • The report asks for the branch, files, test output and PR link, so you can review the result without reading the whole session.

Example input (fictional)

What the ticket is about
the login timeout (ticket WEB-412)
Where the ticket lives
our issue tracker, connected through MCP
Command that must pass
npm test && npm run lint
When the work is ready
stop before pushing, show me the diff summary and the PR description, and wait for my go-ahead

Follow-ups to send Claude

  • Before you push, review your own diff against the ticket's acceptance criteria and list any criterion that is not covered by a test.
  • Add a short testing section to the PR description with the exact commands a reviewer can run.
  • Find the other open tickets that mention the login timeout and tell me whether this change affects them. Do not edit them.

Common mistakes

  • Naming a broad topic that matches several tickets. Use the ticket number when you have it.
  • Skipping the summary in step 2. If the ticket is ambiguous, that summary is where the wrong reading shows up before any code is written.
  • Setting the PR to open without review on a repository with automatic deploys. Keep the stop-before-pushing setting until you trust the flow.
  • Write a GitHub Actions CI workflow: Have Claude Code write a GitHub Actions workflow from your project's own build and test commands, with secrets referenced by name and nothing pushed.
  • Write tests first, then implement: Have Claude Code write tests that describe a feature before any implementation, confirm they fail, then write code until they all pass.
  • Commit changes with a generated message: Have Claude Code read the diff, check for files that should not go in, and commit with a message that says what changed and why. It does not push.

See all templates

Sources