sync-pr-to-task · qdhenry — Claude Code command: what it does, how to install
sync-pr-to-task connects GitHub pull requests to Linear issues, mapping review statuses and comments bidirectionally.
no license ★ 1,357 updated 2026-03-01
.claude/commands/sync-pr-to-task.mdWhat sync-pr-to-task does
The command extracts issue identifiers from branch naming conventions, PR descriptions, and commit cues such as resolves or closes. It matches ticket patterns like ABC-123 alongside web URLs pointing to Linear workspaces.
Once linked, it maps the state of the pull request directly to the tracker. Draft items map to Backlog, merged code flips the ticket to Done, and approved reviews move issues to In Review. It adds metadata blocks, appends PR links into the task body, and assigns dedicated labels on GitHub via the gh utility.
Working executions rely on an authenticated gh installation in your environment. The routine also validates discrepancies between PR assignees and task owners, surfacing mismatches immediately.
What it helps with
- connect GitHub pull requests to Linear tickets
- transition Linear issue states from review approvals
- detect tracker references in branch names automatically
- spot metadata mismatches between PRs and tasks
Example prompts for the agent
- Link PR 123 to Linear issue ABC-456
- Detect Linear task reference for PR 123 and update its state
- Validate existing links between pull requests and tracker tasks
How to install sync-pr-to-task
Manually: put the files in place
.claude/commands/sync-pr-to-task.mdCall it with /sync-pr-to-task. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/sync-pr-to-task.mdCall it with /prompts:sync-pr-to-task. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/sync-pr-to-task.prompt.mdManually: put the files in place
.gemini/commands/sync-pr-to-task.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about sync-pr-to-task
How to install sync-pr-to-task in Claude Code?
Place the command specification file into .claude/commands/sync-pr-to-task.md in your project.
What does sync-pr-to-task do?
It reads GitHub pull request properties, finds associated Linear issues, and updates states, comments, and labels across both tools.
Which external tools are necessary for this command?
You need an active GitHub CLI gh setup along with configured access to Linear API endpoints.
Similar slash commands
All slash commands for Git and GitHub →sync-pr-to-task by other authors comes first.