linear-task-to-issue — Claude Code command
A slash command that turns a Linear task into a GitHub issue, carrying over fields, links, attachments and comments. Useful when planning lives in Linear and code lives in GitHub.
npx claude-code-templates@latest --command sync/linear-task-to-issueWhat linear-task-to-issue does
Point the command at a Linear task and it builds the matching issue in your current repository. It pulls the task data first, then assembles the issue body, maps Linear fields onto GitHub ones, and sets labels, assignees and milestone. Parent-child links, team context and project associations come along too.
Attachments are downloaded from Linear and uploaded to GitHub, with references in the text rewritten. Comments arrive with their authors and original dates, and user mentions are translated through a mapping of Linear emails to GitHub usernames. At the end the command writes cross-references on both sides and records the result in a sync database.
It drives gh, so an authenticated GitHub CLI is a prerequisite — otherwise the repository lookup fails. Attachment migration also needs working access to the Linear files; when those links are locked down, pass --skip-attachments and leave that step out. Arguments pick the target: [task-id], --repo, --milestone, --close-linear, --skip-attachments.
What it helps with
- move a Linear task into GitHub without retyping every field
- keep parent and child task links intact during the move
- carry attachments over and fix the references to them
- import comments with authors and timestamps
- set up cross-references between Linear and GitHub
Example prompts for the agent
- Convert LIN-482 into an issue in this repo
- Move LIN-482 to GitHub with milestone v2.1
- Convert LIN-482 and close the original task in Linear
How to install linear-task-to-issue
1claude-code-templates
npx claude-code-templates@latest --command sync/linear-task-to-issue2Manually: put the files in place
.claude/commands/linear-task-to-issue.mdCall it with /linear-task-to-issue. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/linear-task-to-issue.mdCall it with /prompts:linear-task-to-issue. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/linear-task-to-issue.prompt.mdManually: put the files in place
.gemini/commands/linear-task-to-issue.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about linear-task-to-issue
How do I install linear-task-to-issue in Claude Code?
Run npx claude-code-templates@latest --command sync/linear-task-to-issue. The command file lands at .claude/commands/linear-task-to-issue.md.
What does linear-task-to-issue do?
It creates a GitHub issue from a Linear task, copying fields, labels, assignees, milestone, attachments, comments and task relationships.
What does the command need to run?
An authenticated gh CLI and access to the Linear task. Use --skip-attachments to leave out the attachment step when the files are not reachable.
Source text
linear-task-to-issue.md · MIT
--- allowed-tools: Read, Write, Edit, Bash argument-hint: "[task-id] | --repo | --milestone | --close-linear | --skip-attachments" description: Convert Linear tasks to GitHub issues with relationship preservation and metadata mapping --- # Linear Task to Issue Convert Linear tasks to GitHub issues with comprehensive relationship mapping: **$ARGUMENTS** ## Current Task Context - Task details: Based on $ARGUMENTS task identifier or selection criteria - Target repository: !`gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null || echo "No repo context"` - User mappings: Linear email to GitHub username correspondence - Attachment handling: Linear attachment access and GitHub upload capabilities ## Task Execute precise conversion of Linear tasks to GitHub issues: **Task Target**: Use $ARGUMENTS to specify task identifier, target repository, milestone mapping, or processing preferences **Conversion Framework**: 1. **Task Analysis** - Fetch complete Linear task data, extract relationships, analyze content structure, identify priorities 2. **Content Transformation** - Build GitHub issue body, map Linear fields, preserve formatting, handle rich content 3. **GitHub Integration** - Create issue with proper structure, apply labels, assign users, set milestones, manage relationships 4. **Attachment Migration** - Download Linear attachments, upload to GitHub, update references, maintain accessibility 5. **Comment Import** - Transfer comments with attribution, preserve timestamps, maintain context, handle mentions 6. **Cross-Reference Setup** - Create bidirectional links, update Linear task, maintain sync database, enable navigation **Advanced Features**: Rich content conversion, attachment handling, relationship mapping, user mention translation, comprehensive validation. **Relationship Management**: Preserve parent-child relationships, maintain team context, map project associations, handle dependencies. **Output**: Successfully created GitHub issue with complete data migration, accurate field mappings, preserved relationships, and comprehensive conversion report.
© davila7 · MIT · davila7/claude-code-templates