PlugWiki

agentmemory-hooks Skill (agentmemory) for Claude: What It Does and How to Install It

Explains the agentmemory hooks that capture your coding sessions automatically, and how to debug missing observations.

Installs
11K
on skills.sh
Stars
30.1K
on GitHub
Files
2
besides SKILL.md
Updated
Oct 2026
last repo commit

This is a reference skill for agentmemory, a memory server for coding agents. It says the plugin registers lifecycle hooks, so routine work is saved without calling memory_save. It gives the setup command for each host, lists what the hooks do and notes which options are separate: LLM compression and context injection.

Claude loads it on its own, because the file sets user-invocable: false. That happens when it explains how memory gets captured, debugs missing observations or tunes what is recorded. REFERENCE.md lists the 12 hook events. It needs the agentmemory server running.

Good for

  • Users wondering why agentmemory is not capturing anything
  • Developers setting up capture in Claude Code, Devin, Pi, Cursor or other hosts
  • Anyone tuning what gets recorded

Install agentmemory-hooks

Claude Code

  1. 1

    Copy this prompt.

    Install the agentmemory-hooks skill in Claude Code. Run this command:
    
    npx -y @agentmemory/agentmemory@latest
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js 20 or newer.

This skill explains hook capture, so it is only useful with the memory server running and the plugin enabled. The plugin route is the one the README recommends for Claude Code. The skills-only route installs all 17 skills but does not register hooks by itself. Pick one route, not both.

From the project README. Source.

What's in the skill

When it loads

The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.

Sections in SKILL.md

  1. Quick start
  2. What the hooks do
  3. Important
  4. See also
  5. Reference

Key facts

Installs on skills.sh
11,026 (Nov 2, 2026)
Last repo commit
Oct 29, 2026

What it includes

  • /plugin marketplace add and /plugin install for agentmemory

    The quick start for Claude Code. The same commands are in the install box at the top of this page.

    Try: “Why is agentmemory not capturing my Claude Code session?”

    Runs code · Claude Code plugin install

  • devin plugins install rohitg00/agentmemory#plugin

    SKILL.md says to run /hooks in Devin to confirm the hooks loaded, and that plugin hooks run only in local Devin sessions.

    Runs code · Devin install

  • agentmemory connect pi|omp --with-mcp and connect dsh --with-hooks

    Reload Pi or restart OMP, then inspect /agentmemory-status. DSH needs a restart. Cursor hooks come from its enabled plugin.

    Runs code · Pi, OMP and DSH connect

  • Use each host's native integration and verify a real turn

    Installing shared skills or connecting MCP alone does not enable automatic capture.

    Read · Hermes and OpenClaw

  • Session framing, tool capture, prompts, pre-compact and commits

    Session start and end frame the work. Tool-use hooks feed recall and recap. A post-commit hook links commits to sessions.

    Read · What the hooks do

  • AGENTMEMORY_AUTO_COMPRESS and AGENTMEMORY_INJECT_CONTEXT

    Hooks capture by default without an LLM. Compression and context injection are separate options, and native integrations have their own settings.

    Read · Capture options

  • Check the plugin is enabled and the server is running

    Watch the viewer at http://localhost:3113. A pending capture queue is not proof that the server stored the event.

    Read · Debug missing observations

  • 12 events registered by the Claude Code plugin

    Notification, PostToolUse, PostToolUseFailure, PreCompact, PreToolUse, SessionEnd, SessionStart, Stop, SubagentStart, SubagentStop, TaskCompleted and UserPromptSubmit.

    Read · REFERENCE.md hook events

From the official docs

Permissions

Medium risk

The main risk is that the hooks record your prompts, tool calls and replies on every turn. Check the viewer to see what is stored.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • The plugin records your sessions through hooks

    The README says the Claude Code hooks capture user prompts (privacy-filtered), tool use and results, errors and the assistant's reply for each turn. Review what is stored in the viewer at localhost:3113 before you rely on it. github.com

  • Setup runs npm code and starts a local server

    The README's setup command is npx -y @agentmemory/agentmemory@latest, which pulls the latest package and starts the memory server. The plugin's .mcp.json also starts a node bridge script from the plugin folder. github.com

  • Other hosts get their own hook setup

    SKILL.md names devin plugins install rohitg00/agentmemory#plugin and agentmemory connect pi, omp and dsh. Each changes that host's configuration, so run only the one for your host. github.com

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyNo read-only switch is documented for these skills.
Talks toThe server and viewer bind to loopback by default, per the README. A provider you configure for LLM compression or summaries. The hook scripts call to AGENTMEMORY_URL, which defaults to http://localhost:3111; if you point it at a remote server, hook data goes there
Sign-in and keysA local server makes a random secret at ~/.agentmemory/secret (mode 0600, per the README) and bundled clients read it. A remote server needs AGENTMEMORY_SECRET in your environment.
Scopes
  • The Claude Code plugin registers hooks for 12 events (such as every prompt, every tool call and session end), each running a node script from the plugin

  • The plugin ships a .mcp.json that starts a node bridge (plugin-bridge.mjs) to the memory server

  • Setup runs npx -y @agentmemory/agentmemory@latest, which starts a server on localhost:3111 with a viewer on localhost:3113

  • The quick start also lists devin plugins install and agentmemory connect commands, which set up capture in those hosts

  • In the plugin source, session-start.mjs and pre-tool-use.mjs read AGENTMEMORY_URL and the bearer secret (AGENTMEMORY_SECRET, an .env file or ~/.agentmemory/secret) and call the memory server; session-start.mjs and stop.mjs also run git rev-parse

Questions

What does the agentmemory-hooks skill do?

It explains how agentmemory captures sessions automatically. Claude uses it to describe the hooks, help you set capture up on your host and debug missing observations.

How do I install it?

Use the install box at the top of this page. The Claude Code route adds the plugin, which registers the hooks. Start the memory server first.

Why is nothing being captured?

SKILL.md says to confirm the plugin is enabled and the server is running, and to check the viewer for a recorded observation. Connecting MCP or installing shared skills alone does not turn on automatic capture.

Does capture use an LLM or an API key?

The hooks capture by default without an LLM. Per-observation compression is a separate option, and so is hook context injection. Session summaries can use a provider you configure.

Which hosts does it cover?

The quick start names Claude Code, Devin CLI and Desktop, Pi, OMP, DSH, Cursor, Hermes and OpenClaw. Each has its own setup, and Hermes and OpenClaw use native integrations.

Is it safe?

The skill itself is text and bundles no scripts. What it explains is the part to watch: the hooks run node scripts on every prompt and tool call and record your sessions. Read the safety section on this page and check the viewer to see what is stored.

Information

updated Nov 2, 2026

Folder
plugin/skills/agentmemory-hooks

rohitg00/agentmemoryskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 8
  1. agentmemory README · github.com
  2. skills CLI commands · github.com
  3. agentmemory-hooks SKILL.md · github.com
  4. plugin.json · github.com
  5. hooks REFERENCE.md · github.com
  6. plugin hooks.json · github.com
  7. plugin .mcp.json · github.com
  8. pre-tool-use.mjs · github.com

Updated Nov 2, 2026.