linear-pr について
Linear issue に紐づく GitHub プルリクエストの作成と、関連するブランチ操作を行う linear-cli スキルです。issue から PR までの作業フローに対応し、現在の Git ブランチから issue のコンテキストも取得できます。
主な機能
- 01GitHub プルリクエストの作成
- 02ドラフト PR の作成
- 03ベースブランチの指定
- 04issue ブランチの作成・確認
- 05Git から issue コンテキストを取得
活用シーン
- 01Linear issue のプルリクエストを作成
- 02作業中の変更をドラフト PR にする
- 03issue 用ブランチを作成して作業を始める
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ nesszer/ linear-cli --skill linear-prインストール後、Claude Code で/linear-prを入力して読み込まれたか確認します。
詳細
Linear PR の作成
linear-cli を使用して、Linear の課題に紐づく GitHub プルリクエストを作成します。
PR の作成
# Create PR linked to Linear issue
linear-cli g pr LIN-123
# Draft PR
linear-cli g pr LIN-123 --draft
# Specify base branch
linear-cli g pr LIN-123 --base main
# Open in browser after creation
linear-cli g pr LIN-123 --web
Git ブランチの操作
# Create and checkout branch for issue
linear-cli g checkout LIN-123
# Custom branch name
linear-cli g checkout LIN-123 -b my-custom-branch
# Just show branch name (don't create)
linear-cli g branch LIN-123
# Create branch without checkout
linear-cli g create LIN-123
ワークフロー全体
# 1. Start work (assigns, sets In Progress, creates branch)
linear-cli i start LIN-123 --checkout
# 2. Make changes and commit
git add . && git commit -m "Fix the bug"
# 3. Create PR
linear-cli g pr LIN-123
# 4. Mark done
linear-cli i update LIN-123 -s Done
現在の課題を取得
# Get issue from current git branch
linear-cli context
linear-cli context --output json
ヒント
- PR のタイトルと説明は課題から自動生成されます
- 作業中の変更には
--draftを使用します - ブランチのパターン:
username/lin-123-issue-title - GitHub の操作には
ghCLI が必要です
コメント
Markdown 対応