linear-integration

A set of examples for connecting software to Linear, a project-management service where teams track issues and work. It covers signing in, receiving event notifications, managing issues, changing their states, attaching files, and adding comments.

In plain words
What is it for?
It is for creating integrations that read, create, update, or delete Linear issues, respond to webhooks, move issues through workflows, and handle attachments or comments.
Why use it?
It reduces the work needed to build and maintain common Linear API connections.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/madappgang/claude-code/linear-integration
Any agent
npx skills add MadAppGang/claude-code --skill linear-integration
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,553 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.01553
Opus 5 $0.00016 $0.00776
Sonnet 5 $0.00006 $0.00311
Haiku 4.5 $0.00003 $0.00155

Measured 3d ago against content hash 538d6e76b4db, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

linear-integration scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(req: Request): Promise<Response> {
plugins/autopilot/skills/linear-integration/SKILL.md · 279 lines

How it starts

The opening of the file, as written. The whole thing — 279 lines — stays where its author put it; the contents beside it link to each section on GitHub.

plugin: autopilot updated: 2026-01-20

Linear Integration

Version: 0.1.0 Purpose: Patterns for Linear API integration in autopilot workflows Status: Phase 1

When to Use

Use this skill when you need to:

  • Authenticate with Linear API
  • Set up webhook handlers for Linear events
  • Create, read, update, or delete Linear issues
  • Transition issue states in Linear workflows
  • Attach files to Linear issues
  • Add comments to Linear issues

Overview

This skill provides patterns for:

  • Linear API authentication
  • Webhook handler setup
  • Issue CRUD operations
  • State transitions
  • File attachments
  • Comment handling

Core Patterns

Pattern 1: Authentication

Personal API Key (MVP):

import { LinearClient } from '@linear/sdk';

const linear = new LinearClient({
  apiKey: process.env.LINEAR_API_KEY
});

Verification:

async function verifyConnection(): Promise<boolean> {
  try {
    const me = await linear.viewer;
    console.log(`Connected as: ${me.name}`);
    return true;
  } catch (error) {
    console.error('Linear connection failed:', error);
    return false;
  }
}

Pattern 2: Webhook Handler

Bun HTTP Server:

import { serve } from 'bun';
import { createHmac } from 'crypto';

interface LinearWebhookPayload {
  action: 'created' | 'updated' | 'deleted';
  type: 'Issue' | 'Comment' | 'Label';
  data: {
    id: string;
    title?: string;
    description?: string;
    state: { id: string; name: string };
    labels: Array<{ id: string; name: string }>;
  };
}

serve({
  port: process.env.AUTOPILOT_WEBHOOK_PORT || 3001,

  async fetch(req: Request): Promise<Response> {
    if (req.method !== 'POST') {
      return new Response('Method not allowed', { status: 405 });
    }

    // Verify signature
    const signature = req.headers.get('Linear-Signature');
    const body = await req.text();

    if (!verifySignature(body, signature)) {
      return new Response('Unauthorized', { status: 401 });
    }

    const payload: LinearWebhookPayload = JSON.parse(body);

    // Route to handler
    await routeWebhook(payload);

    return new Response('OK', { status: 200 });
  }
});

function verifySignature(body: string, signature: string | null): boolean {
  if (!signature) return false;

  const hmac = createHmac('sha256', process.env.LINEAR_WEBHOOK_SECRET!);
  const expectedSignature = hmac.update(body).digest('hex');

  return signature === expectedSignature;
}

Read the full file on GitHub · 279 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 279 lines · 32 tokens per session scan A 538d6e76b4db

Subscribe to this mod's changes

linear-integration is a skill published in the GitHub repository MadAppGang/claude-code (279 stars, last pushed 5mo ago), licensed MIT. It adds 32 tokens to every session and 1,553 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.