name: start-work description: Start work on a Feature/Bug/Chore issue by creating a git worktree. Use when user wants to work on something, implement a feature, start development, or confirms work on a Linear issue. Uses Linear's auto-generated branch name and git worktree for worktree creation. Do NOT load for: Thinking issues, code review, deployment. allowed-tools: ["Bash", "Read", "Write", "mcp__plugin_linear_linear__*", "AskUserQuestion", "Skill"] user-invocable: true
Start Work Skill
Create a git worktree for isolated development and switch to it.
Type Label Check (CRITICAL)
This skill is ONLY for issues with these Type Labels:
| Type Label | Worktree | This Skill |
|---|---|---|
| Feature | Required | ✓ Use |
| Bug | Required | ✓ Use |
| Chore | Required | ✓ Use |
| Thinking | Not needed | ✗ Skip |
Check Type Label FIRST before proceeding.
If the issue is labeled "Thinking" → Inform user: no worktree needed for thinking/design work.
Configuration
Team Selection: Query available teams dynamically using mcp__plugin_linear_linear__list_teams. If only one team exists, use it automatically.
Prerequisites
- Current directory is a git repository
- git 2.15+ (git worktree support)
- Linear MCP tools are available
Critical Rules
- NEVER create branch names locally - always use Linear's auto-generated name
- NEVER work on main branch - always create a worktree first
- Check Type Label - Only Feature/Bug/Chore need worktrees
- Branch name format:
{type}/dev-{issue-number}-<title-slug>
Workflow
Step 1: Pre-check Branch
Check current branch:
git branch --show-current
If on main/master: proceed to Step 2 If on feature branch: ask user intent using AskUserQuestion:
- Continue in current worktree?
- Create a new worktree for a different issue?
Step 2: Issue Resolution
First, determine team: mcp__plugin_linear_linear__list_teams
Option A: Search existing issues
Use mcp__plugin_linear_linear__list_issues:
{
"team": "<selected-team>",
"assignee": "me"
}
Or search by query:
{
"team": "<selected-team>",
"query": "<user's task description>"
}
Note: No state filter - search across all states (Todo, In Progress, etc.)
Option B: Multiple matches
Present candidates to user with AskUserQuestion. Show issue title and Type Label to help selection.
Option C: No matching issue found
Invoke the linear-issue skill:
Use Skill tool with skill: "linear-issue"
Step 3: Validate Type Label
Check the issue's Type Label:
- Feature / Bug / Chore → Proceed to Step 4
- Thinking → Stop. Inform user: "This is a Thinking issue. No worktree needed for design/research work."
Step 4: Get Branch Name
Use mcp__plugin_linear_linear__get_issue with the selected issue ID.
Extract the branchName field (auto-generated by Linear).
Step 5: Create Worktree
Create worktree and calculate the path.
5.1 Environment Variable Check
Check if WORKTREE_BASE is set. If not, use default:
if [ -z "$WORKTREE_BASE" ]; then
WORKTREE_BASE="$HOME/repos/github.com"
fi
Verify base directory exists:
if [ ! -d "$WORKTREE_BASE" ]; then
mkdir -p "$WORKTREE_BASE"
fi
5.2 Get Repository Info
git remote get-url origin
Extract owner/repo from the result:
- SSH format:
git@github.com:owner/repo.git→owner/repo - HTTPS format:
https://github.com/owner/repo.git→owner/repo
5.3 Build Worktree Path
| Element | Description |
|---|---|
| Base | $WORKTREE_BASE (default: ~/repos/github.com) |
| owner/repo | Extracted from remote URL |
| Separator | = |
| Branch name | Sanitized: / → - |
Example: Branch feature/dev-123-foo → Path $WORKTREE_BASE/owner/repo=feature-dev-123-foo
5.4 Create Worktree
For new branch:
git worktree add -b <branch-name> "<worktree-path>"
For existing branch:
git worktree add "<worktree-path>" <branch-name>
Step 6: Copy Settings
mkdir -p <worktree-path>/.claude
cp <original-repo>/.claude/settings.local.json <worktree-path>/.claude/
Only copy if source file exists.
Step 7: Report New Worktree
Provide to user:
- Worktree path created
- Linear issue link
- Branch name being used
- Instruction:
cd $WORKTREE_BASE/<owner>/<repo>=<sanitized-branch-name>
Note: If branch name contains slashes (e.g., feature/dev-123-title), it becomes feature-dev-123-title.
Error Handling
| Scenario | Action |
|---|---|
| Type is Thinking | Inform: no worktree needed |
| Worktree exists | Ask: switch or recreate? |
| No issue found | Create via linear-issue skill |
| Worktree creation fails | Check: git worktree list for existing worktrees |
| Not in git repo | Fail with clear message |
git worktree Command Reference
git worktree add -b <branch-name> <path> # Create worktree with new branch
git worktree add <path> <branch-name> # Create worktree for existing branch
git worktree list # List all worktrees
git worktree remove <path> # Remove worktree
Daily Flow
- Notice task → Create Linear Issue (
linear-issueskill) - Set Type Label (Feature/Bug/Chore) + Repository Label
- Start work → This skill creates worktree
- Implement → PR
- Merge
- Linear auto-updates to Done