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 gemini-cli

Or enable during wt init when prompted.

What gets written

wt hooks adds the following hooks to ~/.gemini/settings.json:

EventAction
SessionStartPre-loads project knowledge into context
BeforeAgentSearches workthin with your prompt
AfterAgentReminds the AI to call create-knowledge
SessionEndSame reminder at session end

Manual

Add to ~/.gemini/settings.json:

{
  "hooks": {
    "SessionStart": {
      "command": "wt search \"project recent solutions\" --hook 2>/dev/null || true"
    },
    "BeforeAgent": {
      "command": "wt search \"$GEMINI_USER_PROMPT\" --hook 2>/dev/null || true"
    },
    "AfterAgent": {
      "command": "printf '{\"systemMessage\": \"Session complete. If you solved a problem, call create-knowledge.\"}'"
    },
    "SessionEnd": {
      "command": "printf '{\"systemMessage\": \"Session ending. If you solved a problem, call create-knowledge.\"}'"
    }
  }
}

See the Gemini CLI hooks documentation for more details.

:::note wt init also creates /workthin and /workthin-search skills in ~/.agents/skills/ (shared with Codex CLI). Gemini CLI auto-scans this directory. :::

OpenAI Codex CLI Hooks

Automatic workthin hooks for OpenAI Codex CLI — search on SessionStart and UserPromptSubmit, capture on Stop.

Skills & Commands

Slash commands for AI tools — /workthin to capture knowledge, /workthin-search to find existing solutions.

On this page

AutoWhat gets writtenManual