Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/linear-sdk-patterns
TypeScript/JavaScript SDK patterns and best practices for Linear.
Passed 21 of 22 test cases with the skill, and 16 of 22 without it.
and 3 more in the full report
5 fixed16 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
We have an initial page of Linear issues retrieved via `const firstPage = await client.issues({ first: 50 });`. Rather than manually reading GraphQL cursors and constructing a new query for the second page, what built-in method does the `@linear/sdk` issue object provide to fetch the immediate next page?
| Checked | Without skill | With skill |
|---|---|---|
| Calls fetchNext on the SDK page result to request the next page. | Passed | Passed |
| Guards the pagination call by checking hasNextPage on pageInfo. | Missed | Passed |
The instructions your model reads when the skill loads.
Production patterns for @linear/sdk. The SDK wraps Linear's GraphQL API with strongly-typed models, cursor-based pagination (fetchNext()/fetchPrevious()), lazy-loaded relations, and typed error classes. Understanding these patterns avoids N+1 queries and rate limit waste.
@linear/sdk installedstrict: trueimport { LinearClient } from "@linear/sdk";
let _client: LinearClient | null = null;
export function getLinearClient(): LinearClient {
if (!_client) {
const apiKey = process.env.LINEAR_API_KEY;
if (!apiKey) throw new Error("LINEAR_API_KEY is required");
_client = new LinearClient({ apiKey });
}
return _client;
}
// For multi-user OAuth apps — one client per user
const clientCache = new Map<string, LinearClient>();
export function getClientForUser(userId: string, accessToken: string): LinearClient {
if (!clientCache.has(userId)) {
clientCache.set(userId, new LinearClient({ accessToken }));
}
return clientCache.get(userId)!;
}
test cases passed, vs 16 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.