Skip to main content
command

bulk-import-issues — Claude Code command: move GitHub issues to Linear

A slash command that migrates GitHub issues into Linear in batches, with filtering by label or milestone and retries when a batch fails.

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

What bulk-import-issues does

bulk-import-issues moves issues from GitHub into Linear at scale. You pass an import scope plus flags for state, label, milestone and batch size. Before anything else the command reads context: the repo name, how many issues exist, which Linear teams and projects can receive them, and how much GitHub rate limit is left.

The pipeline runs in stages. It discovers issues, spots duplicates, estimates the workload, picks a batch size that fits the rate limit, then maps fields, priorities and users. Import happens with retry logic and progress reporting, and a failed item can be picked up again without restarting everything. Afterwards the command writes cross-references, updates GitHub and saves a mapping file.

It leans on gh and jq, so an unauthenticated gh means no repo context and no rate-limit numbers. Allowed tools are Read, Write, Edit and Bash — writes to Linear go through terminal calls. User mapping is the part worth double-checking by hand after the run.

What it helps with

  • move a large GitHub backlog into Linear without scripting it yourself
  • import only issues carrying a given label or milestone
  • catch duplicates before they land in the new tracker
  • resume a half-finished import instead of starting over
  • keep a record of which GitHub issue became which Linear ticket

Example prompts for the agent

  • Import all open GitHub issues into Linear, start with the bug label
  • Migrate the v2.0 milestone in batches of 50
  • Show me how many issues would be imported and check for duplicates

How to install bulk-import-issues

1claude-code-templates

npx claude-code-templates@latest --command sync/bulk-import-issues

2Manually: put the files in place

.claude/commands/bulk-import-issues.md

Call it with /bulk-import-issues. For all projects use ~/.claude/commands/

Questions about bulk-import-issues

How do I install bulk-import-issues in Claude Code?

Run npx claude-code-templates@latest --command sync/bulk-import-issues; the file lands at .claude/commands/bulk-import-issues.md.

What does bulk-import-issues do?

It transfers GitHub issues to Linear: filters by state, label or milestone, splits the work into batches, respects rate limits and reports failures.

What arguments does the command take?

An import scope plus the flags --state, --label, --milestone and --batch-size.

Source text

bulk-import-issues.md · MIT
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: "[import-scope] | --state | --label | --milestone | --batch-size"
description: Bulk import GitHub issues to Linear with comprehensive progress tracking and error handling
---

# Bulk Import Issues

Bulk import GitHub issues to Linear with advanced processing capabilities: **$ARGUMENTS**

## Current Import Context

- Repository: !`gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null || echo "No repo context"`
- Issue count: !`gh api repos/{owner}/{repo}/issues?state=all --paginate | jq length 2>/dev/null || echo "Check manually"`
- Linear teams: Check available Linear teams and projects for import mapping
- Rate limits: !`gh api rate_limit -q '.rate | "GitHub: \(.remaining)/\(.limit)"' 2>/dev/null || echo "Check GitHub rate limit"`

## Task

Execute efficient bulk import of GitHub issues to Linear with comprehensive management:

**Import Scope**: Use $ARGUMENTS to filter by state, labels, milestones, or configure batch processing parameters

**Import Pipeline**:
1. **Pre-Import Analysis** - Issue discovery, duplicate detection, import estimation, resource planning
2. **Batch Configuration** - Dynamic batch sizing, rate limit management, progress tracking, error handling
3. **Data Transformation** - Field mapping, priority inference, user mapping, content enhancement
4. **Import Execution** - Parallel processing, retry logic, transaction management, progress reporting
5. **Error Recovery** - Failed item handling, retry mechanisms, partial import recovery, validation
6. **Post-Import Actions** - Cross-reference creation, GitHub updates, mapping files, notifications

**Advanced Features**: Dynamic batch adjustment, intelligent rate limiting, duplicate detection, comprehensive error recovery, progress visualization.

**Quality Assurance**: Pre-import validation, post-import verification, data integrity checks, comprehensive audit trails.

**Output**: Complete import results with success metrics, failed item reports, mapping documentation, and performance analytics for large-scale issue migration.

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

Similar slash commands

All slash commands for Git and GitHub →

From the same set361

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