Skip to main content
linear-core-workflow-a Issue lifecycle management with Linear: create, update, transition,
relate, comment, and organize issues through the SDK and GraphQL API.
Trigger: "linear issue workflow", "linear issue lifecycle",
"create linear issues", "update linear issue", "linear state transition",
"linear sub-issues", "linear comments".
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill linear-core-workflow-a命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... jeremylongshore
jeremylongshore/claude-code-plugins-plus-skills
打开 GitHub 仓库 同仓库更多 Skills Implement user sign-up and sign-in flows with Clerk.
Use when building authentication UI, customizing sign-in experience,
or implementing OAuth social login.
Trigger with phrases like "clerk sign-in", "clerk sign-up",
"clerk login flow", "clerk OAuth", "clerk social login".
Implement session management and middleware with Clerk.
Use when managing user sessions, configuring route protection,
or implementing token refresh and custom JWT templates.
Trigger with phrases like "clerk session", "clerk middleware",
"clerk route protection", "clerk token", "clerk JWT".
Configure enterprise SSO, role-based access control, and organization management.
Use when implementing SSO integration, configuring role-based permissions,
or setting up organization-level controls.
Trigger with phrases like "clerk SSO", "clerk RBAC",
"clerk enterprise", "clerk roles", "clerk permissions", "clerk organizations".
name linear-core-workflow-a description Issue lifecycle management with Linear: create, update, transition,
relate, comment, and organize issues through the SDK and GraphQL API.
Trigger: "linear issue workflow", "linear issue lifecycle",
"create linear issues", "update linear issue", "linear state transition",
"linear sub-issues", "linear comments".
allowed-tools Read, Write, Edit, Grep version 1.12.0 license MIT author Jeremy Longshore <jeremy@intentsolutions.io> tags ["saas","linear","workflow"] compatibility Designed for Claude Code, also compatible with Codex and OpenClaw
Linear Core Workflow A: Issue Lifecycle
Overview
Master issue lifecycle management: creating, updating, transitioning states, building parent/sub-issue hierarchies, managing labels, and commenting. Linear issues flow through typed workflow states (triage -> backlog -> unstarted -> started -> completed | canceled), belong to a team, and support priorities 0-4, estimates, due dates, labels, and cycle/project assignment.
Prerequisites
@linear/sdk installed with API key or OAuth token configured
Access to target team(s)
Understanding of your team's workflow states
Instructions
Step 1: Create Issues
import { LinearClient } from "@linear/sdk" ;
const client = new LinearClient ({ apiKey : process.env .LINEAR_API_KEY ! });
const teams = await client.teams ();
const team = teams.nodes .find (t => t.key === "ENG" ) ?? teams.nodes [0 ];
const result = await client.createIssue ({
teamId : team.id ,
title : "Implement user authentication" ,
description : "Add OAuth 2.0 login flow with Google and GitHub providers." ,
priority : 2 ,
});
(result. ) {
issue = result. ;
. ( );
. ( );
}
labelResult = client. ({ : { : { : } } });
bugLabel = labelResult. [ ];
states = team. ();
todoState = states. . ( s. === )!;
client. ({
: team. ,
: ,
: ,
: ,
: todoState. ,
: ,
: bugLabel ? [bugLabel. ] : [],
: ,
: ,
});
if
success
const
await
issue
console
log
`Created: ${issue?.identifier} — ${issue?.title} `
console
log
`URL: ${issue?.url} `
const
await
issueLabels
filter
name
eq
"Bug"
const
nodes
0
const
await
states
const
nodes
find
s =>
type
"unstarted"
await
createIssue
teamId
id
title
"Fix login redirect loop on Safari"
description
"Users get stuck in infinite redirect after SSO callback."
priority
1
stateId
id
assigneeId
"user-uuid"
labelIds
id
estimate
3
dueDate
"2026-04-15"
Step 2: Update Issues
await client.updateIssue ("issue-uuid" , {
title : "Updated title" ,
priority : 1 ,
estimate : 5 ,
dueDate : "2026-04-30" ,
});
const issues = await client.issues ({
filter : { number : { eq : 123 }, team : { key : { eq : "ENG" } } },
});
const issue = issues.nodes [0 ];
if (issue) {
await issue.update ({
priority : 2 ,
description : "Updated description with more details." ,
});
}
const featureLabel = (await client.issueLabels ({
filter : { name : { eq : "Feature" } },
})).nodes [0 ];
if (featureLabel) {
await client.updateIssue (issue.id , {
labelIds : [...(issue.labelIds ?? []), featureLabel.id ],
});
}
Step 3: State Transitions
const teamStates = await team.states ();
for (const state of teamStates.nodes ) {
console .log (`${state.name} (type: ${state.type } , position: ${state.position} )` );
}
const inProgress = teamStates.nodes .find (s => s.name === "In Progress" );
if (inProgress) {
await client.updateIssue (issue.id , { stateId : inProgress.id });
}
const done = teamStates.nodes .find (s => s.type === "completed" );
if (done) {
await issue.update ({ stateId : done.id });
}
Step 4: Parent/Sub-Issue Hierarchy
const parentResult = await client.createIssue ({
teamId : team.id ,
title : "Auth system overhaul" ,
description : "Epic: modernize authentication infrastructure." ,
});
const parent = await parentResult.issue ;
await client.createIssue ({
teamId : team.id ,
title : "Implement JWT token refresh" ,
parentId : parent!.id ,
priority : 2 ,
});
await client.createIssue ({
teamId : team.id ,
title : "Add MFA support" ,
parentId : parent!.id ,
priority : 3 ,
});
const children = await parent!.children ();
for (const child of children.nodes ) {
console .log (` Sub: ${child.identifier} — ${child.title} ` );
}
Step 5: Issue Relations
await client.createIssueRelation ({
issueId : "blocked-issue-id" ,
relatedIssueId : "blocking-issue-id" ,
type : "blocks" ,
});
await client.createIssueRelation ({
issueId : "duplicate-issue-id" ,
relatedIssueId : "original-issue-id" ,
type : "duplicate" ,
});
const relations = await issue.relations ();
for (const rel of relations.nodes ) {
const related = await rel.relatedIssue ;
console .log (`${rel.type } : ${related?.identifier} ` );
}
Step 6: Comments
await client.createComment ({
issueId : issue.id ,
body : "Deployed fix to staging.\n\n```bash\nnpm run test:e2e -- --filter auth\n```\n\nAll 47 tests passing." ,
});
const comments = await issue.comments ();
for (const comment of comments.nodes ) {
const user = await comment.user ;
console .log (`${user?.name} : ${comment.body.substring(0 , 80 )} ...` );
}
Step 7: Attachments
await client.createAttachment ({
issueId : issue.id ,
title : "Figma Design" ,
url : "https://figma.com/file/xxx" ,
subtitle : "Login page redesign" ,
});
Error Handling Error Cause Solution Entity not foundInvalid issue ID or deleted Verify with client.issue(id) first State not foundWrong team's state ID List states for correct team: team.states() Validation error on createMissing required field teamId + title required; priority must be 0-4Circular dependencyIssue blocks itself transitively Validate relation graph before creating ForbiddenNo write access to team Check team membership and API key scope
Examples
Bulk Create from CSV import { parse } from "csv-parse/sync" ;
import fs from "fs" ;
const rows = parse (fs.readFileSync ("issues.csv" ), { columns : true });
for (const row of rows) {
const result = await client.createIssue ({
teamId : team.id ,
title : row.title ,
description : row.description ,
priority : parseInt (row.priority ) || 3 ,
});
const issue = await result.issue ;
console .log (`Created: ${issue?.identifier} ` );
}
Close Stale Issues const stale = await client.issues ({
filter : {
state : { type : { in : ["unstarted" , "started" ] } },
updatedAt : { lt : new Date (Date .now () - 90 * 24 * 60 * 60 * 1000 ).toISOString () },
},
first : 50 ,
});
const canceled = (await team.states ()).nodes .find (s => s.type === "canceled" )!;
for (const issue of stale.nodes ) {
await issue.update ({ stateId : canceled.id });
await client.createComment ({
issueId : issue.id ,
body : "Auto-closed: no activity for 90 days." ,
});
console .log (`Closed: ${issue.identifier} (last updated ${issue.updatedAt} )` );
}
Resources