Memory and context hooks

257 tagged Memory and context, measured the same way as everything else here.

Browse within: agent-memory 34ai-memory 20context-engineering 12codex-cli 8knowledge-graph 8local-first 7claude-code-hooks 6context 6knowledge-management 6llm-agents 6gemini-cli 5hybrid-search 5plugin 5

PreCompact

73

dkothule/ai-context

Hook Claude Code

Runs before the context is compacted for manual and auto tool calls, executing pre-compact.sh via bash with --show-toplevel (2 commands). From dkothule/ai-context.

11 3mo ago A tokens not measured original MIT

SessionStart

74

saif-shines/doraval

Hook

Runs when a session starts, running /usr/local/bin/dora memory context --json. From saif-shines/doraval.

11 4d ago A tokens not measured

UserPromptSubmit

75

Lians-ai/Lians

Hook

Runs when you submit a prompt, before the agent sees it, executing run_hook.sh. From Lians-ai/Lians.

10 10d ago A tokens not measured original Apache-2.0

PreCompact

76

sfrangulov/skill-graveyard

Hook Claude Code

Runs before the context is compacted, running bd prime. From sfrangulov/skill-graveyard.

10 1mo ago A tokens not measured copy · 100% MIT

PreCompact

77

Artexis10/exomem

Hook

Part of exomem

Runs before the context is compacted for manual and auto tool calls, executing exomem-continuation-checkpoint.sh via bash. From Artexis10/exomem.

10 3d ago A tokens not measured AGPL-3.0

PreCompact

78

hehee9/codex-compressor

Hook

Runs before the context is compacted for ^(auto and manual)$ tool calls, executing launch.py via python3. From hehee9/codex-compressor.

10 8d ago A tokens not measured original Apache-2.0

SessionStart

79

runtimenoteslabs/memory-layer

Hook Claude Code

Part of memory-layer

Runs when a session starts, running mem context --project "$PWD" --limit 10 --format brief. From runtimenoteslabs/memory-layer.

10 3mo ago A tokens not measured original MIT

PostToolUse

80

runtimenoteslabs/memory-layer

Hook Claude Code

Part of memory-layer

Runs after a tool call finishes for Write and Edit tool calls, running an inline shell check. From runtimenoteslabs/memory-layer.

10 3mo ago A tokens not measured original MIT

UserPromptSubmit

81

fruitriin/embodied-claude-wardrobe

Hook Claude Code

Runs when you submit a prompt, before the agent sees it, executing interoception.sh, recall-hook.sh, hearing-hook.sh, turn-reminder.sh and run-keyword-buffer.sh (5 commands). From fruitriin/embodied-claude-wardrobe.

10 1mo ago A tokens not measured

UserPromptSubmit

82

pluto2060/CTX

Hook

Part of ctx

Runs when you submit a prompt, before the agent sees it, executing chat-memory.py, bm25-memory.py and memory-keyword-trigger.py with --rich (3 commands). From pluto2060/CTX.

9 3mo ago A tokens not measured original MIT

SessionStart

83

huzaifa525/claude-code-optimizer

Hook Claude Code

Part of claude-code-optimizer

Runs when a session starts, executing generate-context.sh, memory-inject.sh, resume-plan.sh, auto-setup.sh and auto-update-check.sh via bash (5 commands). From huzaifa525/claude-code-optimizer.

9 5mo ago A tokens not measured original MIT

PreToolUse

84

gitmem-dev/gitmem

Hook

Part of gitmem-hooks

Runs before the agent uses a tool for Bash, Read, Write and Edit tool calls, executing credential-guard.sh and recall-check.sh via bash (5 commands). From gitmem-dev/gitmem.

9 24d ago A tokens not measured original MIT

PreCompact

85

jeremylongshore/plugins-nixtla

Hook Claude Code

Runs before the context is compacted, executing post-compact.sh. From jeremylongshore/plugins-nixtla.

9 8d ago A tokens not measured

PreCompact

87

Loctree/loctree

Hook

Runs before the context is compacted, executing aicx-precompact.sh. From Loctree/loctree.

9 3d ago A tokens not measured

PreCompact

88

DorianSchlede/nexus-template

Hook Claude Code

Runs before the context is compacted, running nexus-save-resume-state. From DorianSchlede/nexus-template.

8 7mo ago A tokens not measured original MIT

UserPromptSubmit

90

NicolasPrimeau/artel

Hook

Part of artel

Runs when you submit a prompt, before the agent sees it, executing artel-check-inbox.sh and artel-recall.sh (2 commands). From NicolasPrimeau/artel.

8 13d ago A tokens not measured original MIT

UserPromptSubmit

91

pbmagnet4/nlm-memory

Hook

Runs when you submit a prompt, before the agent sees it, executing prompt-recall-hook.mjs. From pbmagnet4/nlm-memory.

7 3d ago A tokens not measured original Apache-2.0

SessionStart

92

las7/memharness

Hook

Part of memharness

Runs when a session starts, running npx -y -p @memharness/mcp memharness-context --subject user. From las7/memharness.

6 2mo ago A tokens not measured original Apache-2.0

PermissionRequest

93

LH8PPL/core-memory-kit

Hook

Part of core-memory-kit

Runs when the agent asks permission for an action for mcp__cmk__.* and Skill tool calls, executing cmk-approve-permission.mjs via node (2 commands). From LH8PPL/core-memory-kit.

6 5d ago A tokens not measured original MIT

PreCompact

94

skymanbp/cc-memory

Hook

Part of cc-memory

Runs before the context is compacted, executing pre_compact.py and consolidate_async.py via python3 (2 commands). From skymanbp/cc-memory.

6 3d ago A tokens not measured original MIT

PreCompact

95

rhoulihan/mneme

Hook

Part of mneme

Runs before the context is compacted, executing distill-hook.sh. From rhoulihan/mneme.

6 9d ago A tokens not measured copy · 86% Apache-2.0

At most 3 mods per repository are shown here, and a mod shipped inside a plugin is left to that plugin's page — the rest are on their repository pages: