Skip to content

Guide: Commands

github-actions[bot] edited this page Sep 30, 2026 · 2 revisions

Slash commands

Thatch ships /thatch/* commands you run yourself, on top of the nudges the plugin fires on its own schedule. Nudges and commands share the same instruction text, so a behavior works the same whether it fires automatically or you invoke it.

Commands

  • /thatch/defrag — find duplicate-candidate memory pairs and clusters, classify each one, consolidate duplicates, and mark the rest checked. Text after the command narrows the scope (for example, a store name).
  • /thatch/extract — drain the extraction queue now, instead of waiting for the next nudge or idle-time extraction. opencode only.
  • /thatch/hygiene — run the hygiene report and act on it: stale memories, memories scoped to deleted branches, and pending dedup pairs. The agent asks before forgetting anything that may still matter.
  • /thatch/reflect — run the session-reflection skill to persist what the current session learned.
  • /thatch/refine — refine a plan for a code change under the current project type's requirements: the agent classifies the project (team, personal, shared library, spike, infrastructure, or open source contribution), confirms the pick, and runs the refinement loop with that type's expectations applied. Text after the command can name the type directly (for example, /thatch/refine shared-lib) to skip classification.
  • /thatch/compact and /thatch/exit — the wrap-up commands. They run a pre-flight checklist (flush extraction, finish promised memory writes, surface loose ends) before a compaction or an exit, gated by a greenlight token. opencode only; the greenlight mechanics are described in the user guide overview.

Host support

Command opencode Claude Code Cursor
/thatch/defrag yes yes yes (as an MCP prompt)
/thatch/extract yes no no
/thatch/hygiene yes yes yes (as an MCP prompt)
/thatch/reflect yes yes yes (as an MCP prompt)
/thatch/refine yes yes yes (as an MCP prompt)
/thatch/compact, /thatch/exit yes no no

Why the gaps: /thatch/extract needs the invoking session's ID, which only the opencode plugin can supply. The wrap-up commands trigger TUI actions through the plugin. Cursor has no file-based commands; its prompts come from the MCP server (prompts/list and prompts/get).

Installation

  • opencode: installed by the plugin on every load.
  • Claude Code: installed by thatch setup --claude into the same scope as the skills (.claude/commands/thatch/ project-local, or the Claude config dir for --global). Re-run setup to refresh after an upgrade.

Tool names inside the command text follow each host's spelling (thatch_memory_remember on opencode, mcp__thatch__memory_remember on Claude Code and Cursor).

Clone this wiki locally