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 claude-code

Or enable during wt init when prompted.

What gets written

wt hooks adds the following hooks to ~/.claude/settings.json (user-level, applies to all projects):

EventAction
SessionStartPre-loads project knowledge into context
UserPromptSubmitSearches workthin with your prompt
StopReminds Claude to call create-knowledge
SessionEndSame reminder at session end

Manual

Add to ~/.claude/settings.json:

{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "wt search \"project recent solutions\" --hook 2>/dev/null || true"
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "wt search \"${CLAUDE_USER_PROMPT:0:300}\" --hook 2>/dev/null || true"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "printf '{\"systemMessage\": \"Session complete. If you solved a problem, call create-knowledge.\"}'"
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "printf '{\"systemMessage\": \"Session ending. If you solved a problem, call create-knowledge.\"}'"
          }
        ]
      }
    ]
  }
}

Verify

Start a new Claude Code session and ask a technical question. If matching knowledge exists in workthin, it will appear as context before Claude responds.

Hooks

Automate knowledge search and capture using AI tool hooks — search on every prompt, capture on session end.

Cursor Hooks

Automatic workthin hooks for Cursor — search on sessionStart and beforeSubmitPrompt, capture on stop and sessionEnd.

On this page

AutoWhat gets writtenManualVerify