plugins/linear-orchestrator/skills/linear-sdk/SKILL.md
This skill should be used when implementing Linear integrations using the official @linear/sdk — creating issues programmatically, advanced fetch/modify patterns, error handling, and type safety. Activates on "linear sdk", "@linear/sdk", "linear client", "linear typescript".
npx skillsauth add markus41/claude Linear SDK UsageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
References:
linearCreate: https://linear.app/developers/create-issues-using-linear-newimport { LinearClient } from "@linear/sdk";
const client = new LinearClient({ apiKey: process.env.LINEAR_API_KEY });
For OAuth:
const client = new LinearClient({ accessToken: token });
For actor mode:
const client = new LinearClient({
accessToken: token,
headers: { "Linear-Actor-Token": actorToken }
});
The SDK returns LinearFetch<T> — promises that auto-resolve nested connections:
const team = await client.team("ENG");
const issues = await team.issues({ first: 50 });
for (const issue of issues.nodes) {
const assignee = await issue.assignee; // lazy fetch — second round-trip
}
Pitfall: lazy access fires N+1 queries. Use client.issues({ filter, includeArchived: false }) with a GraphQL query that selects nested fields up front (drop into raw GraphQL via client.client.rawRequest()).
const result = await client.createIssue({
teamId, title, description, priority: 1
});
if (!result.success) throw new Error("Create failed");
const issue = await result.issue;
The SDK throws typed errors:
AuthenticationError — token badUserError — your input invalid (validation)RatelimitedError — back off; check headers.get("X-RateLimit-Reset")NetworkError — retry with exponential backoffGraphqlError — server-side; capture errors[].extensions.codeasync function* paginate(query, vars) {
let cursor;
do {
const page = await query({ ...vars, after: cursor });
yield* page.nodes;
cursor = page.pageInfo.hasNextPage ? page.pageInfo.endCursor : null;
} while (cursor);
}
Used by lib/pagination.ts.
For UI-mediated creation (deep-link), see https://linear.app/developers/create-issues-using-linear-new — useful for triage flows that need user input.
development
Enhanced plan-authoring skill with Pre-Writing context gathering, task metadata, non-TDD templates, Red Flags, telemetry, and an automated plan linter. Use when you have a spec or requirements for a multi-step task, before touching code.
tools
Documentation intelligence engine with graph-based API docs, algorithm library, and drift detection
tools
Ultraplan cloud planning — kick off a plan in the cloud from your terminal, review and revise in the browser, then execute remotely or send back to CLI
tools
--- name: mcp description: Configure MCP servers for Claude Code — stdio vs HTTP, authentication, Tools/Resources/Prompts distinction, channels (CI webhook, mobile relay, Discord bridge, fakechat), and cost of always-loaded tools. Use this skill whenever adding an MCP server, debugging connection issues, choosing between MCP Tools vs Prompts vs Resources, installing channel servers, or managing .mcp.json. Triggers on: "MCP server", "mcp config", "add Obsidian MCP", "install context7", "channels"