🚀Agent
PR from ticket
End-to-end: ticket → branch → implementation → tests → PR. The canonical agent workflow.
- Surfaces
- agent · skill · mcp
- Complexity
- advanced
- Trigger
- natural
- Est. tokens
- 25,000
- Requires MCP
- linear
What It Does
Full developer workflow: reads a Linear or Jira ticket, creates a branch, implements the change in small commits, runs the test suite, and opens a PR via gh CLI with an auto-generated description. The outer skill is the agent loop; the inner pieces reuse other playbooks.
When It Triggers
- ▸"Implement LIN-123"
- ▸"Do the Jira ticket about the email bug"
- ▸"Ship this ticket end-to-end"
Prerequisites
- ▸Linear or Jira MCP connected
- ▸gh CLI authenticated (gh auth status)
- ▸Project has a reliable test command (documented in CLAUDE.md)
SKILL.md
markdown
---
name: pr-from-ticket
description: Turns a Linear/Jira ticket into an end-to-end implementation: branch, commits, tests, PR. Use when user says "implement ticket LIN-123", "ship this ticket", or "do the Jira task".
---
# PR From Ticket
## Requires
- Linear or Jira MCP
- GitHub CLI (`gh`) authenticated
## Steps
1. Fetch ticket via `linear_getIssue` (or `jira_getIssue`)
2. Run `bash scripts/start_branch.sh <ticket-id>`
3. Implement the change, committing in small logical chunks
4. Run the project's tests; if any fail, fix before proceeding
5. `gh pr create` with generated body (see pr-description-writer)
6. Post the PR link back to the ticket
scripts/start_branch.sh
bash
#!/usr/bin/env bash
set -euo pipefail
TICKET="$1"
BRANCH="feat/${TICKET,,}-${RANDOM}"
git checkout -b "$BRANCH"
git push -u origin "$BRANCH"
echo "$BRANCH"
Gotchas
- ▸Force-pushing or resetting is off-limits — the skill commits forward-only.
- ▸If tests fail three times, stop and ask the user before continuing.
- ▸Ticket descriptions can be vague — the skill should ask clarifying questions before implementing.