Updates Linear issues based on project-status evidence. Use when asked to sync Linear with code evidence or update issue status.
Synchronize Linear issue status with implementation evidence from code repositories. Updates issues to reflect actual development progress based on evidence from /project-status.
Apply when user asks:
Important: Only invoke when user explicitly asks to update Linear. This skill modifies Linear data.
LINEAR_API_TOKEN in .env.localIf components specified, invoke /project-status <components>.
If no components specified, invoke /project-status for full project scan.
Parse the output table to extract:
Resolve team identifier:
Before querying issues, resolve the configured teamName to a valid team:
mcp__linear__list_teams to get available teamsteamName against team name, key, or UUIDname for all subsequent queriesThis allows users to configure any of: team key ("TEAM"), team name ("My Team"), or UUID.
Important: The Linear MCP team parameter only accepts team name or UUID, not team keys. Always resolve keys via list_teams first.
Get team's workflow states:
mcp__linear__list_issue_statuses with the resolved team nameFor each component, search for matching Linear issues:
mcp__linear__list_issues with query parameter set to component nameFor each component from project-status:
Primary: Exact Title Match
Secondary: Partial Title Match
Tertiary: Identifier Match
mcp__linear__get_issue with the identifierNo Match
For each matched component-to-issue pair:
Upgrade-Only Rule: Never downgrade status automatically. If Linear shows higher status than evidence, skip the update and note it.
Output a preview table showing all proposed changes:
## Linear Sync Preview
| Component | Issue | Current | Proposed | Evidence |
|-----------|-------|---------|----------|----------|
| auth | TEAM-123 | Backlog | In Progress | Feature branch exists |
| dashboard | TEAM-456 | In Progress | Done | PR #78 merged, CI passing |
### No Change Needed
- TEAM-789 (payments): Already at Done
### Skipped (Linear status higher)
- TEAM-111 (analytics): Linear at Done, evidence shows In Progress
### No Linear Issue Found
- notifications: No matching issue
Proceed with updates? (y/n)
Check for auto-confirm mode:
If LINEAR_SYNC_AUTO_CONFIRM=1 environment variable is set:
⚠️ AUTO-CONFIRM MODE ENABLED
This will create, modify, and cancel temporary issues in your configured
Linear workspace. All test issues will be:
- Prefixed with [TEST]
- Set to Canceled status after testing
- Auto-archived by Linear after the configured period
Workspace: {workspace_name}
Team: {team_name}
Consider creating a dedicated test workspace if you're concerned about
affecting your production workspace.
Proceed with automated write tests? (y/n)
Normal mode (no env var):
For each confirmed update:
Update issue status:
mcp__linear__update_issue(id=issue_id, state=new_state_name)
Add explanatory comment:
mcp__linear__create_comment(
issueId=issue_id,
body="Status updated to [New Status] based on code evidence:\n- [Evidence description]\n- Source: /linear-sync"
)
Output final results:
## Linear Sync Results
### Updated (2)
| Issue | Previous | New | Evidence |
|-------|----------|-----|----------|
| TEAM-123 | Backlog | In Progress | Feature branch exists |
| TEAM-456 | In Progress | Done | PR #78 merged, CI passing |
### Skipped (1)
- TEAM-789: Linear status (Done) already higher than evidence (In Progress)
### No Match (1)
- notifications: No Linear issue found
| Priority | Status | Linear State Type |
|---|---|---|
| 1 | Shipped | completed |
| 2 | Done | completed |
| 3 | In Review | started |
| 4 | In Progress | started |
| 5 | Todo | unstarted |
| 6 | Backlog | backlog |
| 7 | Triage | triage |
| 8 | Canceled | canceled |
| 9 | Unknown | (no action) |
| Project-Status | Linear State Name | Fallback |
|---|---|---|
| Shipped | Done | - |
| Done | Done | - |
| In Review | In Review | In Progress |
| In Progress | In Progress | - |
| Todo | Todo | - |
| Backlog | Backlog | - |
| Triage | Triage | - |
| Canceled | Canceled | (requires --force flag) |
| Unknown | (no action) | - |
Since Linear teams can customize workflow states:
mcp__linear__list_issue_statuses to get team's states--force to mark as canceledRead Linear settings from .entourage/repos.json:
{
"linear": {
"teamName": "Team",
"workspace": "my-workspace"
}
}
Note: teamName accepts team name ("My Team"), team key ("TEAM"), or UUID.
| Variable | Purpose |
|---|---|
LINEAR_SYNC_AUTO_CONFIRM=1 |
Enables auto-confirm mode for automated testing. Shows one-time warning, then skips per-operation confirmations. |
When Linear MCP is not available (e.g., in automated tests), fall back to direct GraphQL API calls using LINEAR_API_TOKEN from .env.local.
mcp__linear__list_issue_statuses)Update Issue Status:
mutation IssueUpdate($id: String!, $stateId: String!) {
issueUpdate(id: $id, input: { stateId: $stateId }) {
success
issue {
id
identifier
state { id name type }
}
}
}
Curl example:
curl -X POST https://api.linear.app/graphql \
-H "Authorization: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation($id: String!, $stateId: String!) { issueUpdate(id: $id, input: { stateId: $stateId }) { success } }",
"variables": {"id": "issue-uuid", "stateId": "state-uuid"}
}'
Create Comment:
mutation CommentCreate($issueId: String!, $body: String!) {
commentCreate(input: { issueId: $issueId, body: $body }) {
success
comment { id }
}
}
Curl example:
curl -X POST https://api.linear.app/graphql \
-H "Authorization: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "mutation($issueId: String!, $body: String!) { commentCreate(input: { issueId: $issueId, body: $body }) { success } }",
"variables": {"issueId": "issue-uuid", "body": "Status updated based on code evidence..."}
}'
Get Team States (to resolve state name → ID):
query TeamStates($teamId: String!) {
team(id: $teamId) {
states {
nodes { id name type }
}
}
}
When running automated tests that create/modify Linear issues:
[TEST]Canceled status after verification> Linear MCP not available. Ensure Linear MCP server is configured.
> See: https://linear.app/docs/mcp
> Linear team "TEAM" not found. Check `teamName` in `.entourage/repos.json`.
> Cannot update issue TEAM-123: Insufficient permissions.
> Check your Linear role allows issue editing.
> Cannot find state "In Review" in team TEAM.
> Available states: Triage, Backlog, Todo, In Progress, Done, Canceled
> Using "In Progress" instead.
Query: /linear-sync
Runs full project status check and syncs all matching issues.
Query: /linear-sync auth dashboard
Syncs only the specified components.
Query: "Update Linear based on the status you just showed me"
Uses the most recent /project-status output to sync Linear.
This skill modifies Linear issues and reports results. After completion: