/linear-integration:fix-and-create-pr-linear-issue Issue ID (e.g. EO-42) or search textfrom linear-integration
Fix a Linear issue in a worktree, create tests, simplify, commit, and open a GitHub PR
Ships in linear-integration. Installing the plugin adds it to Claude Code.
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.What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub pambrose/pambrose-claude-plugins --plugin linear-integration6 commands in this plugin
/cancel-linear-issueCancel Linear IssuesCancel one or more Linear issues by setting their status to Cancelled/codex-reviewCodex Review of Linear IssueAsk Codex CLI to independently review a Linear issue and post its feedback as a comment/fix-linear-issueFix Linear IssueFind a Linear issue and fix it in an isolated worktree/linear-plugin-versionPlugin VersionShow the installed version of the linear-integration plugin/show-linear-issuesShow IssuesDisplay all Linear issues in "Todo" status sorted by priorityOther plugins' commands for the same job