From mg-harness
Use when an engineer is handing off their open Linear tickets to another engineer — PTO coverage, role change, team transfer, sprint transition, or leaving the company. Triggers on phrases like "hand off my tickets to X", "transfer my Linear work to Y", "reassign my open issues with context", "I'm going on PTO, cover my tickets", "engineer handoff", "ticket transfer", or a slash-style "/handoff from=alice to=bob". Gathers Linear state plus git branch and PR status for each ticket, posts a structured handoff comment, and only reassigns after explicit confirmation. Requires a Linear MCP, git, and the gh CLI. Does NOT trigger for triaging the incoming Triage queue (use linear-triage-automation) or for routine status updates on tickets.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mg-harness:linear-handoffThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Hand off an engineer's open Linear tickets to another engineer **with full context**: current Linear state, branch state, open PRs and review status, and a structured "what's done / what's left / next steps" summary posted as a comment on each ticket before reassignment.
Hand off an engineer's open Linear tickets to another engineer with full context: current Linear state, branch state, open PRs and review status, and a structured "what's done / what's left / next steps" summary posted as a comment on each ticket before reassignment.
The failure mode this skill exists to prevent is context-free reassignment — the kind where a ticket appears in the new owner's queue with no idea what's been tried, what's blocked, or where the code lives. Every reassignment goes through a handoff comment first.
The skill assumes the current workspace has:
git available locally.gh CLI available and authenticated against the relevant GitHub org.If any are missing, stop at Step 0 and surface what's missing. Don't try to work around it — the handoff will be incomplete without that signal.
Before parsing arguments, verify the three prerequisites above. If anything fails, stop and tell the user which prerequisite is missing.
The skill needs two engineers: from and to. The user may give them in several shapes:
from=alice to=bobExtract both. If either is missing or ambiguous, stop and ask:
Usage:
/handoff from=<engineer> to=<engineer>— or describe the handoff in plain language (e.g., "hand off Alice's tickets to Bob").
from and to against display name, full name, or email. Partial match is fine.fromList issues assigned to from's Linear user ID. Exclude statuses Done, Canceled, Archived (and any equivalent terminal state the workspace uses).
Set the result limit high enough to capture everything; if the API paginates, follow hasNextPage / cursor until exhausted. Do not truncate silently.
If no open tickets exist, report "No open tickets found for [from]" and stop.
Present the result as a table:
| # | Ticket | Status | Priority | Team | Title |
|---|
Ask: "Hand off all tickets, or specify ticket numbers (e.g., 1, 3, 5)?" Wait for confirmation before continuing.
For each selected ticket, collect from three sources:
git fetch --prune first so remote refs are current.main):
git symbolic-ref --short refs/remotes/origin/HEAD | sed 's@^origin/@@'
Fall back to main only if the symbolic-ref lookup fails.gitBranchName locally and remotely:
git branch -a --list "*<gitBranchName>*"
git log <default>..<branch> --onelinegit diff <default>...<branch> --statgh pr list --head <branch> --json number,title,state,url,reviewDecisiongh pr view <number> --json reviews,comments to capture review status and recent review comments.For each ticket, build a structured comment in this format:
## Handoff: [from name] → [to name]
**Date:** [today's date]
### Current Status
- **Linear status**: [status]
- **Branch**: `<branch-name>` ([X] commits ahead of [default branch]) — or "No branch yet"
- **PR**: [link] (state: [open/closed/merged], review: [approved/changes-requested/pending]) — or "No PR yet"
- **Key files changed**: [from `git diff --stat`, or "N/A"]
### What's Done
- [bullets derived from commit messages, PR description, Linear comments]
### What's Left
- [unmet acceptance criteria from the ticket]
- [known blockers, dependencies, or open questions surfaced in comments]
### Key Decisions Made
- [design or scope decisions from PR review comments or Linear comments]
- [if none found: "No recorded decisions — check with [from name] if needed."]
### Suggested Next Steps
1. [concrete first step to resume the work]
2. [subsequent steps]
### Quick Start
[If branch + PR exist]: Review the open PR at [url], then `git checkout <branch>`.
[If branch only]: `git checkout <branch>` to pick up where [from name] left off.
[If neither]: Start fresh from the ticket description.
Two rules for the comment:
Present all generated handoff comments back to the user in a single batch. Ask:
Ready to post these summaries and reassign tickets? (yes / no / edit ticket N)
This gate is non-negotiable. The skill never posts and reassigns without an explicit yes.
For each selected ticket, in sequence:
to engineer.Posting before reassigning matters: the new owner should never see the ticket in their queue before the context exists on it.
Once all tickets are processed, present:
## Handoff Complete: [from name] → [to name]
| Ticket | Title | Status | Branch | PR | Comment posted |
|--------|-------|--------|--------|-----|----------------|
| [ID] | [title] | [status] | yes/no | yes/no | yes |
[X] tickets handed off successfully.
## Handoff: header. If one exists, surface it to the user and ask whether to layer a new handoff on top or stop. Don't blindly stack duplicate handoffs.git or gh is unavailable, the skill still works — it just skips the branch/PR section per ticket and notes "Branch/PR state unavailable: [reason]" in the comment. The handoff is more valuable incomplete than not at all.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub mgrabovskyi/skills --plugin mg-harness