Skip to content
Agent Memory
Hook

Hooks

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

From plugin
context-mode
34k4 skills4 hooks

Claude Code

> /plugin marketplace add mksglu/context-mode
> /plugin install context-mode@context-mode

What fires, and when

AfterTool

  • node "${extensionPath}${/}plugins/claude-code/hook.mjs" --agent gemini

BeforeAgent

  • node "${extensionPath}${/}plugins/claude-code/hook.mjs" --agent gemini

BeforeTool

  • node "${extensionPath}${/}plugins/claude-code/hook.mjs" --agent gemini

PreCompress

  • node "${extensionPath}${/}plugins/claude-code/hook.mjs" --agent gemini
Read hooks/hooks.json
@mksglu
Ships withcontext-mode

A free, local plugin for 10 coding agents. It keeps tool output out of your agent's context window and keeps all usage data on your machine. The plugin is free forever.

Stars on GitHub

Momentum

stars in total
33.9k
Star history of mksglu/context-mode on GitHub, a chart by star-history.com

More plugins that ship hooks.

mempalace

mempalace

Local-first memory for Claude Code. It stores conversations verbatim in a private palace you can search before answering about past work, people, projects, or decisions, with optional shared-brain hub setup.

3 skills+361k
@mempalace@mempalace
Install Plugin
mempalace

mempalace

Gives Claude Code a private memory that stays on your machine. It stores past conversations word for word, so you can ask what was decided, what happened before, or who was involved and get the original context back. It can also hand tasks to other agents.

3 skills+360k
@milla-jovovich@milla-jovovich
Install Plugin
mksglu-context-mode

mksglu-context-mode

Keeps large tool outputs, logs, and files out of Claude Code's context window by processing them in a sandbox and indexing them for focused search. Includes diagnostics and a knowledge base indexer.

9 skills+233k
@mksglu@mksglu
Install Plugin
ai-memory

ai-memory

Gives coding agents a git-backed wiki for long-term project memory, with skills for retrieval, durable notes, session handoffs between agents, cross-project messaging, and memory consolidation.

7 skills+216k
@akitaonrails@akitaonrails
Install Plugin
letta-code

letta-code

A coding agent harness whose agents keep memory and identity across sessions, so they learn and improve over time. You can run it in a terminal, in the browser, or through Telegram, Slack and Discord.

26 skills8 hooks3.8k
@letta-ai@letta-ai
Install Plugin
claude-subconscious

claude-subconscious

A background agent for Claude Code that watches your sessions and reads your files, builds up memory over time, and offers guidance back during your work.

4 hooks2.9k
@letta-ai@letta-ai
Install Plugin
token-optimizer

token-optimizer

Audits a Claude Code or Codex setup for context-window waste, fixes it with the user's approval, and measures the savings. It also tracks costs, helps resume prior sessions, and offers a usage dashboard.

5 skills+22.8k
@alexgreensh@alexgreensh
Install Plugin
claude-reflect

claude-reflect

A self-learning system for Claude Code that captures your corrections during sessions and reminds you to run /reflect to save them to CLAUDE.md as permanent memory. It also discovers recurring workflow patterns.

1 skill+21.9k
@bayramannakov@bayramannakov
Install Plugin

Questions about the hooks in context-mode.

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