Skip to content
Productivity
Hook

Hooks

What linear runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
linear
1391 skill1 hook

Claude Code

$ npx -y skills add wrsmith108/linear-claude-skill --agent claude-code

Where it lives

  • hooks/post-edit.shGitHub
    Read the script
    #!/bin/bash
    # Linear Sync - Post-Edit Hook
    #
    # Detects Linear issue references in changed files and suggests sync.
    # Install by adding to .claude/settings.json:
    #
    # {
    #   "hooks": {
    #     "PostToolUse": [{
    #       "matcher": "Write|Edit",
    #       "hooks": [{
    #         "type": "command",
    #         "command": "bash ~/.claude/skills/linear/hooks/post-edit.sh"
    #       }]
    #     }]
    #   }
    # }
    
    set -e
    
    # Read hook input from stdin (JSON with tool_name, tool_input, etc.)
    input=$(cat 2>/dev/null || echo "{}")
    
    # Extract file path from tool input
    file_path=$(echo "$input" | jq -r '.tool_input.file_path // empty' 2>/dev/null || echo "")
    
    # Exit early if no file path
    if [ -z "$file_path" ]; then
      exit 0
    fi
    
    # Only process source code files
    if [[ ! "$file_path" =~ \.(ts|tsx|js|jsx|astro|py|go|rs|md)$ ]]; then
      exit 0
    fi
    
    # Skip test files and config
    if [[ "$file_path" == *".test."* ]] || [[ "$file_path" == *".spec."* ]]; then
      exit 0
    fi
    if [[ "$file_path" == *"/test/"* ]] || [[ "$file_path" == *"/tests/"* ]]; then
      exit 0
    fi
    if [[ "$file_path" == *".config."* ]] || [[ "$file_path" == *"config/"* ]]; then
      exit 0
    fi
    
    # Skip node_modules, build artifacts, and generated files
    if [[ "$file_path" == *"node_modules"* ]]; then
      exit 0
    fi
    if [[ "$file_path" == *"/dist/"* ]] || [[ "$file_path" == *"/.vercel/"* ]]; then
      exit 0
    fi
    if [[ "$file_path" == *"/build/"* ]] || [[ "$file_path" == *"/.next/"* ]]; then
      exit 0
    fi
    
    # Extract just the filename for display
    filename="${file_path##*/}"
    
    # Check for Linear issue references in the file (SMI-123, ENG-456, etc.)
    issue_refs=""
    if [ -f "$file_path" ]; then
      # Match common Linear issue patterns: XXX-123
      issue_refs=$(grep -oE '[A-Z]{2,5}-[0-9]+' "$file_path" 2>/dev/null | sort -u | head -10 | tr '\n' ' ' || echo "")
    fi
    
    # Also check recent git commits for issue references
    recent_issues=""
    if command -v git &> /dev/null; then
      recent_issues=$(git log --oneline -5 2>/dev/null | grep -oE '[A-Z]{2,5}-[0-9]+' | sort -u | head -5 | tr '\n' ' ' || echo "")
    fi
    
    # Combine and deduplicate
    all_issues=$(echo "$issue_refs $recent_issues" | tr ' ' '\n' | sort -u | grep -v '^$' | tr '\n' ' ')
    
    # Output context for Claude (this gets added to the conversation)
    if [ -n "$all_issues" ]; then
      echo "[linear-sync] Changed: $filename | Issues: $all_issues"
      echo "[linear-sync] Consider running: npx ts-node scripts/sync.ts --issues ${all_issues// /,} --state Done"
    fi
    
    exit 0
    

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

@wrsmith108
Ships withlinear

A comprehensive Claude Code skill for managing Linear issues, projects, and teams. Provides patterns for MCP tools, SDK automation, and GraphQL API access.

Stars on GitHub

Momentum

stars in total
139
Star history of wrsmith108/linear-claude-skill on GitHub, a chart by star-history.com

More plugins that ship hooks.

i-have-adhd

i-have-adhd

A skill that shapes Claude Code's output for readers with ADHD: it leads with the next action, numbers multi-step work, restates state across turns, drops tangents, gives specific time estimates, and makes progress visible. Invoke it with /i-h.

1 skill1 hook60k
@ayghri@ayghri
Install Plugin
pua

pua

A Claude Code plugin that makes the assistant work harder when it stalls or repeats failures. It adds pressure-style coaching, plus skills for workplace reminders and senior engineer, CTO and team-lead modes for planning and execution.

12 skills+320k
@tanweai@tanweai
Install Plugin
claude-obsidian

claude-obsidian

Turns the sources you read, such as papers, articles and transcripts, into a linked wiki of Markdown notes in Obsidian. Claude keeps sources and citations so every summary can be traced back to its origin.

15 skills+216k
@agricidaniel@agricidaniel
Install Plugin
obsidian-second-brain

obsidian-second-brain

Gives Claude Code a persistent second brain stored as plain markdown in an Obsidian vault. Notes rewrite themselves as new sources arrive, and scheduled agents handle research synthesis and note capture.

1 skill+25.3k
@eugeniughelbur@eugeniughelbur
Install Plugin
arscontexta

arscontexta

A Claude Code plugin that builds a personal knowledge system through conversation, with skills for adding knowledge domains, checking vault health, getting methodology guidance, and evolving the system over time.

10 skills+23.5k
@agenticnotetaking@agenticnotetaking
Install Plugin
pro-workflow

pro-workflow

A Claude Code workflow plugin that learns from your corrections and keeps a self-correcting memory across sessions. It adds skills for agent teams, parallel worktree batch changes, bug capture as GitHub issues, project auto-setup and context compaction.

41 skills+32.9k
@rohitg00@rohitg00
Install Plugin
engram

engram

Helps you learn any topic with a first-principles curriculum, guided tutoring, and spaced review that schedules free-recall practice. Includes coaching for retention stats and study strategy.

3 skills+21.5k
@nagisanzenin@nagisanzenin
Install Plugin
hey

hey

A command line tool for HEY that lets you read and send email, manage contacts, labels, calendars, todos, habits, time tracking and journal entries from the terminal or from your coding agent.

1 skill1 hook423
@basecamp@basecamp
Install Plugin

Questions about the hooks in linear.

Which coding agents can use the hooks in linear?
The hooks in linear install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.