Start a new task with Linear issue tracking and proper branch management.
Starts a new Linear task with issue tracking and Git branch management.
/plugin marketplace add wuyuxiangX/yux-claude-hub/plugin install yux-linear-workflow@yux-claude-hubStart a new task with Linear issue tracking and proper branch management.
Usage: /yux-linear-start [task description]
Task description from: $ARGUMENTS
If no description is provided, ask the user what they want to work on.
Before starting, verify:
Linear MCP availability:
GitHub CLI (gh):
gh auth status
gh auth login first"Git repository:
git rev-parse --is-inside-work-tree
This step is REQUIRED before proceeding. If Linear is not available, the workflow MUST stop.
Test Linear MCP connection:
mcp__linear__list_teams()
If the call fails or returns empty:
English:
❌ Linear Connection Failed
Cannot connect to Linear. Please check:
1. Linear MCP server is configured
2. OAuth authorization is valid
Run /linear-tools:setup to configure Linear.
Chinese:
❌ Linear 连接失败
无法连接到 Linear,请检查:
1. Linear MCP 是否已配置
2. OAuth 授权是否有效
运行 /linear-tools:setup 进行配置
Only if connection succeeds: Proceed to Step 1
Analyze user input to determine preferred language:
zhjakoenStore as USER_LANG for all subsequent messages.
This step is critical for Linear API calls.
Check for cached config in .claude/linear-config.json:
{
"team_id": "cfef1fd0-...",
"team_name": "Wyx",
"project_id": "optional-project-id"
}
If no config exists, discover automatically:
mcp__linear__list_teams()
Team selection logic:
Found multiple Linear teams:
1. Wyx (cfef1fd0-...)
2. Engineering (abc123...)
Which team should we use?
Optionally discover projects in the team:
mcp__linear__list_projects(team: "<team-id>")
MUST save config to .claude/linear-config.json:
mkdir -p .claude
{
"team_id": "cfef1fd0-...",
"team_name": "Wyx",
"project_id": "abc123...",
"project_name": "subloom-api",
"created_at": "2024-01-15T10:30:00Z"
}
.claude/ directory if not existsproject_id and project_name are optional but recommendedStore as LINEAR_TEAM and LINEAR_PROJECT for subsequent calls.
Present options to user (in detected language):
English:
How would you like to proceed?
1. Search existing Linear issues
2. Create a new issue
Enter your choice:
Chinese:
请选择操作方式:
1. 搜索现有 Linear Issue
2. 创建新 Issue
请输入选择:
If user chooses to search:
mcp__linear__list_issues(
team: "<LINEAR_TEAM>",
query: "<search terms>"
)
Found issues:
1. [LIN-123] User authentication flow
2. [LIN-124] Fix login button styling
3. [LIN-125] Add password reset feature
Enter issue number to select, or 'n' for new issue:
mcp__linear__get_issue(id: "<issue-uuid>")
ISSUE_ID: e.g., "LIN-123"ISSUE_UUID: The full UUIDISSUE_TITLE: The issue titleLINEAR_URL: The Linear issue URLIf user chooses to create:
Collect issue details:
Create issue via Linear MCP (use team from Step 2):
mcp__linear__create_issue(
title: "<title>",
description: "<description>",
team: "<LINEAR_TEAM>",
project: "<LINEAR_PROJECT>", // optional
priority: <priority_number>
)
Get the created issue ID (e.g., LIN-456)
MANDATORY: Verify issue creation succeeded:
mcp__linear__get_issue(id: "<issue-uuid>")
❌ Issue creation failed
The issue was not created in Linear. Please try again.
Store issue details for later use:
ISSUE_ID: e.g., "LIN-456"ISSUE_UUID: The full UUID returned by LinearISSUE_TITLE: The issue titleLINEAR_URL: The Linear issue URLDetermine branch type based on task:
feat/ - New featuresfix/ - Bug fixesdocs/ - Documentationrefactor/ - Code refactoringtest/ - Test additionschore/ - Maintenance tasksGenerate branch name:
<type>/LIN-<issue-id>-<short-description>feat/LIN-456-user-loginCreate and checkout branch:
git checkout -b <branch-name>
Push branch to remote:
git push -u origin <branch-name>
Update the issue status to "In Progress":
mcp__linear__update_issue(
id: "<issue-uuid>",
state: "In Progress"
)
Add a comment to track the start:
mcp__linear__create_comment(
issueId: "<issue-uuid>",
body: "Started working on this issue.\nBranch: `<branch-name>`"
)
MANDATORY: Save local state file:
Create the directory if needed:
mkdir -p .claude/linear-tasks
Write state to .claude/linear-tasks/<ISSUE_ID>.json:
{
"issue_id": "LIN-456",
"issue_uuid": "cfef1fd0-...",
"issue_title": "User login implementation",
"branch_name": "feat/LIN-456-user-login",
"status": "in_progress",
"linear_url": "https://linear.app/team/issue/LIN-456",
"started_at": "2026-01-09T10:30:00Z",
"verified": true
}
Note: This file will be tracked by git and persists across sessions.
Display completion message with verification status (in user's language):
English:
=== Task Started ===
✓ Linear issue verified: LIN-456
✓ Status updated: In Progress
✓ Local state saved: .claude/linear-tasks/LIN-456.json
Issue: LIN-456 - User login implementation
Status: In Progress
Branch: feat/LIN-456-user-login
URL: https://linear.app/team/issue/LIN-456
You can now start coding!
---
📋 Next Steps:
\`\`\`
/yux-linear-status
\`\`\`
Check current workflow status
\`\`\`
/yux-linear-pr
\`\`\`
Create a Pull Request when ready
Chinese:
=== 任务已启动 ===
✓ Linear issue 已验证: LIN-456
✓ 状态已更新: In Progress
✓ 本地状态已保存: .claude/linear-tasks/LIN-456.json
Issue: LIN-456 - 用户登录实现
状态: In Progress
分支: feat/LIN-456-user-login
URL: https://linear.app/team/issue/LIN-456
现在可以开始编码了!
---
📋 下一步 / Next Steps:
\`\`\`
/yux-linear-status
\`\`\`
查看当前工作流状态
\`\`\`
/yux-linear-pr
\`\`\`
准备好后创建 Pull Request
/mcp setupUser: /yux-linear-start implement user authentication
Claude: Starting Linear workflow...
How would you like to proceed?
1. Search existing Linear issues
2. Create a new issue
User: 2
Claude: Creating new issue...
Please provide a brief description (or press Enter to use default):
"Implement user authentication with JWT tokens"
User: Implement login/logout with session management
Claude: Creating issue...
✓ Issue created: LIN-456 - Implement user authentication
Select branch type:
1. feat (new feature)
2. fix (bug fix)
3. refactor (code refactoring)
User: 1
Claude: Creating branch...
✓ Branch created: feat/LIN-456-user-auth
✓ Linear status updated: In Progress
=== Task Started ===
Issue: LIN-456 - Implement user authentication
Status: In Progress
Branch: feat/LIN-456-user-auth
You can now start coding!