Skip to content
Skill Authoring
Hook

Hooks

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

From plugin
memstack
42587 skills2 commands4 hooks
Install
> /plugin marketplace add cwinvestments/memstack
> /plugin install memstack@cwinvestments-memstack

Ships with memstack. Installing the plugin gets these hooks.

What fires, and when

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • Matchesstartup|clear|compact"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" session-start

PreToolUse

  • MatchesRead|Bash|Grep"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" secret-read-guard
  • MatchesBash"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" junk-write-guard

UserPromptSubmit

Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.

  • "${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" report-marker"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" workdir-guard

Stop

  • "${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd" verify-gate
Read hooks/hooks.json
Ships withmemstack

The structured skill framework for Claude Code: 131 professional skills for deployment, security, databases, content, marketing, and more. Skills activate automatically when you need them. Say "deploy this to Railway" and the right skill loads on demand.

Get the whole plugin