Agent skill

Agentmemory Capture Hooks

by rohitg00 in rohitg00/agentmemory

Describes the lifecycle hooks in the agentmemory Claude Code plugin that record observations automatically, and what to check when observations go missing.

Apache-2.0Auto-check passedAgent Workflows

Install Agentmemory Capture Hooks

skills CLI
$ npx skills add rohitg00/agentmemory --skill agentmemory-hooks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rohitg00/agentmemory agentmemory-hooks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rohitg00/agentmemory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/agentmemory-hooks .claude/skills/agentmemory-hooks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agentmemory-hooks
GitHub stars
29k
Token cost
~444 tokens
SKILL.md length
184 words
Files
2
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Describes the lifecycle hooks in the agentmemory Claude Code plugin that record observations automatically, and what to check when observations go missing.

  • Explaining how agentmemory records observations without manual saves
  • SKILL.md covers Quick start, What the hooks do, Important and See also, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Debugging missing observations in an agentmemory setup

What it does

The plugin registers hooks so routine work is captured without calling memory_save. Session start and end frame each unit of work so handoff can resume it, tool-use hooks record what changed and why, prompt-submit captures intent, pre-compact preserves context before the host trims it, and a post-commit hook links commits to sessions for commit-context and commit-history. Installing the plugin registers them, and observations can be watched live in a local viewer on port 3113.

Capture is on by default and does not call an LLM. Turning observations into LLM summaries (AGENTMEMORY_AUTO_COMPRESS) and injecting them back into context (AGENTMEMORY_INJECT_CONTEXT) are separate opt-ins because they spend tokens. When observations are missing, the first checks are that the plugin is enabled and the server is running, and the exact hook events are listed in REFERENCE.md.

When your agent uses it

  • Explaining how agentmemory records observations without manual saves
  • Debugging missing observations in an agentmemory setup
  • Deciding whether to enable summaries or context injection

Example prompts

  • “Why aren't my observations showing up in agentmemory?”
  • “Which hooks does the agentmemory plugin register, and what does each one capture?”
  • “Turn on automatic summaries for captured observations and explain the token cost.”

Requirements

  • The agentmemory plugin installed in Claude Code
  • A running agentmemory server

What it can do on your machine

Read from SKILL.md and the folder at commit 007a1a7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agentmemory Capture Hooks loads about 444 tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 184 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~444

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rohitg00/agentmemory at commit 007a1a7, republished under its Apache-2.0 licence (© rohitg00). 184 words, ~444 tokens.

Download SKILL.mdSave it as .claude/skills/agentmemory-hooks/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
agentmemory-hooks
description
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.
user-invocable
false

The Claude Code plugin registers lifecycle hooks so memory is captured automatically. You do not have to call memory_save for routine work; the hooks observe tool use, prompts, and session boundaries and write observations for you.

Quick start

Install the plugin and the hooks register themselves:

bash
/plugin marketplace add rohitg00/agentmemory
/plugin install agentmemory

Watch observations land live at http://localhost:3113.

What the hooks do

  • Session start and end frame each unit of work and let handoff resume it.
  • Tool-use hooks capture what changed and why, the raw material for recall and recap.
  • Prompt-submit captures intent. Pre-compact preserves context before the host trims it.
  • A post-commit hook links commits to sessions, which powers commit-context and commit-history.

Important

  • Capture is on by default and is zero-LLM. Turning observations into LLM summaries (AGENTMEMORY_AUTO_COMPRESS) and injecting them back into context (AGENTMEMORY_INJECT_CONTEXT) are separate opt-ins because they spend tokens.
  • If observations are missing, confirm the plugin is enabled and the server is running. See ../_shared/TROUBLESHOOTING.md.

See also

  • agentmemory-config for the capture and injection flags.
  • The handoff, recap, and session-history skills consume what these hooks record.

Reference

The exact registered hook events live in REFERENCE.md, generated from plugin/hooks/hooks.json.

© rohitg00, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in plugin/skills/agentmemory-hooks of rohitg00/agentmemory.

  • SKILL.md
  • REFERENCE.md

Open the folder on GitHubat commit 007a1a7

Compare with similar skills

Agentmemory Capture Hooks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agentmemory Capture Hooks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agentmemory Capture Hooks this skillrohitg00/agentmemory29k—~444Automated safety check: PassApache-2.0
Beads Task Memorygastownhall/beads28k—~1.2kAutomated safety check: PassMIT
Session History Searchslopus/happy24k—~3.1kAutomated safety check: PassMIT
Memori Long-Term MemoryMemoriLabs/Memori17k—~2kAutomated safety check: NotesCustom licence
Coding Agent Session Findercode-yeongyu/oh-my-openagent70k—~2.8kAutomated safety check: PassCustom licence
Deja History Searchvshulcz/deja-vu1.1k1 repos~1.3kAutomated safety check: PassMIT

Similar skills

  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Searches past Claude Code, Codex and Cursor sessions and summarizes what was worked on, tried or decided, using extraction scripts instead of reading raw logs.

    24k GitHub stars~3.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Memori Long-Term Memory

    MemoriLabs/Memori

    Connects Claude Code to Memori Cloud for long-term memory, recalling stored context before substantive replies and saving new context afterward.

    17k GitHub stars~2k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check: notes
  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub stars~2.8k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Deja History Search

    vshulcz/deja-vu

    Searches this machine's own history of past AI coding sessions across every tool used on it, before work is redone or something is denied.

    1.1k GitHub starsUsed in 1 repo~1.3k tokens
    Agent WorkflowsAuto-check passed
  • Memori MCP Memory Usage

    MemoriLabs/Memori

    Teaches an MCP-connected agent when and how to call Memori's recall, summary, compaction, augmentation, feedback and quota tools to keep context across sessions.

    17k GitHub stars~3.8k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed

More from rohitg00/agentmemory

All 17 skills in this repo
  • Sets up and troubleshoots a local agentmemory install, covering the MCP connection, environment variables, ports, authentication and optional feature flags.

    29k GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Commit Context Lookup

    rohitg00/agentmemory

    Traces a file, function or line back to the agent session behind its current commit, using git blame and a memory lookup, and reports only what the records show.

    29k GitHub stars~522 tokensUpdated today
    Auto-check passed
  • Agent Commit History

    rohitg00/agentmemory

    Lists recent git commits linked to agent sessions, filterable by branch, repository or a result limit, showing the session id and observation count behind each one.

    29k GitHub stars~524 tokensUpdated today
    Auto-check passed
  • Agentmemory Forget

    rohitg00/agentmemory

    Deletes chosen memories from agentmemory only after showing the matches and getting an explicit yes, for privacy requests and cleanup of outdated notes.

    29k GitHub stars~612 tokensUpdated today
    Auto-check passed
  • Session Handoff Resume

    rohitg00/agentmemory

    Resumes the most recent agent session for the current directory, leading with any question left unanswered and ending with a concrete next step.

    29k GitHub stars~678 tokensUpdated today
    Auto-check passed
  • Lesson Memory Recorder

    rohitg00/agentmemory

    Distills a user correction or hard-won rule into a confidence-weighted lesson that resurfaces automatically before similar future work.

    29k GitHub stars~721 tokensUpdated today
    Auto-check passed

Categories

Questions about Agentmemory Capture Hooks

What does Agentmemory Capture Hooks do?

Describes the lifecycle hooks in the agentmemory Claude Code plugin that record observations automatically, and what to check when observations go missing. The plugin registers hooks so routine work is captured without calling memory_save. Session start and end frame each unit of work so handoff can resume it, tool-use hooks record what changed and why, prompt-submit captures intent, pre-compact preserves context before the host trims it, and a post-commit hook links commits to sessions for commit-context and commit-history.

When should I use Agentmemory Capture Hooks?

Agentmemory Capture Hooks fits situations like: explaining how agentmemory records observations without manual saves; debugging missing observations in an agentmemory setup; deciding whether to enable summaries or context injection.

How do I install Agentmemory Capture Hooks in Claude Code?

Run `npx skills add rohitg00/agentmemory --skill agentmemory-hooks -a claude-code`. Or copy the skill folder (plugin/skills/agentmemory-hooks in rohitg00/agentmemory) into .claude/skills/agentmemory-hooks in your project. Claude Code loads it when a task matches its description.

How do I install Agentmemory Capture Hooks in Codex?

Run `npx skills add rohitg00/agentmemory --skill agentmemory-hooks -a codex`. Or copy the skill folder (plugin/skills/agentmemory-hooks in rohitg00/agentmemory) into .agents/skills/agentmemory-hooks in your project. Codex loads it when a task matches its description.

Can I use Agentmemory Capture Hooks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rohitg00/agentmemory --skill agentmemory-hooks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agentmemory-hooks, .gemini/skills/agentmemory-hooks, .github/skills/agentmemory-hooks and .opencode/skills/agentmemory-hooks in your project.

What does Agentmemory Capture Hooks need to run?

SKILL.md names no scripts, command-line tools or credentials: Agentmemory Capture Hooks is instructions for the agent only. Our summary lists: The agentmemory plugin installed in Claude Code; A running agentmemory server.

Does Agentmemory Capture Hooks access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agentmemory Capture Hooks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agentmemory Capture Hooks use?

Agentmemory Capture Hooks is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agentmemory Capture Hooks use?

About 444 tokens (SKILL.md is roughly 1.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agentmemory Capture Hooks?

Skills that share tags, products or a category with Agentmemory Capture Hooks: Beads Task Memory (gastownhall/beads, 28k stars), Session History Search (slopus/happy, 24k stars), Memori Long-Term Memory (MemoriLabs/Memori, 17k stars) and Coding Agent Session Finder (code-yeongyu/oh-my-openagent, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agentmemory Capture Hooks?

rohitg00 (a GitHub user) maintains it in rohitg00/agentmemory, which has 29,188 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 6, 2026.

Source: rohitg00/agentmemory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.