with one click
linear
// Linear と対話するためのスキル。Linear MCP サーバー(`mcp__linear__*` ツール)を 優先的に使用し、MCP でカバーされない生の GraphQL 操作(イントロスペクション、 ファイルアップロードなど)は `linear_graphql` クライアントツールにフォールバックする。
// Linear と対話するためのスキル。Linear MCP サーバー(`mcp__linear__*` ツール)を 優先的に使用し、MCP でカバーされない生の GraphQL 操作(イントロスペクション、 ファイルアップロードなど)は `linear_graphql` クライアントツールにフォールバックする。
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | linear |
| description | Linear と対話するためのスキル。Linear MCP サーバー(`mcp__linear__*` ツール)を 優先的に使用し、MCP でカバーされない生の GraphQL 操作(イントロスペクション、 ファイルアップロードなど)は `linear_graphql` クライアントツールにフォールバックする。 |
Linear との対話には 2 つの経路がある:
mcp__linear__* 系の高レベルツール(list_issues、get_issue、save_comment など)。通常はこちらを優先する。linear_graphql クライアントツール — Symphony の app-server セッションが公開する生の GraphQL クライアント。MCP に存在しない操作(ファイルアップロード、イントロスペクション、新しい mutation の試行)に使う。どちらも利用できない場合は停止し、ユーザーに Linear の設定を依頼する。
以下の順で経路を選ぶ:
linear_graphql を使う:
fileUpload mutation)__type クエリ)\n ではなく実際の改行を使う。linear_graphql の使用上の注意ツール入力:
{
"query": "query or mutation document",
"variables": {
"optional": "graphql variables object"
}
}
挙動:
errors 配列がある場合は失敗した GraphQL オペレーションとして扱う。各ワークフローで、MCP 経路を優先し、linear_graphql 経路はフォールバックとして示す。
ルックアップは段階的に使う: key -> identifier 検索 -> 内部 id。
MCP 経路:
MT-686)から取得: mcp__linear__get_issue に id: "MT-686" を渡す(識別子も受け付ける)。mcp__linear__list_issues を使って team、project、assignee、state、label、createdAt などで絞り込む。get_issue の応答や個別 API(list_comments、get_attachment)を組み合わせる。linear_graphql フォールバック:
issue キーで検索:
query IssueByKey($key: String!) {
issue(id: $key) {
id
identifier
title
state {
id
name
type
}
project {
id
name
}
branchName
url
description
updatedAt
links {
nodes {
id
url
title
}
}
}
}
identifier フィルタで検索:
query IssueByIdentifier($identifier: String!) {
issues(filter: { identifier: { eq: $identifier } }, first: 1) {
nodes {
id
identifier
title
state {
id
name
type
}
project {
id
name
}
branchName
url
description
updatedAt
}
}
}
内部 id がわかったら issue を読む:
query IssueDetails($id: String!) {
issue(id: $id) {
id
identifier
title
url
description
state {
id
name
type
}
project {
id
name
}
attachments {
nodes {
id
title
url
sourceType
}
}
}
}
issue 状態を変更する前に、正確な状態 ID/名前が必要なときに使う。
MCP 経路:
mcp__linear__get_issue で team 情報を取得し、mcp__linear__list_issue_statuses にその teamId を渡してそのチームのワークフロー状態一覧を得る。mcp__linear__get_issue_status。linear_graphql フォールバック:
query IssueTeamStates($id: String!) {
issue(id: $id) {
id
team {
id
key
name
states {
nodes {
id
name
type
}
}
}
}
}
MCP 経路:
mcp__linear__save_comment を使う。issueId と body を渡す。parentId を指定する。\n を書かない)。linear_graphql フォールバック:
mutation CreateComment($issueId: String!, $body: String!) {
commentCreate(input: { issueId: $issueId, body: $body }) {
success
comment {
id
url
}
}
}
MCP 経路:
mcp__linear__save_comment に id を含めて呼ぶと既存コメントの更新になる(同じ "save" API で create/update を兼ねる)。linear_graphql フォールバック:
mutation UpdateComment($id: String!, $body: String!) {
commentUpdate(id: $id, input: { body: $body }) {
success
comment {
id
body
}
}
}
MCP 経路:
mcp__linear__get_issue でチームを特定する。mcp__linear__list_issue_statuses で目的の状態 ID を取得する。mcp__linear__save_issue に id と stateId(または対応するフィールド)を渡して更新する。linear_graphql フォールバック:
mutation MoveIssueToState($id: String!, $stateId: String!) {
issueUpdate(id: $id, input: { stateId: $stateId }) {
success
issue {
id
identifier
state {
id
name
}
}
}
}
MCP 経路:
mcp__linear__create_attachment に issueId、url、title を渡す。attachmentLinkGitHubPR を使う。linear_graphql フォールバック:
GitHub 固有のリンクメタデータが欲しい場合:
mutation AttachGitHubPR($issueId: String!, $url: String!, $title: String) {
attachmentLinkGitHubPR(
issueId: $issueId
url: $url
title: $title
linkKind: links
) {
success
attachment {
id
title
url
}
}
}
プレーンな URL アタッチメントで足りる場合:
mutation AttachURL($issueId: String!, $url: String!, $title: String) {
attachmentLinkURL(issueId: $issueId, url: $url, title: $title) {
success
attachment {
id
title
url
}
}
}
MCP には現状アップロード API がない。linear_graphql 経路を使う。
3 ステップで行う:
linear_graphql を fileUpload で呼び出して、uploadUrl、assetUrl、必要なアップロードヘッダーを取得する。curl -X PUT と fileUpload から返された正確なヘッダーで uploadUrl にアップロードする。mcp__linear__save_comment(または linear_graphql の commentCreate/commentUpdate)を呼び、結果の assetUrl をコメント本文に埋め込む。mutation FileUpload(
$filename: String!
$contentType: String!
$size: Int!
$makePublic: Boolean
) {
fileUpload(
filename: $filename
contentType: $contentType
size: $size
makePublic: $makePublic
) {
success
uploadFile {
uploadUrl
assetUrl
headers {
key
value
}
}
}
}
MCP では露出していない mutation・input 型・object フィールドが必要なときは、linear_graphql 経由でターゲットされたイントロスペクションを使う。
mutation 名一覧:
query ListMutations {
__type(name: "Mutation") {
fields {
name
}
}
}
特定の input オブジェクトを調査:
query CommentCreateInputShape {
__type(name: "CommentCreateInput") {
inputFields {
name
type {
kind
name
ofType {
kind
name
}
}
}
}
}
query QueryFields {
__type(name: "Query") {
fields {
name
}
}
}
query IssueFieldArgs {
__type(name: "Query") {
fields {
name
args {
name
type {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
linear_graphql を使う。attachmentLinkGitHubPR を、それ以外は MCP の create_attachment を優先する。fileUpload から返された署名済みアップロード URL にのみ使用する。これらの URL は既に必要な認可情報を持っている。