LI

linear-sdk-patterns

Provides best practices and code patterns for efficient Linear SDK usage.

Install

mkdir -p .claude/skills/linear-sdk-patterns && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5375" && unzip -o skill.zip -d .claude/skills/linear-sdk-patterns && rm skill.zip

Installs to .claude/skills/linear-sdk-patterns

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

TypeScript/JavaScript SDK patterns and best practices for Linear.
65 charsno explicit “when” trigger
Intermediate

Key capabilities

  • →Manage LinearClient instances for single or multi-user applications.
  • →Implement cursor-based pagination for Linear API data.
  • →Optimize relation loading to avoid N+1 query problems.
  • →Construct filtered queries using various comparators and logical operators.
  • →Handle API errors with type-safe error classes.
  • →Execute raw GraphQL queries and mutations for advanced control.

How it works

The skill provides TypeScript code examples and explanations for common patterns when interacting with the Linear GraphQL API via the `@linear/sdk`.

Inputs & outputs

You give it
Linear API key or access token, GraphQL queries, filter parameters
You get back
Linear data (issues, teams, users), paginated results, API responses

When to use linear-sdk-patterns

  • →Implementing Linear API integrations
  • →Optimizing SDK data fetching
  • →Managing API rate limits
  • →Handling Linear GraphQL relations

About this skill

Linear TypeScript SDK Patterns

Overview

Keep SDK mechanics inside a bounded adapter and expose domain-shaped results rather than generated model objects throughout the application.

Prerequisites

  • The target repository, Linear workspace, environment, and accountable owner
  • Current security, privacy, compliance, capacity, and change-control requirements
  • An approved Linear credential only when a bounded live verification is necessary

Tool Discipline

Use Read, Glob, and Grep to inspect code, configuration, and evidence. Use WebFetch only for current first-party Linear documentation and package metadata. Use Write or Edit only for requested implementation with known target files. Never write credentials, customer content, unrestricted environment output, or unredacted GraphQL variables.

Current Contract

  • Current SDK mutations use verb-first names such as createIssue, updateUser, and archiveProject.
  • Connections expose nodes, pageInfo, fetchNext, and fetchPrevious; optional variables are passed in an object.
  • linearClient.client.rawRequest supports purpose-built GraphQL, while LinearError exposes parsed request/response/error evidence.

Authentication

Use a personal API key only for owner-controlled scripts, OAuth with PKCE for user-delegated applications, or an enabled client-credentials grant for approved automation. Personal keys use Authorization: <API_KEY>; OAuth tokens use Authorization: Bearer <ACCESS_TOKEN>. Store credentials server-side in an approved secret manager.

Treat app approval, team access, scope changes, credential creation, rotation, revocation, and production access as owner-approved actions.

Instructions

  1. Inspect the installed SDK version, generated types, adapter boundary, call sites, and error policy.
  2. Create one client per approved auth context and inject it; never construct clients throughout business code.
  3. Wrap SDK models in domain functions that accept stable IDs and return minimum typed projections.
  4. Paginate every connection explicitly and expose checkpoints for long-running synchronization.
  5. Use raw GraphQL only when it measurably reduces fields or fan-out; keep operation names and variables typed.
  6. Normalize LinearError and GraphQL partial errors into retryable, terminal, and reconciliation-required outcomes.

Approval Boundaries

Do not create, reveal, rotate, or revoke credentials; authorize an OAuth app; change scopes or team access; create, mutate, archive, or delete workspace data; configure or re-enable webhooks; import or export data; change roles, SCIM, or audit streaming; transmit diagnostics; change paid entitlements; or perform another production mutation without explicit approval from the accountable owner. Keep diagnosis read-only unless implementation was requested.

Output

Return the workspace and team scope, auth mode without credential value, files and contracts inspected, exact operation names, evidence collected, validation result, sensitive fields redacted, remaining risk, accountable owner, approval state, and rollback or next action.

Error Handling

ConditionResponse
Method missingCompare code with the installed generated SDK and the verb-first mutation contract.
Connection truncatedFollow pageInfo or SDK page helpers until the required boundary is reached.
Model leaks across layersMap it to a stable application-owned type at the adapter boundary.
Raw query driftsValidate against current introspection/generated schema and add a contract test.

Examples

Use a compact handoff that makes scope, mutation authority, and verification evidence reviewable.

Input:

adapter=issues; operation=listUpdated; page-size=25; checkpoint=cursor

Expected handoff:

client=injected; projection=minimal; pagination=explicit; errors=normalized

Resources

Prerequisites

`@linear/sdk` installedTypeScript project with `strict: true`Understanding of async/await conceptsUnderstanding of GraphQL concepts

Limitations

  • →SDK models lazy-load relations, which can lead to N+1 problems if not batched.
  • →Query complexity can be too high with too many nested relations.
  • →Nullable relations are not automatically checked.

How it compares

This skill offers optimized patterns for client management, pagination, and relation loading, which helps avoid common pitfalls like N+1 queries and rate limit issues that might occur with naive SDK usage.

Compared to similar skills

linear-sdk-patterns side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
linear-sdk-patterns (this skill)12moReviewIntermediate
openrouter-hello-world72moCautionBeginner
telegram-dev29moReviewIntermediate
shopify-apps15moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore →

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

openrouter-hello-world

jeremylongshore

Create your first OpenRouter API request with a simple example. Use when learning OpenRouter or testing your setup. Trigger with phrases like 'openrouter hello world', 'openrouter first request', 'openrouter quickstart', 'test openrouter'.

733

telegram-dev

2025Emma

Telegram 生态开发全栈指南 - 涵盖 Bot API、Mini Apps (Web Apps)、MTProto 客户端开发。包括消息处理、支付、内联模式、Webhook、认证、存储、传感器 API 等完整开发资源。

232

shopify-apps

alinaqi

Shopify app development - Remix, Admin API, checkout extensions

19

ccxt-typescript

ccxt

CCXT cryptocurrency exchange library for TypeScript and JavaScript developers (Node.js and browser). Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors. Use when working with crypto exchanges in TypeScript/JavaScript projects, trading bots, arbitrage systems, or portfolio management tools. Includes both REST and WebSocket examples.

15

rdc-endpoint-setup

reactive

Set up @data-client/endpoint for custom async operations. Wraps existing async functions with Endpoint for use with Data Client hooks. Use after rdc-setup detects non-REST/GraphQL async patterns.

15

route-handlers

davepoon

This skill should be used when the user asks to "create an API route", "add an endpoint", "build a REST API", "handle POST requests", "create route handlers", "stream responses", or needs guidance on Next.js API development in the App Router.

14

Search skills

Search the agent skills registry