Skip to main content
command

sync-linear-to-issues — Claude Code command: install and use

Transfers Linear tasks to GitHub issues with state mapping, attachment migration, and comment sync. Useful when consolidating project tracking into GitHub.

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

What sync-linear-to-issues does

The command queries Linear tasks and maps them to GitHub issues with their metadata. The workflow has six distinct steps. It handles discovery, state conversion, body creation, GitHub issue creation, asset migration, and comment transfers. You can filter the tasks with --team, --project, --priority, and --states.

Execution relies on Read, Write, Edit, and Bash tools. Claude Code determines the target repository by running gh repo view. If the GitHub CLI tool is unauthenticated or missing repository context, synchronization will immediately fail.

User assignments map Linear emails to GitHub usernames. Comments retain their threading and attribution. Attachments are downloaded from Linear, uploaded to GitHub, and rewritten directly within the issue text.

What it helps with

  • migrate Linear tasks to GitHub issues with accurate markdown formatting
  • map Linear workflow states and priority levels to GitHub labels
  • download Linear attachments and re-upload them to GitHub issue bodies
  • transfer threaded comments while preserving user attribution and mentions

Example prompts for the agent

  • /sync-linear-to-issues --team "Core" --states "In Progress"
  • /sync-linear-to-issues --project "API v2" --priority Urgent
  • Migrate tasks for the platform team using /sync-linear-to-issues --team "Platform"

How to install sync-linear-to-issues

1claude-code-templates

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

2Manually: put the files in place

.claude/commands/sync-linear-to-issues.md

Call it with /sync-linear-to-issues. For all projects use ~/.claude/commands/

Questions about sync-linear-to-issues

How to install sync-linear-to-issues in Claude Code?

Run npx claude-code-templates@latest --command sync/sync-linear-to-issues in your terminal or place the template in .claude/commands/sync-linear-to-issues.md.

What does sync-linear-to-issues do?

It extracts Linear tasks matching specified filters and recreates them as GitHub issues, complete with labels, milestones, attachments, and threaded discussions.

What dependencies does this command require?

It needs the gh command-line tool with repository access, alongside permissions for Read, Write, Edit, and Bash tools.

Source text

sync-linear-to-issues.md · MIT
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: "[sync-scope] | --team | --project | --priority | --states"
description: Sync Linear tasks to GitHub issues with state mapping and attachment handling
---

# Sync Linear to Issues

Sync Linear tasks to GitHub issues with comprehensive state and field mapping: **$ARGUMENTS**

## Current Linear Context

- Linear teams: Available teams and project assignments
- Task count: Linear task query to determine scope
- Target repository: !`gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null || echo "No repo context"`
- User mappings: Linear email to GitHub username correspondence

## Task

Execute comprehensive synchronization of Linear tasks to GitHub issues:

**Sync Scope**: Use $ARGUMENTS to filter by Linear team, project, priority levels, or task states

**Synchronization Framework**:
1. **Task Discovery** - Query Linear tasks with filters, extract metadata, validate requirements, prioritize sync
2. **State Mapping** - Transform Linear states to GitHub equivalents, handle priority conversion, map project assignments
3. **Content Transformation** - Build GitHub issue body, preserve formatting, handle attachments, maintain structure
4. **GitHub Integration** - Create issues with proper labels, assign users, set milestones, manage relationships
5. **Attachment Migration** - Download Linear attachments, upload to GitHub, update references, maintain accessibility
6. **Comment Synchronization** - Transfer comments with attribution, preserve context, handle mentions, maintain threading

**Advanced Features**: Intelligent state mapping, attachment handling, comment threading, user mention translation, comprehensive validation.

**Data Fidelity**: Preserve Linear formatting, maintain task relationships, keep timestamps, ensure reference integrity.

**Output**: Complete synchronization results with created issues, attachment migrations, comment transfers, and comprehensive sync reporting.

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

Similar slash commands

All slash commands for Notes, tasks and projects →

From the same set804

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