π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
name: create-pull-request description: Use when creating a pull request for the current branch β gathers branch context, generates a PR description following the repo's pull_request_template.md, and creates the PR with a Plane work item ID prefix in the title. user_invocable: true
Create PR
Create a pull request using the repo's PR template, a Plane work item ID as the title prefix, and a fully filled-out description based on the actual diff.
Workflow
Determine the base branch: Default to
previewunless the user specifies otherwise.Gather context (in parallel):
git status -sβ check for uncommitted changesgit diff <base>...HEAD --statβ files changedgit log <base>...HEAD --onelineβ all commits on the branchgit diff <base>...HEAD --no-colorβ full diff for understanding changes (if very large, focus on the most important files first)git rev-parse --abbrev-ref --symbolic-full-name @{u}β check if branch tracks a remote- Read
.github/pull_request_template.mdfrom the repo root
Determine work item ID:
- Extract from branch name if it contains an identifier (e.g.,
chore/silo-1146-fooβSILO-1146,feat/web-1234-xβWEB-1234) - If not found in branch name, ask the user
- Extract from branch name if it contains an identifier (e.g.,
Draft the PR using the template from step 2:
Title:
[WORK-ITEM-ID] <type>: <concise summary>(under 70 chars)- Type reflects the change:
fix,feat,chore,refactor,docs,perf, etc.
Body: Fill in every section from the PR template based on the actual diff:
- Description β Clear, concise summary of what the PR does and why. Focus on the "what" and "why", not line-by-line changes. Mention important implementation decisions.
- Type of Change β Check the appropriate box(es): Bug fix, Feature, Improvement, Code refactoring, Performance improvements, Documentation update.
- Screenshots and Media β Leave a placeholder:
<!-- Add screenshots here --> - Test Scenarios β Suggest concrete scenarios grounded in the actual changes (e.g., "Navigate to project settings and verify the new toggle works"), not generic ones.
- References β Include the work item ID, any linked issues the user mentions, and any Sentry issue links/IDs (e.g.,
SENTRY-ABC123or Sentry URLs) referenced earlier in the conversation.
Append a Claude Code session line at the bottom of the body.
- Type reflects the change:
Push and create (in parallel where possible):
- Push branch with
-uif no upstream is set - Create PR via
gh pr createusing a HEREDOC for the body
- Push branch with
Return the PR URL to the user.
Example Title
[SILO-1146] fix: allow relative URLs for configuration_url and improve app tile visibility
Guidelines
- Keep the description concise but informative
- Use bullet points when listing multiple changes
- Focus on user-facing impact, not implementation details
- Don't fabricate test scenarios that aren't relevant to the actual changes
Common Mistakes
- Summarizing only the latest commit instead of all commits on the branch
- Forgetting to check for an upstream before pushing
- Using a work item ID format that doesn't match the branch convention
- Wrapping the PR body in a code fence when passing it to
gh pr create