## Summary - replace the Linear skill wrappers with shared GraphQL-only scripts and add GraphQL-native document list/read helpers - rewrite the source Linear skill docs and references to remove the old Linearis-specific guidance - bump to , resync the packaged plugin, and update packaged command/docs wording to match the GraphQL flow ## Test Plan - python -m compileall .claude/skills/linear/scripts plugins/cce-linear/skills/linear/scripts - uv run .claude/skills/linear/scripts/create-ticket.py --help - uv run .claude/skills/linear/scripts/search-issues.py --help - uv run .claude/skills/linear/scripts/create-project.py --help - uv run .claude/skills/linear/scripts/list-documents.py --help
4.0 KiB
description, argument-hint, allowed-tools
| description | argument-hint | allowed-tools |
|---|---|---|
| Create a PR for an existing Linear ticket using the linear skill wrappers | <ticket-id> [--skip-validation] | AskUserQuestion, Skill, Bash(uv run:*), Bash(git checkout:*), Bash(git add:*), Bash(git commit:*), Bash(git push:*), Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git branch:*), Bash(gh pr create:*), Bash(rm:*) |
Existing Linear PR Workflow
Create a new PR for an existing Linear ticket when additional related code changes are required.
Activate the linear skill first and use its wrapper scripts for all Linear operations. Do not call another Linear CLI directly from this workflow.
Context
- Current git status: !
git status --short - Current branch: !
git branch --show-current - Staged changes: !
git diff --cached --stat - Unstaged changes: !
git diff --stat
Arguments
$1- Linear ticket identifier (e.g.,ICE-2004)--skip-validation- Optional flag in$ARGUMENTSto skip success criteria validation
If ticket ID is missing, ask the user for it.
Prerequisites
- Changes should already be made to files (staged or unstaged)
- The
linearskill must be available and its wrapper scripts must run successfully ghCLI must be authenticated
Steps
Track these steps as TODOs and complete them one by one.
-
Parse arguments - Extract ticket ID (
$1) and check for--skip-validationin$ARGUMENTS. -
Read Linear ticket - Fetch ticket details with the
linearskill wrapper:uv run ${CLAUDE_PLUGIN_ROOT}/skills/linear/scripts/read-ticket.py $1- Extract:
identifier,title,description,branchName,state,url - If ticket not found, stop and inform the user.
- Extract:
-
Validate success criteria (skip if
--skip-validationis present)- Present the ticket details:
## Ticket: <identifier> **Title:** <title> **Status:** <state.name> **Description:** <description> - Ask: "Does this match the work you're committing? (yes/no)"
- If no, ask for clarification and document for PR description.
- Present the ticket details:
-
Review changes - Analyze the context above.
- If no changes exist, stop and inform the user.
- Summarize what will be committed.
-
Create or checkout branch - Use the Linear branch name:
git checkout -b <branchName>- If branch exists locally:
git checkout <branchName> - If already on correct branch, continue.
- If branch exists locally:
-
Stage and commit - Commit with ticket ID prefix:
git add <relevant files> git commit -m "$(cat <<'EOF' <TICKET-ID>: <brief description derived from changes> <detailed description> Part of: <ticket title from Linear> EOF )"- Derive a concise commit title from the changes being committed.
- Commit message describes THIS specific change, not the full ticket.
-
Push branch - Push to origin:
git push -u origin <branch-name>- If remote branch exists:
git push
- If remote branch exists:
-
Create PR - Open pull request:
gh pr create --title "<TICKET-ID>: <brief description derived from changes>" --body "$(cat <<'EOF' ## Summary <what this specific PR adds/changes> ## Context Additional changes for <ticket URL from script output or plain <TICKET-ID>>: <ticket title from Linear> ## Test Plan - [ ] <verification steps> Linear: <TICKET-ID> EOF )" -
Output summary - Display results:
| Item | Details | |------|---------| | **Linear Ticket** | <ticket URL from script output, or plain <TICKET-ID> if URL is empty> | | **Branch** | `<branch-name>` | | **PR** | <PR URL> | | **Note** | Additional PR for existing ticket |
Error Handling
- If
git addfails due to lock file, runrm -f .git/index.lockand retry. - If no changes to commit, stop and inform the user.
- If ticket doesn't exist, stop and inform the user.
Examples
# With validation (default)
/existing-linear ICE-2004
# Skip validation
/existing-linear ICE-2004 --skip-validation