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.
npx claude-code-templates@latest --command sync/issue-to-linear-taskWhat 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-task2Manually: put the files in place
.claude/commands/issue-to-linear-task.mdCall it with /issue-to-linear-task. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/issue-to-linear-task.mdCall it with /prompts:issue-to-linear-task. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/issue-to-linear-task.prompt.mdManually: put the files in place
.gemini/commands/issue-to-linear-task.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
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