| name | linear-sync |
| description | Pull Linear issues and generate a local snapshot for quick reference. Use when the user says "sync linear", "pull linear issues", "update from linear", or "show my issues". |
| argument-hint | [team-key] |
| user-invocable | true |
| allowed-tools | Bash, Read, Write, Glob, Grep |
| model | haiku |
/linear-sync — Generate local Linear snapshot
Pull issues from Linear using schpet/linear-cli and generate a read-only docs/LINEAR_SNAPSHOT.md for fast local reference. Linear remains the single source of truth — this file is a cache, not a tracking system.
Steps
-
Verify the Linear CLI is available:
linear --version 2>/dev/null || echo "LINEAR_CLI_MISSING"
If missing, tell the user to install it:
- macOS:
brew install schpet/tap/linear
- Deno:
deno install -A --reload -f -g -n linear jsr:@schpet/linear-cli
Then authenticate: linear auth login
-
Fetch issues from Linear. If $ARGUMENTS is provided, use it as the team key:
linear issue list --team "$ARGUMENTS" --all-states
Without arguments, fetch the current user's assigned issues:
linear issue list --all-states
-
Categorize issues by status and type:
- Active Bugs: label=bug AND status is In Progress or Todo
- Current Sprint: status is In Progress or In Review
- Upcoming: status is Todo or Backlog (top 10 by priority)
- Recently Completed: status is Done, completed in last 7 days
-
Write docs/LINEAR_SNAPSHOT.md as a read-only snapshot:
<!-- LINEAR_SNAPSHOT.md — auto-generated by /linear-sync, do not edit manually -->
<!-- Last synced: YYYY-MM-DD HH:MM -->
<!-- Source: [team or "my issues"] -->
<!-- Re-generate: /linear-sync [team-key] -->
## Active Bugs
- **ENG-123** [High] Login timeout on slow connections — *In Progress*
- **ENG-124** [Medium] Stale cache after deploy — *Todo*
## In Progress
- **ENG-130** [High] OAuth flow — *In Progress*
- **ENG-131** [Medium] Rate limiting — *In Review*
## Upcoming (Top 10)
- **ENG-140** [Medium] Refactor config loader — *Todo*
- **ENG-141** [Low] Update docs — *Backlog*
## Recently Completed
- **ENG-120** [High] ~~Fix auth redirect~~ — *Done (2025-02-07)*
-
Report sync results:
## Linear Snapshot Updated
Source: [team or "my issues"]
File: docs/LINEAR_SNAPSHOT.md
Active bugs: [count]
In progress: [count]
Upcoming: [count]
Recently completed: [count]
For full issue details: linear issue view ENG-123 --json
Arguments
- No arguments: sync all issues assigned to the current user
$ARGUMENTS: filter by team key (e.g., ENG)
Notes
- This file is read-only — never edit it manually. Always re-generate with
/linear-sync
- Linear is the single source of truth. This snapshot is a local cache for fast reads
- Use
linear issue view ENG-123 --json when you need full issue details (description, comments, etc.)
- Use
/linear-update to push status changes back to Linear
- Priority display: Urgent > High > Medium > Low > None