linear-sdk-scripting

Installation
SKILL.md

Linear SDK Scripting

Drive Linear through the official TypeScript SDK (@linear/sdk) by writing throwaway Node scripts and executing them. This replaces the Linear MCP server: anything the MCP can do (read issues, create issues, comment, change status, query teams/projects/cycles) you do here by calling SDK methods.

The SDK is preferred over hand-written GraphQL because pagination, relationship traversal, and mutation payloads are normalized, and method and input names are predictable. When you need a field or filter you do not know, consult the docs index in references/docs-index.md and fetch the specific page rather than guessing.

Workflow at a glance

Be reactive: try the script first, recover on auth failure, and only create a key as a last resort. Do not gate on $LINEAR_API_KEY being set in the current shell, that variable is almost always empty here even when a valid key is already persisted (see Setup).

  1. Make sure the SDK is installed in the working dir. See Setup.
  2. Write a small .mjs script into the working dir that imports LinearClient and does the task.
  3. Run it with node, sourcing the shell profiles first so a persisted key is picked up (see Execution pattern).
  4. If it fails with a 401 / AuthenticationLinearError, source the shell profiles and retry once. Only if it still fails is the key actually missing or invalid: run the API key setup flow with the user.

Setup

1. Personal API key

Installs
26
Repository
cline/skills
GitHub Stars
6
First Seen
Jun 2, 2026
linear-sdk-scripting — cline/skills