Skip to content
Data
Hook

Hooks

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

From plugin
memx
4011 skill12 hooks1 MCP

Claude Code

$ npx -y skills add NeoLi00/memX --agent claude-code

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.

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code SessionStart

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.

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code UserPromptSubmit

PreToolUse

  • MatchesEdit|Write|Read|Glob|Grepnode "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code PreToolUse

PostToolUse

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code PostToolUse

PostToolUseFailure

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code PostToolUseFailure

PreCompact

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code PreCompact

SubagentStart

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code SubagentStart

SubagentStop

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code SubagentStop

Notification

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code Notification

TaskCompleted

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code TaskCompleted

Stop

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code Stop

SessionEnd

  • node "${CLAUDE_PLUGIN_ROOT}/dist/.runtime/src/bin/memx-hook.mjs" claude-code SessionEnd
Read hooks/hooks.json
@neoli00
Ships withmemx

memX: self-learning, self-maintaining memory plugin for AI agents; native support for claude code, codex, and openclaw

4011 skill1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
401
Star history of NeoLi00/memX on GitHub, a chart by star-history.com

More plugins that ship hooks.

last30days-cn

last30days-cn

A Claude Code skill that researches what Chinese internet users said recently across Weibo, Xiaohongshu, Bilibili, Zhihu, Douyin, WeChat, Baidu and Toutiao. It ranks posts by engagement and recency and writes a sourced research report.

1 skill1 hook2k
@jesseovo@jesseovo
Install Plugin
episodic-memory

episodic-memory

Semantic search over past Claude Code conversations, so a session can recall earlier discussions, decisions, and patterns. It adds a remembering-conversations skill that checks prior sessions before the assistant says it doesn't know.

1 skill+3499
@obra-2@obra-2
Install Plugin
databricks-agent-skills

databricks-agent-skill…

Skills and agent plugins that let AI coding agents such as Claude Code work with Databricks, covering AI Functions, Agent Bricks, AI/BI dashboards, GPU training workloads and Databricks Apps design.

36 skills+2394
@databricks@databricks
Install Plugin
nutmeg

nutmeg

A Claude Code plugin for football data work: acquiring data from sources such as StatsBomb, Opta and FBref, analysing it, computing metrics like xG and PPDA, and fixing broken scrapers. Built for analysts, developers, journalists and researchers.

11 skills+371
@withqwerty@withqwerty
Install Plugin
pinecone

pinecone

A lightweight plugin that integrates Pinecone vector database capabilities directly into Claude Code, enabling semantic search, index management, and RAG (Retrieval Augmented Generation) workflows.

9 skills+369
@pinecone-io@pinecone-io
Install Plugin
magi

magi

A research workflow plugin for Claude Code that turns folders of papers, notes and drafts into a linked, Obsidian-compatible knowledge base. It adds skills to adopt existing material, compile sources into concept cards, answer questions with citations, and write up unattended runs.

11 skills1 hook7
@misaka16384@misaka16384
Install Plugin
subrosa

subrosa

Archives every Claude Code session locally in a searchable SQLite store and saves durable facts into persistent memory. Adds skills to flush and review memory at session start or before clearing a conversation.

2 skills5 hooks5
@ij5a@ij5a
Install Plugin
ainl-cortex

ainl-cortex

Adds graph-based memory to Claude Code that records past interactions and learns recurring patterns across sessions. Runs as hooks and an MCP server.

7 hooks1 MCP4
@sbhooley@sbhooley
Install Plugin

Questions about the hooks in memx.

Which coding agents can use the hooks in memx?
The hooks in memx install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.