linear-performance-tuning

Featured

Optimize Linear API queries, caching, and batching for performance. Use when improving response times, reducing API calls, or implementing caching strategies for Linear data. Trigger: "linear performance", "optimize linear", "linear caching", "linear slow queries", "speed up linear", "linear N+1".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Linear Performance Tuning ## Overview Optimize Linear API usage for minimal latency and efficient resource consumption. The three main levers are: (1) query flattening to avoid N+1 and reduce complexity, (2) caching static data with webhook-driven invalidation, and (3) batching mutations into single GraphQL requests. **Key numbers:** - Query complexity budget: 250,000 pts/hour, max 10,000 per query - Each property: 0.1 pt, each object: 1 pt, connections: multiply by `first` - Best practice: sort by `updatedAt` to get fresh data first ## Prerequisites - Working Linear integration with `@linear/sdk` - Understanding of GraphQL query structure - Optional: Redis for distributed caching ## Instructions ### Step 1: Eliminate N+1 Queries The SDK lazy-loads relations. Accessing `.assignee` on 50 issues makes 50 separate API calls. ```typescript import { LinearClient } from "@linear/sdk"; const client = new LinearClient({ apiKey: process.env.LINEAR_API_KEY! }); // BAD: N+1 — 1 query for issues + 50 for assignees + 50 for states = 101 requests const issues = await client.issues({ first: 50 }); for (const i of issues.nodes) { const assignee = await i.assignee; // API call! const state = await i.state; // API call! console.log(`${i.identifier}: ${assignee?.name} [${state?.name}]`); } // GOOD: 1 request — use rawRequest with exact field selection const response = await client.client.rawRequest(` query TeamDashboard($teamId: String!) { team(id: $teamId) { ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize efficiency within rate limit budgets. Trigger: "linear cost", "reduce linear API calls", "linear efficiency", "linear API usage", "optimize linear costs", "linear budget".

2,266 Updated today
jeremylongshore
AI & Automation Featured

linear-sdk-patterns

TypeScript/JavaScript SDK patterns and best practices for Linear. Use when learning SDK idioms, implementing pagination, filtering, relation loading, or custom GraphQL queries. Trigger: "linear SDK patterns", "linear best practices", "linear typescript", "linear API patterns", "linear pagination".

2,266 Updated today
jeremylongshore
AI & Automation Featured

linear-hello-world

Create your first Linear issue and query using the SDK and GraphQL API. Use when making initial API calls, testing connection, or learning basic Linear CRUD operations. Trigger: "linear hello world", "first linear issue", "create linear issue", "linear API example", "test linear".

2,266 Updated today
jeremylongshore
AI & Automation Featured

linear-data-handling

Data synchronization, backup, and consistency patterns for Linear. Use when implementing data sync, creating backups, exporting data, or ensuring data consistency between Linear and local state. Trigger: "linear data sync", "backup linear", "linear export", "linear data consistency", "sync linear issues".

2,266 Updated today
jeremylongshore
AI & Automation Solid

linear

Manage Linear issues, projects, and teams via the GraphQL API. Create, update, search, and organize issues. Uses API key auth (no OAuth needed). All operations via curl — no dependencies.

173,893 Updated today
NousResearch