# Add Linear

Add Linear channel integration via Chat SDK.

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-linear -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-linear -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-linear -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-linear -g -a gemini-cli -y`

## Description

Add Linear channel integration via Chat SDK. Issue comment threads as conversations.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Add Linear Channel

Adds Linear support via the Chat SDK bridge. The agent participates in issue
comment threads. Every comment on a Linear issue triggers the agent, no
@-mention needed. NanoClaw doesn't ship channels in trunk, this skill copies the
Linear adapter in from the `channels` branch.

The mechanical steps under **Apply** carry `nc:` directive fences: an agent reads
the prose and applies them, and a parser can apply them deterministically from
the same document. Every directive is idempotent, so the whole skill is safe to
re-run; anything a parser can't apply falls back to the prose beside it.

## Prerequisites

**Recommended:** Create a Linear **OAuth application** so the agent posts as an app identity, not as you. This prevents the adapter from filtering your own comments as self-messages.

1. Go to [Linear Settings > API > OAuth Applications](https://linear.app/settings/api/applications/new)
2. Create an app (e.g. "NanoClaw Bot")
   - Developer URL: your repo URL (e.g. `https://github.com/your-org/nanoclaw`)
   - Callback URL: `http://localhost`
3. After creating, click the app and enable **Client credentials** under grant types
4. Copy the **Client ID** and **Client Secret**

**Alternative:** Use a Personal API Key (`LINEAR_API_KEY`) for simpler setup. The agent will post as you, and your own comments will be filtered (other team members' comments still work).

## Apply

Linear OAuth apps post and read comments under an app identity that can't be
@-mentioned; the adapter's declared channel defaults therefore respond to plain
comments rather than mention-only, and the wiring below sets that same pattern
mode explicitly.

### 1. Copy the adapter and its registration test

Fetch the `channels` branch and copy the Linear adapter and its registration
test into `src/channels/` (overwrite, the branch is canonical):

```nc:copy from-branch:channels
src/channels/linear.ts
src/channels/linear-registration.test.ts
```

### 2. Register the adapter

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-linear/SKILL.md
