Skip to content
Back to skills

Linear

ASecurity

> **Verification Tier:** `code_example_tested` | **Last Verified:** 2026-11-18 > **Official Docs:** https://linear.app/developers/graphql

  • 13 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentstypescriptbashnodegitapisecurity

Works with

  • cursor
  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add ashish7802/awesome-api-skills --skill linear --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Linear?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Linear
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-linear/badge)](https://www.skillsdirectory.com/skills/ashish7802-linear)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Linear API & SDK Skill

> **Verification Tier:** `code_example_tested` | **Last Verified:** 2026-11-18  
> **Official Docs:** https://linear.app/developers/graphql

## Overview
Linear exposes a strongly typed GraphQL API at `https://api.linear.app/graphql` along with the official `@linear/sdk` TypeScript client and `@linear/sdk/webhooks` verifier.

## Installation
```bash
npm install @linear/sdk
```

## Authentication
Authenticate using either a Personal API Key (`Authorization: <API_KEY>` — note: **no `Bearer` prefix** for Personal API Keys) or an OAuth 2.0 access token (`Authorization: Bearer <OAUTH_TOKEN>`). `new LinearClient({ apiKey })` handles headers automatically.

## Core Concepts
- **Rate Limits & Query Complexity**: Linear enforces both request rate limits (e.g., 1,500–5,000 req/hr depending on auth type) and GraphQL complexity budgets, reported in `X-RateLimit-Requests-Remaining` and `X-RateLimit-Complexity-Remaining`.
- **Cursor Pagination**: Connections return `nodes` and `pageInfo { hasNextPage, endCursor }`; pass `first` (explicit page size) to keep query complexity low.
- **Webhook Security**: Verify incoming webhooks using `LinearWebhookClient` from `@linear/sdk/webhooks` (or HMAC-SHA256 over the raw body against the `Linear-Signature` header) AND check `webhookTimestamp` to reject replayed payloads older than 60 seconds.

## Error Handling & Rate Limits
- Avoid N+1 lazy-relation fetches in `@linear/sdk` loops (e.g., awaiting `issue.assignee` inside a loop over 100 issues); use raw GraphQL queries via `client.client.rawRequest()` for bulk reads.
- Back off until `X-RateLimit-Requests-Reset` when rate-limited.

## Security Best Practices
- Verify both `Linear-Signature` (using `crypto.timingSafeEqual`) and `webhookTimestamp` freshness on webhook endpoints.
- Prefer OAuth 2.0 with minimal scopes (`read`, `write`, `issues:create`) for multi-user apps instead of shared personal API keys.

## AI Pitfalls
- Sending `Authorization: Bearer lin_api_...` for a Personal API Key (Personal API keys do NOT use `Bearer`).
- Triggering N+1 GraphQL requests by resolving lazy SDK getters inside a `for` loop.
- Ignoring `webhookTimestamp` replay protection when validating `Linear-Signature`.

## Production Checklist
- [ ] `LINEAR_API_KEY` or OAuth tokens stored strictly server-side
- [ ] Webhook handler checks `Linear-Signature` over raw body + `webhookTimestamp` window
- [ ] Bulk queries use explicit GraphQL field selection and `first` limits
- [ ] Rate-limit complexity headers monitored

## References
- [Linear GraphQL Docs](https://linear.app/developers/graphql)
- [Linear Webhooks Guide](https://linear.app/developers/webhooks)

## Related skills
- [`github`](../github/SKILL.md) — integrates with
- [`notion`](../notion/SKILL.md) — works well with
- [`slack`](../slack/SKILL.md) — works well with

Files in this skill

  • SKILL.md2.8 KB
  • examples/quickstart.ts905 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.