workthin
workthin
PricingBlogChangelogOverviewQuick StartConcepts

SetupTools Reference
HooksClaude Code HooksCursor HooksVS Code HooksGitHub Copilot HooksOpenAI Codex CLI HooksGemini CLI Hooks
Skills & Commands

Docs for LLMs

llms.txtllms-full.txt
MCP ServerHooks

Auto

wt hooks cursor

Or enable during wt init when prompted.

What gets written

wt hooks writes ~/.cursor/hooks.json (user-level, applies to all projects) with the following hooks:

EventAction
sessionStartPre-loads project knowledge into context
beforeSubmitPromptSearches workthin with your prompt
stopReminds the AI to call create-knowledge
sessionEndSame reminder at session end

Manual

Create ~/.cursor/hooks.json:

{
  "hooks": [
    {
      "event": "sessionStart",
      "command": "wt search \"project recent solutions\" --hook 2>/dev/null || true"
    },
    {
      "event": "beforeSubmitPrompt",
      "command": "wt search \"$CURSOR_USER_PROMPT\" --hook 2>/dev/null || true"
    },
    {
      "event": "stop",
      "command": "printf '{\"systemMessage\": \"Session complete. If you solved a problem, call create-knowledge.\"}'"
    },
    {
      "event": "sessionEnd",
      "command": "printf '{\"systemMessage\": \"Session ending. If you solved a problem, call create-knowledge.\"}'"
    }
  ]
}

See the Cursor hooks documentation for more details on available events.

Claude Code Hooks

Automatic workthin hooks for Claude Code — search on SessionStart and UserPromptSubmit, capture on Stop and SessionEnd.

VS Code Hooks

Automatic workthin hooks for VS Code Copilot Chat — search on SessionStart and UserPromptSubmit, capture on Stop.

On this page

AutoWhat gets writtenManual