speckit.linear.sync

Synchronize status between Spec Kit tasks.md and Linear issues bidirectionally.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jmanhype/speckit/speckit.linear.sync
Clone the repo
git clone --depth 1 https://github.com/jmanhype/speckit

Made for: Claude Code.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,036 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.01036
Opus 5 $0.00007 $0.00518
Sonnet 5 $0.00003 $0.00207
Haiku 4.5 $0.00001 $0.00104

Measured yesterday against content hash 3f2aede72314, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

speckit.linear.sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/speckit.linear.sync.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Outline

  1. Validate prerequisites:

    • Run .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks
    • Parse FEATURE_DIR and verify tasks.md exists
    • Load .specify/linear-mapping.json for task-to-issue mapping
  2. Determine sync direction:

    • --to-linear: Push tasks.md status → Linear (default)
    • --from-linear: Pull Linear status → tasks.md
    • --bidirectional: Merge both (Linear wins on conflicts)
  3. Fetch current state from both sources:

    From tasks.md:

    • Parse each task's completion status [x] vs [ ]
    • Extract task IDs and descriptions

    From Linear (using mapped issue IDs):

    • Fetch each issue's current status
    • Map Linear status to completion:
      Linear Status tasks.md
      Done, Completed, Closed [x]
      In Progress [ ] (with note)
      Todo, Backlog [ ]
      Canceled [-] (skipped)
  4. Detect changes and conflicts:

    Sync Analysis:
    
    | Task | tasks.md | Linear | Action |
    |------|----------|--------|--------|
    | T001 | [x] | In Progress | → Update Linear to Done |
    | T002 | [ ] | Done | ← Update tasks.md to [x] |
    | T003 | [x] | Done | ✓ In sync |
    | T004 | [ ] | Todo | ✓ In sync |
    
  5. Apply changes based on direction:

    --to-linear (default):

    • For each task marked [x] in tasks.md:
      • Update Linear issue status to "Done"
    • For tasks marked [ ]:
      • If Linear shows "Done", warn about potential regression

    --from-linear:

    • For each Linear issue marked "Done":
      • Update tasks.md to [x]
    • For issues "In Progress":
      • Add comment to task: <!-- In Progress in Linear -->

    --bidirectional:

    • Linear status takes precedence on conflicts
    • Update both systems to match
  6. Update tracking metadata:

    • Update .specify/linear-mapping.json with sync timestamp:
      {
        "last_sync": "2025-01-15T14:30:00Z",
        "sync_direction": "bidirectional",
        "changes_applied": 3
      }
      

Read the full file on GitHub · 136 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 136 lines · 14 tokens per session scan A 3f2aede72314

Subscribe to this mod's changes

speckit.linear.sync is a command published in the GitHub repository jmanhype/speckit (26 stars, last pushed 5mo ago), licensed MIT. It adds 14 tokens to every session and 1,036 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.