# Linear

> Linear API — issues, projects, and workflow management Use when this capability is needed.

- Skill: `tomevault-io/linear-4` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/linear-4`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/linear-4/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/linear-4

---

# Linear

Interact with Linear using their GraphQL API.

## Setup

1. **Check existing credentials:**
   ```
   vault_get linear_api_key
   ```

2. **If not configured:**
   - Go to https://linear.app/settings/api
   - Create a Personal API Key
   - Save to vault:
     ```
     vault_save linear_api_key "lin_api_xxx"
     ```
   The key is auto-injected as `$LINEAR_API_KEY`.

## GraphQL Endpoint

```bash
LINEAR_API="https://api.linear.app/graphql"
AUTH_HEADER="Authorization: Bearer $LINEAR_API_KEY"
```

## List Issues

```bash
# Get my issues
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ issues(filter: { assignee: { isMe: { eq: true } } }) { nodes { id identifier title priority state { name } } } }"}' | jq '.data.issues.nodes'

# Get issues by team
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ issues(filter: { team: { key: { eq: \"ENG\" } } }) { nodes { id identifier title state { name } } } }"}' | jq '.data.issues.nodes'

# Search issues
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ issues(filter: { search: { eq: \"bug\" } }) { nodes { identifier title } } }"}' | jq '.data.issues.nodes'
```

## Create Issue

```bash
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation { issueCreate(input: { title: \"New bug report\", description: \"Description here\", teamId: \"TEAM_ID\", priority: 2 }) { success issue { id identifier } } }"
  }' | jq '.data.issueCreate'
```

## Update Issue

```bash
# Update status
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation { issueUpdate(id: \"ISSUE_ID\", input: { stateId: \"STATE_ID\" }) { success } }"
  }'

# Add comment
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation { commentCreate(input: { issueId: \"ISSUE_ID\", body: \"Progress update\" }) { success } }"
  }'
```

## Get Teams & Projects

```bash
# List teams
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ teams { nodes { id key name } } }"}' | jq '.data.teams.nodes'

# List projects
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ projects { nodes { id name status { name } } } }"}' | jq '.data.projects.nodes'

# Get workflow states
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ team(key: \"ENG\") { states { nodes { id name type } } } }"}' | jq '.data.team.states.nodes'
```

## Get Viewer Info

```bash
curl -s -X POST "$LINEAR_API" \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ viewer { id name email } }"}' | jq '.data.viewer'
```

## Tips

- Priority: 0=No priority, 1=Urgent, 2=High, 3=Normal, 4=Low
- Use `identifier` (e.g., "ENG-123") for human-readable IDs
- GraphQL allows fetching exactly the fields you need
- Use `filter` for complex queries

## Triggers

linear, linear issue, create linear issue, linear ticket, linear api

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/jholhewres) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

