From linear-integration
Fix a Linear issue in a worktree, create tests, simplify, commit, and open a GitHub PR
How this command is triggered — by the user, by Claude, or both
Slash command
/linear-integration:fix-and-create-pr-linear-issue Issue ID (e.g. EO-42) or search textThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Fix and Create PR for Linear Issue
**Input:** $ARGUMENTS
## Step 1: Find the Issue
Determine if the input is an issue ID or search text:
- **Issue ID pattern** (matches `[A-Z]+-\d+`, e.g. `EO-42`): Use `mcp__claude_ai_Linear__get_issue` to fetch the issue
directly by its identifier.
- **Search text** (anything else): First, ask the user which team and project to search within:
1. Fetch teams and projects in parallel using `mcp__claude_ai_Linear__list_teams` and
`mcp__claude_ai_Linear__list_projects`.
2. Use a single `AskUserQuestion` call to ask:
- **Team**: "...Input: $ARGUMENTS
Determine if the input is an issue ID or search text:
Issue ID pattern (matches [A-Z]+-\d+, e.g. EO-42): Use mcp__claude_ai_Linear__get_issue to fetch the issue
directly by its identifier.
Search text (anything else): First, ask the user which team and project to search within:
mcp__claude_ai_Linear__list_teams and
mcp__claude_ai_Linear__list_projects.AskUserQuestion call to ask:
limit: 10. If multiple
results, present them to the user via AskUserQuestion and ask which one to fix. If no results, tell the
user and stop.Important: AskUserQuestion requires at least 2 options per question. If a question would have only 1 option,
auto-select that option and omit it from the call.
Immediately use mcp__claude_ai_Linear__save_issue to move the issue status to "In Progress". This must happen
before any confirmation prompt or agent work, so that subsequent /loop iterations do not pick up the same issue.
If the issue is already "In Progress", this is a no-op — proceed without error.
If the status update fails for another reason (e.g., invalid state transition), warn the user but continue.
Display the issue details:
Ask the user: "Fix this issue and create a PR?" with options Yes / No.
If No, use mcp__claude_ai_Linear__save_issue to revert the issue status back to its previous status, then stop.
Use the Task tool with isolation: "worktree" and subagent_type: "linear-integration:issue-pr-creator" to
spawn the agent.
Pass the full issue context in the prompt:
Fix this Linear issue and create a PR:
- **Issue ID:** [id]
- **Title:** [title]
- **Description:** [full description]
- **Labels:** [labels if any]
- **Priority:** [priority if any]
Work autonomously: explore the codebase, implement the fix, create tests, run verification, run /simplify, re-verify,
post a detailed summary to the Linear issue comments, commit, push, create a GitHub PR, and post the PR link to the
Linear issue.
mcp__claude_ai_Linear__save_issue to move the issue status to "Done".git worktree remove <worktree-path> using the path returned by the agent. If cleanup
fails, warn the user but do not treat it as an error.mcp__claude_ai_Linear__save_comment to post an error comment on the issue:
## Automated Fix Failed
The autonomous fix attempt encountered an error:
[error details]
The branch may contain partial work. Manual intervention is needed.
mcp__claude_ai_Linear__save_issue to move the issue status back to "Todo".git worktree remove <worktree-path> --force. If cleanup fails, warn the user.npx claudepluginhub pambrose/pambrose-claude-plugins --plugin linear-integration/linear-continue-workContinues work on a Linear issue: finds it from git branch or query, assesses implementation state, plans next steps, and updates progress in Linear.
/implementImplements work from a Linear issue or local plan file. Reads the issue, sets status to In Progress, implements acceptance criteria, and summarizes changes.
/github-issue-fixAnalyzes GitHub issue via gh CLI, identifies sub-issues/dependencies, breaks into tasks, and documents structured fix plan in scratchpad.
/do-issueImplements GitHub/GitLab/Bitbucket issues using progressive analyze-specify-plan-implement-validate-complete workflow with optional step skipping, scope detection, dry-run, and multi-issue support.
/update-issueUpdates an existing Linear issue using the linear CLI, changing title, description, assignee, state, labels, priority, estimate, due date, team, or project. Uses git branch issue if ID omitted.
/implement-issueImplements a GitHub issue or local file by fetching details, invoking specialist agent for solution, validating changes, creating branch, and opening PR.