| name | linear |
| description | Manage Linear issues: Create issues, update issues, search issues. Best when combined with GitHub CLI |
Linear Issue Management
Track your work, link PRs to issues, update issues as you progress.
Installation
npm install -g linearis
Setup
Check if authentication is configured:
cat ~/.linear_api_token 2>/dev/null || echo "No token file"
echo $LINEAR_API_TOKEN
If neither exists, guide the user:
- Create API key at https://linear.app/settings/account/security
- Save it (file is simplest):
echo "lin_api_..." > ~/.linear_api_token
Or add to shell profile: export LINEAR_API_TOKEN="lin_api_..."
Necessary Context
Before you use this skill for anything, run linearis usage to get an overview of all available commands. Note that linearis output is always JSON.
On first use, also fetch user context to enable filtering by assignee and team:
curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $LINEAR_API_TOKEN" \
-d '{"query": "{ viewer { id name teamMemberships { nodes { team { key name } } } } }"}' | jq
This gives you:
- User ID - for
--assignee filtering ("show MY issues")
- Teams - keys like
ENG, DEV for --team filtering
Also fetch available labels:
linearis labels list | jq '.labels[].name'
Keep this context for the session.
Link PR to Issue
Always link PRs to Linear issues: this creates traceability and auto-updates issue status when PRs merge.
Linear's GitHub integration handles this automatically when the issue ID appears in your branch name or PR title. Setup guide
Start With the Issue ID in Your Branch
When you begin work on an issue in a branch, make sure to bake the issue ID into your branch name:
linearis issues read ENG-123 | jq -r '.branchName'
git checkout -b $(linearis issues read ENG-123 | jq -r '.branchName')
Include the Issue ID When Creating PRs
Reinforce the link by including the issue ID in your PR:
gh pr create --title "Fix login timeout" --body "Description here...
Closes ENG-123"
Fallback: Link Retroactively via Comment
Already created a PR without the issue ID? Link it manually:
linearis comments create ENG-123 --body "PR: $(gh pr view --json url -q .url)"
My Issues
The daily driver. Show issues assigned to the user, filtered by status.
linearis issues search "" --assignee <user-id> --status "In Progress,Todo"
linearis issues search "" --assignee <user-id> --status "In Progress" --team ENG
Present results clearly: issue ID, title, status, team.
Create Issue
Quick capture of new work. The --team flag is required.
linearis issues create "Fix login timeout" --team ENG -a <user-id> -d "Users report session expires"
linearis issues create "Fix login timeout" --team ENG \
-d "Users report session expires too quickly" \
--labels "Bug" --priority 1
linearis issues create "Refactor auth module" --team ENG \
-d $'## Problem\n\nAuth code is tangled.\n\n## Proposal\n\nExtract to separate service.'
linearis issues create "Write auth tests" --team ENG --parent-ticket ENG-123
Before creating, search to check for duplicates, and broader context.
Track Progress
Keep issues in sync with your work. Read issues before writing: never lose information.
Check Current State
Before updating, understand what's there:
linearis issues read ENG-123
Summarize key information: title, status, assignee, description, recent comments, parent/child issues.
Update Status
Move issues through workflow stages:
linearis issues update ENG-123 --status "In Progress"
linearis issues update ENG-123 --status "In Review"
linearis issues update ENG-123 --status "Done"
Update Description (Checkboxes, Sections)
To update issues, update progress, checkboxes, assumptions, you must use a sequence of read → modify → write to ensure you don't lose information or details.
Use these three commands in sequence:
linearis issues read ENG-123
linear issues update ENG-123 --description "My new description..."
You can also add updates via commenting:
linearis comments create ENG-123 --body "This issue doesn't make any sense, sorry"
Use comments when:
- Reporting incremental progress
- Adding investigation notes
- Linking external resources (PRs, docs, logs)
Use description updates when:
- Checking off task checkboxes
- Updating acceptance criteria
- Correcting original assumptions
Combine updates to issue description and adding comments as you see fit.
Search
Search issues by title and description:
linearis issues search "login timeout" --team ENG | jq -r '.[] | "\(.identifier) [\(.state.name)] \(.title)"'
Fallback if keyword search returns nothing: List all team issues, then filter locally:
linearis issues search "" --team ENG > /tmp/issues.json
jq -r '.[] | "\(.identifier) [\(.state.name)] \(.title)"' /tmp/issues.json
linearis issues read ENG-123
Note: searching without --team searches ALL workspace teams.
List Projects
See active initiatives and their status.
linearis projects list
Projects can be used with --project when creating issues or filtering searches.
Rules
- Always check LINEAR_API_TOKEN before running commands
- Fetch workspace context on first Linear interaction (user ID, teams, labels)
- Use --assignee with user ID to filter "my" issues
- --team is required for creating issues
- Link PRs to issues - offer this when gh pr create succeeds
- Search before creating - avoid duplicate issues
- Present JSON output clearly - format as readable summaries, not raw JSON dumps