Files
Brandon Martin 35e7f7deae feat(linear): switch cce-linear to GraphQL-only workflows (#13)
## 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
2026-04-20 16:33:19 -05:00

3.4 KiB

description, argument-hint, allowed-tools
description argument-hint allowed-tools
Create a Linear ticket, branch, commit staged changes, and open a PR using the linear skill wrappers <team> ["title"] 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(gh pr create:*), Bash(rm:*)

Create Linear PR Workflow

Create a Linear ticket, branch from it, commit changes, and open a pull request.

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 - Team identifier (e.g., ICE-T)
  • $2 - Optional ticket title. If not provided, derive from the changes.

If team is missing, ask the user for it.

Prerequisites

  • Changes should already be made to files (staged or unstaged)
  • The linear skill must be available and its wrapper scripts must run successfully
  • gh CLI must be authenticated

Steps

Track these steps as TODOs and complete them one by one.

  1. Validate arguments - Ensure $1 (team) is provided.

    • If team is missing, ask the user for it.
  2. Review changes - Analyze the context above to understand what will be committed.

    • If no changes exist (no staged or unstaged files), stop and inform the user.
    • Summarize the changes for the user.
    • If $2 (title) not provided, derive a concise title from the changes.
  3. Create Linear ticket - Use the linear skill wrapper script:

    uv run ${CLAUDE_PLUGIN_ROOT}/skills/linear/scripts/create-ticket.py "<title from $2 or derived>" --team $1 --description "<auto-generated description>" --json
    
    • Generate a meaningful description based on the changes being committed.
    • Extract identifier, branchName, and url from the JSON response.
  4. Create branch - Create and checkout the branch:

    git checkout -b <branchName from Linear response>
    
  5. Stage and commit - Stage relevant changes and commit:

    git add <relevant files>
    git commit -m "$(cat <<'EOF'
    <TICKET-ID>: <title>
    
    <detailed description of changes>
    EOF
    )"
    
    • Always use HEREDOC for commit messages.
    • Include the ticket ID prefix.
  6. Push branch - Push to origin with tracking:

    git push -u origin <branch-name>
    
  7. Create PR - Open a pull request:

    gh pr create --title "<TICKET-ID>: <title>" --body "$(cat <<'EOF'
    ## Summary
    <bullet points describing changes>
    
    ## Test Plan
    - [ ] <verification steps>
    
    Linear: <TICKET-ID>
    EOF
    )"
    
  8. 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> |
    

Error Handling

  • If git add fails due to lock file, run rm -f .git/index.lock and retry.
  • If branch already exists, ask user whether to use it or create a new name.
  • If no changes to commit, stop and inform the user.

Examples

# Auto-generate title from changes
/create-linear-pr ICE-T

# With explicit title
/create-linear-pr ICE-T "Update RDS Proxy vpcSubnetIds configuration"