linear-core-workflow-b

0
0
Source

Project and cycle management workflows with Linear. Use when implementing sprint planning, managing projects and roadmaps, or organizing work into cycles. Trigger with phrases like "linear project", "linear cycle", "linear sprint", "linear roadmap", "linear planning", "organize linear work".

Install

mkdir -p .claude/skills/linear-core-workflow-b && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7291" && unzip -o skill.zip -d .claude/skills/linear-core-workflow-b && rm skill.zip

Installs to .claude/skills/linear-core-workflow-b

About this skill

Linear Core Workflow B: Projects & Cycles

Overview

Manage projects, cycles (sprints), milestones, and roadmaps using the Linear API. Projects group issues across teams with states (planned, started, paused, completed, canceled), target dates, and progress tracking. Cycles are time-boxed iterations (sprints) owned by a single team. Initiatives group projects at the organizational level.

Prerequisites

  • Linear SDK configured with API key or OAuth token
  • Understanding of Linear's hierarchy: Organization > Team > Cycle/Project > Issue
  • Team access with project create permissions

Instructions

Step 1: Project CRUD

import { LinearClient } from "@linear/sdk";

const client = new LinearClient({ apiKey: process.env.LINEAR_API_KEY! });

// List projects (optionally filter by team)
const projects = await client.projects({
  filter: {
    accessibleTeams: { some: { key: { eq: "ENG" } } },
    state: { nin: ["completed", "canceled"] },
  },
  orderBy: "updatedAt",
  first: 20,
});

for (const project of projects.nodes) {
  console.log(`${project.name} [${project.state}] — progress: ${Math.round(project.progress * 100)}%`);
}

// Create a project
const teams = await client.teams();
const eng = teams.nodes.find(t => t.key === "ENG")!;

const projectResult = await client.createProject({
  name: "Authentication Overhaul",
  description: "Modernize auth infrastructure with OAuth 2.0 + MFA.",
  teamIds: [eng.id],
  state: "planned",
  targetDate: "2026-06-30",
});

const project = await projectResult.project;
console.log(`Created project: ${project?.name} (${project?.id})`);

// Update project
await client.updateProject(project!.id, {
  state: "started",
  description: "Updated scope: includes SSO integration.",
});

// Get project by slug
const found = await client.projects({
  filter: { slugId: { eq: "auth-overhaul" } },
});

Step 2: Project Milestones

// Create milestones for a project
await client.createProjectMilestone({
  projectId: project!.id,
  name: "OAuth 2.0 Implementation",
  targetDate: "2026-04-15",
});

await client.createProjectMilestone({
  projectId: project!.id,
  name: "MFA Rollout",
  targetDate: "2026-05-30",
});

// List milestones
const milestones = await project!.projectMilestones();
for (const ms of milestones.nodes) {
  console.log(`  Milestone: ${ms.name} — target: ${ms.targetDate}`);
}

Step 3: Assign Issues to Projects

// Create issue directly in a project
await client.createIssue({
  teamId: eng.id,
  title: "Implement OAuth 2.0 login flow",
  projectId: project!.id,
  priority: 2,
});

// Move existing issue to project
await client.updateIssue("existing-issue-id", {
  projectId: project!.id,
});

// Get all issues in a project
const projectIssues = await project!.issues({ first: 100 });
for (const issue of projectIssues.nodes) {
  const state = await issue.state;
  console.log(`  ${issue.identifier}: ${issue.title} [${state?.name}]`);
}

Step 4: Cycle (Sprint) Management

// Get current and upcoming cycles for a team
const now = new Date().toISOString();
const cycles = await eng.cycles({
  filter: { endsAt: { gte: now } },
  orderBy: "startsAt",
});

for (const cycle of cycles.nodes) {
  console.log(`${cycle.name ?? "Unnamed"}: ${cycle.startsAt} → ${cycle.endsAt}`);
}

// Create a new 2-week cycle
const startsAt = new Date();
const endsAt = new Date();
endsAt.setDate(endsAt.getDate() + 14);

const cycleResult = await client.createCycle({
  teamId: eng.id,
  name: "Sprint 42",
  startsAt: startsAt.toISOString(),
  endsAt: endsAt.toISOString(),
});

const cycle = await cycleResult.cycle;
console.log(`Created cycle: ${cycle?.name}`);

// Add issues to cycle
const issueIds = ["issue-id-1", "issue-id-2", "issue-id-3"];
for (const issueId of issueIds) {
  await client.updateIssue(issueId, { cycleId: cycle!.id });
}

Step 5: Cycle Metrics

async function getCycleMetrics(cycleId: string) {
  const cycle = await client.cycle(cycleId);
  const issues = await cycle.issues();

  const byState = new Map<string, number>();
  let totalEstimate = 0;
  let completedEstimate = 0;

  for (const issue of issues.nodes) {
    const state = await issue.state;
    const name = state?.name ?? "Unknown";
    byState.set(name, (byState.get(name) ?? 0) + 1);

    totalEstimate += issue.estimate ?? 0;
    if (state?.type === "completed") {
      completedEstimate += issue.estimate ?? 0;
    }
  }

  return {
    totalIssues: issues.nodes.length,
    stateBreakdown: Object.fromEntries(byState),
    totalPoints: totalEstimate,
    completedPoints: completedEstimate,
    burndown: totalEstimate ? Math.round((completedEstimate / totalEstimate) * 100) : 0,
  };
}

const metrics = await getCycleMetrics(cycle!.id);
console.log(`Sprint progress: ${metrics.burndown}% (${metrics.completedPoints}/${metrics.totalPoints} pts)`);

Step 6: Sprint Rollover

async function rolloverCycle(fromCycleId: string, toCycleId: string) {
  const fromCycle = await client.cycle(fromCycleId);
  const unfinished = await fromCycle.issues({
    filter: { state: { type: { nin: ["completed", "canceled"] } } },
  });

  let moved = 0;
  for (const issue of unfinished.nodes) {
    await client.updateIssue(issue.id, { cycleId: toCycleId });
    moved++;
  }

  console.log(`Rolled over ${moved} unfinished issues`);
  return moved;
}

Step 7: Team Velocity

async function calculateVelocity(teamKey: string, sprintCount = 3) {
  const teams = await client.teams({ filter: { key: { eq: teamKey } } });
  const team = teams.nodes[0];

  // Get completed cycles
  const cycles = await team.cycles({
    filter: { completedAt: { neq: null } },
    orderBy: "completedAt",
    first: sprintCount,
  });

  const velocities = await Promise.all(
    cycles.nodes.map(async (cycle) => {
      const completed = await cycle.issues({
        filter: { state: { type: { eq: "completed" } } },
      });
      return completed.nodes.reduce((sum, i) => sum + (i.estimate ?? 0), 0);
    })
  );

  const avg = velocities.reduce((a, b) => a + b, 0) / velocities.length;
  return { velocities, average: Math.round(avg * 10) / 10 };
}

const velocity = await calculateVelocity("ENG");
console.log(`Average velocity: ${velocity.average} pts/sprint`);

Step 8: Roadmap View

async function getRoadmap(monthsAhead = 6) {
  const futureDate = new Date();
  futureDate.setMonth(futureDate.getMonth() + monthsAhead);

  const projects = await client.projects({
    filter: {
      state: { nin: ["completed", "canceled"] },
      targetDate: { lte: futureDate.toISOString() },
    },
    orderBy: "targetDate",
  });

  return projects.nodes.map(p => ({
    name: p.name,
    state: p.state,
    progress: `${Math.round(p.progress * 100)}%`,
    targetDate: p.targetDate,
  }));
}

const roadmap = await getRoadmap();
console.table(roadmap);

Error Handling

ErrorCauseSolution
Project not foundInvalid project ID or deletedVerify ID with client.projects()
Cycle dates overlapDates conflict with existing cycleCheck existing cycles: team.cycles()
Permission deniedNo project accessVerify team membership
Invalid date rangeendsAt before startsAtValidate date ordering before API call
Team not in projectIssue team not in project's team listAdd team via updateProject first

Examples

Sprint Planning Flow

async function planSprint(teamKey: string, durationDays: number, issueIds: string[]) {
  const teams = await client.teams({ filter: { key: { eq: teamKey } } });
  const team = teams.nodes[0];

  const startsAt = new Date();
  const endsAt = new Date();
  endsAt.setDate(endsAt.getDate() + durationDays);

  const cycleResult = await client.createCycle({
    teamId: team.id,
    name: `Sprint ${new Date().toISOString().slice(0, 10)}`,
    startsAt: startsAt.toISOString(),
    endsAt: endsAt.toISOString(),
  });

  const cycle = await cycleResult.cycle;
  for (const id of issueIds) {
    await client.updateIssue(id, { cycleId: cycle!.id });
  }

  console.log(`Sprint created: ${cycle?.name} (${issueIds.length} issues)`);
  return cycle;
}

Resources

svg-icon-generator

jeremylongshore

Svg Icon Generator - Auto-activating skill for Visual Content. Triggers on: svg icon generator, svg icon generator Part of the Visual Content skill category.

7824

automating-mobile-app-testing

jeremylongshore

This skill enables automated testing of mobile applications on iOS and Android platforms using frameworks like Appium, Detox, XCUITest, and Espresso. It generates end-to-end tests, sets up page object models, and handles platform-specific elements. Use this skill when the user requests mobile app testing, test automation for iOS or Android, or needs assistance with setting up device farms and simulators. The skill is triggered by terms like "mobile testing", "appium", "detox", "xcuitest", "espresso", "android test", "ios test".

13615

d2-diagram-creator

jeremylongshore

D2 Diagram Creator - Auto-activating skill for Visual Content. Triggers on: d2 diagram creator, d2 diagram creator Part of the Visual Content skill category.

3114

performing-penetration-testing

jeremylongshore

This skill enables automated penetration testing of web applications. It uses the penetration-tester plugin to identify vulnerabilities, including OWASP Top 10 threats, and suggests exploitation techniques. Use this skill when the user requests a "penetration test", "pentest", "vulnerability assessment", or asks to "exploit" a web application. It provides comprehensive reporting on identified security flaws.

4311

performing-security-audits

jeremylongshore

This skill allows Claude to conduct comprehensive security audits of code, infrastructure, and configurations. It leverages various tools within the security-pro-pack plugin, including vulnerability scanning, compliance checking, cryptography review, and infrastructure security analysis. Use this skill when a user requests a "security audit," "vulnerability assessment," "compliance review," or any task involving identifying and mitigating security risks. It helps to ensure code and systems adhere to security best practices and compliance standards.

109

designing-database-schemas

jeremylongshore

Design and visualize efficient database schemas, normalize data, map relationships, and generate ERD diagrams and SQL statements.

1128

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

9521,094

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

846846

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

571699

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

548492

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

673466

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

514280

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.