Managing Linear issues, projects, and teams. Use when working with Linear tasks, creating issues, updating status, querying projects, or managing team workflows.
Tools and workflows for managing issues, projects, and teams in Linear.
⚠️ Tool Availability (READ FIRST)
This skill supports multiple tool backends. Use whichever is available:
MCP Tools (mcp__linear) - Use if available in your tool set
Linear CLI (linear command) - Always available via Bash
Helper Scripts - For complex operations
If MCP tools are NOT available, use the Linear CLI via Bash:
# View an issue
linear issues view ENG-123
# Create an issue
linear issues create --title "Issue title" --description "Description"
# Update issue status (get state IDs first)
linear issues update ENG-123 -s "STATE_ID"
# Add a comment
linear issues comment add ENG-123 -m "Comment text"
# List issues
linear issues list
Do NOT report "MCP tools not available" as a blocker - use CLI instead.
🔐 Security: Varlock Integration
CRITICAL: Never expose API keys in terminal output or Claude's context.
Safe Commands (Always Use)
# Validate LINEAR_API_KEY is set (masked output)
varlock load 2>&1 | grep LINEAR
# Run commands with secrets injected
varlock run -- npm run query -- "query { viewer { name } }"
# Check schema (safe - no values)
cat .env.schema | grep LINEAR
Unsafe Commands (NEVER Use)
# ❌ NEVER - exposes key to Claude's context
linear config show
echo $LINEAR_API_KEY
printenv | grep LINEAR
cat .env
Go to Settings (gear icon) -> Security & access -> Personal API keys
Click Create key and copy the key (starts with lin_api_)
Add to your environment:
# Option A: Add to shell profile (~/.zshrc or ~/.bashrc)
export LINEAR_API_KEY="lin_api_your_key_here"
# Option B: Add to Claude Code environment
echo 'LINEAR_API_KEY=lin_api_your_key_here' >> ~/.claude/.env
# Then reload your shell or restart Claude Code
3. Test Connection
Verify everything works:
npm run query -- "query { viewer { name } }"
You should see your name from Linear.
4. Common Operations
# Create issue in a project
npm run ops -- create-issue "Project" "Add rate limiting to auth endpoints" "Auth endpoints have no rate limiting, allowing brute-force attacks. Add configurable limits per endpoint with 429 responses when exceeded."
# Update issue status
npm run ops -- status Done ENG-123 ENG-124
# Create sub-issue
npm run ops -- create-sub-issue ENG-100 "Sub-task" "Details"
# Update project status
npm run ops -- project-status "Phase 1" completed
# Show all commands
npm run ops -- help
When creating a Linear issue, always complete these three steps — even if the user doesn't mention them.
Detailed description. Include what the change is, why it's needed, and acceptance criteria or scope. If the user provides only a title, infer and write the description yourself.
Scope labels if relevant (blocked, breaking-change, tech-debt)
Project assignment. Assign to the appropriate project based on context (active sprint, feature area, or user instruction). If no project is obvious, ask the user. In batch/subagent context, use the project associated with the parent issue or the default initiative project.
When updating an existing issue, preserve existing labels and project — only add missing labels or correct misassigned ones.
MCP tools too. If using save_issue or other MCP tools instead of the CLI, these rules still apply. Populate the description, labels, and project fields in the API call.
Project Planning Workflow
See Issue Creation Checklist — descriptions, labels, and project assignment are required for every issue.
Create Issues in the Correct Project from the Start
Best Practice: When planning a new phase or initiative, create the project and its issues together in a single planning session. Avoid creating issues in a catch-all project and moving them later.
Recommended Workflow
Create the project first:
npm run ops -- create-project "Phase X: Feature Name" "My Initiative"
Set project state to Planned:
npm run ops -- project-status "Phase X: Feature Name" planned
Create issues directly in the project:
npm run ops -- create-issue "Phase X: Feature Name" "Parent task" "Implement the core feature with integration tests and documentation. Acceptance: all API endpoints return correct responses, test coverage >80%." --labels feature,backend
npm run ops -- create-sub-issue ENG-XXX "Sub-task 1" "Set up database schema and migrations for the new feature tables."
npm run ops -- create-sub-issue ENG-XXX "Sub-task 2" "Add API endpoint handlers with input validation and error responses."
Update project state when work begins:
npm run ops -- project-status "Phase X: Feature Name" in-progress
Why This Matters
Traceability: Issues are linked to their project from creation
Metrics: Project progress tracking is accurate from day one
Workflow: No time wasted moving issues between projects
Organization: Linear views and filters work correctly
Anti-Pattern to Avoid
❌ Creating issues in a "holding" project and moving them later:
# Don't do this
create-issue "Phase 6A" "New feature" # Wrong project
# Later: manually move to Phase X # Extra work
Project Management Commands
project-status
Update a project's state in Linear. Accepts user-friendly terminology that maps to Linear's API.
npm run ops -- project-status <project-name> <state>
Valid States:
Input
Description
API Value
backlog
Not yet started
backlog
planned
Scheduled for future
planned
in-progress
Currently active
started
paused
Temporarily on hold
paused
completed
Successfully finished
completed
canceled
Will not be done
canceled
Examples:
# Start working on a project
npm run ops -- project-status "Phase 8: MCP Decision Engine" in-progress
# Mark project complete
npm run ops -- project-status "Phase 8" completed
# Partial name matching works
npm run ops -- project-status "Phase 8" paused
link-initiative
Link an existing project to an initiative.
npm run ops -- link-initiative <project-name> <initiative-name>
Examples:
# Link a project to an initiative
npm run ops -- link-initiative "Phase 8: MCP Decision Engine" "Q1 Goals"
# Partial matching works
npm run ops -- link-initiative "Phase 8" "Q1 Goals"
unlink-initiative
Remove a project from an initiative.
npm run ops -- unlink-initiative <project-name> <initiative-name>
Examples:
# Remove incorrect link
npm run ops -- unlink-initiative "Phase 8" "Linear Skill"
# Clean up test links
npm run ops -- unlink-initiative "Test Project" "Q1 Goals"
Error Handling:
Returns error if project is not linked to the specified initiative
Returns error if project or initiative not found
Complete Project Lifecycle Example
# 1. Create project linked to initiative
npm run ops -- create-project "Phase 11: New Feature" "Q1 Goals"
# 2. Set state to planned
npm run ops -- project-status "Phase 11" planned
# 3. Create issues in the project
npm run ops -- create-issue "Phase 11" "Parent task" "Description"
npm run ops -- create-sub-issue ENG-XXX "Sub-task 1" "Details"
# 4. Start work - update to in-progress
npm run ops -- project-status "Phase 11" in-progress
# 5. Mark issues done
npm run ops -- status Done ENG-XXX ENG-YYY
# 6. Complete project
npm run ops -- project-status "Phase 11" completed
# 7. (Optional) Link to additional initiative
npm run ops -- link-initiative "Phase 11" "Q2 Goals"
Tool Selection
Choose the right tool for the task:
Tool
When to Use
MCP (Official Server)
Most operations - PREFERRED
Helper Scripts
Bulk operations, when MCP unavailable
SDK scripts
Complex operations (loops, conditionals)
GraphQL API
Operations not supported by MCP/SDK
MCP Server Configuration
Use the official Linear MCP server at mcp.linear.app:
WARNING: Do NOT use deprecated community servers. See troubleshooting.md for details.
MCP Reliability (Official Server)
Operation
Reliability
Notes
Create issue
✅ High
Full support
Update status
✅ High
Use state: "Done" directly
List/Search issues
✅ High
Supports filters, queries
Add comment
✅ High
Works with issue IDs
Quick Status Update
# Via MCP - use human-readable state names
update_issue with id="issue-uuid", state="Done"
# Via helper script (bulk operations)
node scripts/linear-helpers.mjs update-status Done 123 124 125
Step 1: Extract the image from conversation context
Images shared inline in Claude Code are not saved to disk automatically — they live as base64 in the session JSONL. Use the extraction script:
# Find the current session JSONL
ls -t ~/.claude/projects/<project-path>/*.jsonl | head -1
# Extract all inline images (saves to /tmp by default)
npx tsx scripts/extract-image.ts <path-to-session.jsonl>
# Or specify a custom output directory
npx tsx scripts/extract-image.ts <path-to-session.jsonl> ~/Desktop
This saves images to /tmp/shared-image-0.png, /tmp/shared-image-1.png, etc.
Always verify the extracted image with the Read tool before uploading.
# Validate labels
npm run ops -- labels validate "feature,security"
# Suggest labels for issue
npm run ops -- labels suggest "Fix XSS vulnerability"
SDK Automation Scripts
Use only when MCP tools are insufficient. For complex operations involving loops, mapping, or bulk updates, write TypeScript scripts using @linear/sdk. See sdk.md for:
Complete script patterns and templates
Common automation examples (bulk updates, filtering, reporting)
Tool selection criteria
Scripts provide full type hints and are easier to debug than raw GraphQL for multi-step operations.
GraphQL API
Fallback only. Use when operations aren't supported by MCP or SDK.
For advanced project and initiative management patterns, see projects.md.
Quick reference - common project commands:
# Create project linked to initiative
npm run ops -- create-project "Phase X: Name" "My Initiative"
# Update project status
npm run ops -- project-status "Phase X" in-progress
npm run ops -- project-status "Phase X" completed
# Link/unlink projects to initiatives
npm run ops -- link-initiative "Phase X" "My Initiative"
npm run ops -- unlink-initiative "Phase X" "Old Initiative"
Key topics in projects.md:
Project creation checklist (mandatory steps)
Content vs Description fields
Discovery before creation
Codebase verification before work
Sub-issue management
Project status updates
Project updates (status reports)
Sync Patterns (Bulk Operations)
For bulk synchronization of code changes to Linear, see sync.md.
Quick sync commands:
# Bulk update issues to Done
npm run ops -- status Done ENG-101 ENG-102 ENG-103
# Update project status
npm run ops -- project-status "My Project" completed