Skip to main content
command

issue-to-linear-task — Claude Code command: what it does

Converts individual GitHub issues into Linear tasks while keeping comments, formatting, and issue links intact. Useful when migrating bug trackers or syncing items.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command sync/issue-to-linear-task
Open on GitHub

What issue-to-linear-task does

The command inspects a single GitHub issue and creates a corresponding item inside Linear. It maps metadata, extracts priority, and retains descriptions. Comments are imported with their author attribution, attachments remain linked, and cross-references connect both systems bidirectionally.

Execution relies on Read, Write, Edit, and Bash tools. Claude Code queries gh repo view to identify the active repository. For assigning teammates, it consults @user-mappings.json. Conversion parameters accept flags like --team, --project, --close-github, and --skip-comments.

Repository detection fails without an active gh CLI session.

What it helps with

  • export a GitHub issue into a Linear project
  • keep threaded comments and attachments during ticket migration
  • build bidirectional links between GitHub and Linear items
  • close the original GitHub issue automatically after importing

Example prompts for the agent

  • /issue-to-linear-task 42 --team ENG --close-github
  • /issue-to-linear-task 105 --project "Q3 Roadmap" --skip-comments
  • /issue-to-linear-task 12

How to install issue-to-linear-task

1claude-code-templates

npx claude-code-templates@latest --command sync/issue-to-linear-task

2Manually: put the files in place

.claude/commands/issue-to-linear-task.md

Call it with /issue-to-linear-task. For all projects use ~/.claude/commands/

Questions about issue-to-linear-task

How to install issue-to-linear-task in Claude Code?

Run npx claude-code-templates@latest --command sync/issue-to-linear-task in your project terminal. This places the command file at .claude/commands/issue-to-linear-task.md.

What does issue-to-linear-task do?

It converts a chosen GitHub issue into a Linear task. The command preserves formatting, links comments to original authors, and adds cross-references between platforms.

How does it map GitHub users to Linear accounts?

Put a @user-mappings.json file in your repository with username matches. The command reads it during transformation to assign the right teammates in Linear.

Source text

issue-to-linear-task.md · MIT
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: "[issue-number] | --team | --project | --close-github | --skip-comments"
description: Convert individual GitHub issues to Linear tasks with comprehensive data preservation
---

# Issue to Linear Task

Convert GitHub issues to Linear tasks with comprehensive field mapping: **$ARGUMENTS**

## Current Conversion Context

- Repository: !`gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null || echo "No repo context"`
- Issue details: Based on $ARGUMENTS issue number or selection criteria
- Linear teams: Available Linear teams and project assignments
- User mappings: @user-mappings.json or GitHub-Linear user correspondence

## Task

Execute precise conversion of individual GitHub issues to Linear tasks:

**Issue Target**: Use $ARGUMENTS to specify issue number, conversion options, team assignment, or processing preferences

**Conversion Framework**:
1. **Issue Analysis** - Fetch complete issue data, extract metadata, analyze content structure, infer priorities
2. **Data Transformation** - Map fields accurately, convert formats, preserve relationships, enhance descriptions
3. **Linear Integration** - Create task with proper formatting, assign team/project, set priorities, manage labels
4. **Content Migration** - Import comments with attribution, handle attachments, preserve formatting, maintain threading
5. **Reference Management** - Create bidirectional links, update sync database, maintain cross-references, enable navigation
6. **Validation & Confirmation** - Verify conversion accuracy, confirm field mappings, validate relationships, provide preview

**Advanced Features**: Smart priority inference, intelligent user mapping, attachment handling, comment threading, comprehensive validation.

**Data Fidelity**: Preserve original formatting, maintain all metadata, keep comment attribution, ensure relationship integrity.

**Output**: Successfully converted Linear task with complete data preservation, accurate field mappings, bidirectional references, and comprehensive conversion summary.

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Git and GitHub →

From the same set740

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor