linear-hello-world
Create your first Linear issue and query using the GraphQL API. Use when making initial API calls, testing Linear connection, or learning basic Linear operations. Trigger with phrases like "linear hello world", "first linear issue", "create linear issue", "linear API example", "test linear connection".
Install
mkdir -p .claude/skills/linear-hello-world && curl -L -o skill.zip "https://mcp.directory/api/skills/download/8642" && unzip -o skill.zip -d .claude/skills/linear-hello-world && rm skill.zipInstalls to .claude/skills/linear-hello-world
About this skill
Linear Hello World
Overview
Create your first issue, query teams, and explore the Linear data model using the @linear/sdk. Linear's API is GraphQL-based -- the SDK wraps it with typed models, lazy-loaded relations, and pagination helpers.
Prerequisites
@linear/sdkinstalled (npm install @linear/sdk)LINEAR_API_KEYenvironment variable set (starts withlin_api_)- Access to at least one Linear team
Instructions
Step 1: Connect and Identify
import { LinearClient } from "@linear/sdk";
const client = new LinearClient({ apiKey: process.env.LINEAR_API_KEY! });
// Get current authenticated user
const me = await client.viewer;
console.log(`Hello, ${me.name}! (${me.email})`);
// Get your organization
const org = await me.organization;
console.log(`Workspace: ${org.name}`);
Step 2: List Teams
Every issue in Linear belongs to a team. Teams have a short key (e.g., "ENG") used in identifiers like ENG-123.
const teams = await client.teams();
console.log("Your teams:");
for (const team of teams.nodes) {
console.log(` ${team.key} — ${team.name} (${team.id})`);
}
Step 3: Create Your First Issue
const team = teams.nodes[0];
const result = await client.createIssue({
teamId: team.id,
title: "Hello from Linear SDK!",
description: "This issue was created using the `@linear/sdk` TypeScript SDK.",
priority: 3, // 0=None, 1=Urgent, 2=High, 3=Medium, 4=Low
});
if (result.success) {
const issue = await result.issue;
console.log(`Created: ${issue?.identifier} — ${issue?.title}`);
console.log(`URL: ${issue?.url}`);
}
Step 4: Query Issues
// Get recent issues from a team
const issues = await client.issues({
filter: {
team: { key: { eq: team.key } },
state: { type: { nin: ["completed", "canceled"] } },
},
first: 10,
});
console.log(`\nOpen issues in ${team.key}:`);
for (const issue of issues.nodes) {
const state = await issue.state;
console.log(` ${issue.identifier}: ${issue.title} [${state?.name}]`);
}
Step 5: Explore Workflow States
Each team has customizable workflow states organized by type: triage, backlog, unstarted, started, completed, canceled.
const states = await team.states();
console.log(`\nWorkflow states for ${team.key}:`);
for (const state of states.nodes) {
console.log(` ${state.name} (type: ${state.type}, position: ${state.position})`);
}
Step 6: Fetch a Single Issue by Identifier
// Search for a specific issue by its human-readable identifier
const searchResults = await client.issueSearch("ENG-1");
const found = searchResults.nodes[0];
if (found) {
console.log(`\nFound: ${found.identifier}`);
console.log(` Title: ${found.title}`);
console.log(` Priority: ${found.priority}`);
console.log(` Created: ${found.createdAt}`);
const assignee = await found.assignee;
console.log(` Assignee: ${assignee?.name ?? "Unassigned"}`);
}
Step 7: Raw GraphQL Query
The SDK exposes the underlying GraphQL client for custom queries.
const response = await client.client.rawRequest(`
query TeamDashboard($teamKey: String!) {
teams(filter: { key: { eq: $teamKey } }) {
nodes {
name
key
issues(first: 5, orderBy: updatedAt) {
nodes {
identifier
title
priority
state { name type }
assignee { name }
}
}
}
}
}
`, { teamKey: "ENG" });
console.log(JSON.stringify(response.data, null, 2));
Error Handling
| Error | Cause | Solution |
|---|---|---|
Authentication required | Invalid API key | Regenerate at Settings > Account > API |
Entity not found | Invalid ID or no access | Use client.teams() first to get valid IDs |
Validation error | Missing required field | teamId and title are required for createIssue |
Cannot read properties of null | Accessing nullable relation | Use optional chaining: (await issue.assignee)?.name |
Examples
Complete Hello World Script
import { LinearClient } from "@linear/sdk";
async function main() {
const client = new LinearClient({ apiKey: process.env.LINEAR_API_KEY! });
const me = await client.viewer;
console.log(`Connected as ${me.name}\n`);
const teams = await client.teams();
const team = teams.nodes[0];
// Create issue
const result = await client.createIssue({
teamId: team.id,
title: "Hello from Linear SDK!",
description: "Testing the API integration.",
priority: 3,
});
if (result.success) {
const issue = await result.issue;
console.log(`Created: ${issue?.identifier} — ${issue?.url}`);
// Read it back
const fetched = await client.issue(issue!.id);
console.log(`Verified: ${fetched.title}`);
// Clean up
await fetched.delete();
console.log("Deleted test issue.");
}
}
main().catch(console.error);
Resources
More by jeremylongshore
View all skills by jeremylongshore →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.
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.
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."
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.
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.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversStreamline your workflow with Linear: project management software for effortless project tracking, team management, and
Access and interact with Jira and Linear tickets directly in conversations—no context switching to Jira ticketing softwa
Linear Issues integrates with Linear to give you read-only access to issue details and comments without switching apps.
Automate project management with Linear integration. Manage issues, comments, & projects easily, boosting productivity w
Linear offers project management software and project tracking software designed for development teams to streamline wor
Securely access and manage your Linear projects and issues with a simple, fast interface—keep your team productive and w
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.