Linear SDK Usage
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when implementing Linear integrations using the official @linear/sdk — creating issues programmatically, advanced fetch/modify…
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Linear SDK (@linear/sdk)
References:
- SDK overview: https://linear.app/developers/sdk
- Advanced usage: https://linear.app/developers/advanced-usage
- Fetch / modify: https://linear.app/developers/sdk-fetching-and-modifying-data
- Errors: https://linear.app/developers/sdk-errors
- Create issues with
linearCreate: https://linear.app/developers/create-issues-using-linear-new
Initialisation
import { 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,
// Attribution is set by `actor=app` at authorize time, not per call
});
Fetching with lazy connections
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()).
Mutations
const result = await client.createIssue({
teamId, title, description, priority: 1
});
if (!result.success) throw new Error("Create failed");
const issue = await result.issue;
Errors
The SDK throws typed errors:
AuthenticationError— token badUserError— your input invalid (validation)RatelimitedError— back off; checkheaders.get("X-RateLimit-Reset")NetworkError— retry with exponential backoffGraphqlError— server-side; captureerrors[].extensions.code- See: https://linear.app/developers/sdk-errors
Pagination helper
async 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.
Creating issues with linear.new
For UI-mediated creation (deep-link), see https://linear.app/developers/create-issues-using-linear-new — useful for triage flows that need user input.
Установить Linear SDK Usage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobBashFAQ
Что делает скилл Linear SDK Usage?
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".
Как установить скилл Linear SDK Usage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Linear SDK Usage запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic