From engram
When a session ends: runs node -e 'try { const fs = require("node:fs"); const { spawn } = require("node:ch…. When a session starts: runs ENGRAM_DB_PATH="${ENGRAM_DB_PATH:-~/.engram/engram.db}" ENGRAM_SOURCE="${ENGRAM_….
2 events · 2 hooks
Ships in engram. Installing the plugin adds it to Claude Code.
Event handlers and matchers — expand Raw configuration for the full JSON
node -e 'try {
const fs = require("node:fs");
const { spawn } = require("node:child_process");
const input = JSON.parse(fs.readFileSync(0, "utf8"));
if (["clear", "resume"].includes(input.reason)) process.exit(0);
if (!input.transcript_path) process.exit(0);
const text = fs.readFileSync(input.transcript_path, "utf8").trim().split("\n")
.map(line => JSON.parse(line)).filter(entry => entry.type === "assistant")
.map(entry => Array.isArray(entry.message.content)
? entry.message.content.filter(block => block.type === "text").map(block => block.text).join(" ")
: entry.message.content).join("\n");
const summary = Array.from(text).slice(-1500).join("").replace(/\n/g, " ");
if (summary.length < 20) process.exit(0);
const env = { ...process.env,
ENGRAM_DB_PATH: process.env.ENGRAM_DB_PATH || "~/.engram/engram.db",
ENGRAM_SOURCE: process.env.ENGRAM_SOURCE || "claude-code"
};
const child = spawn("npx", ["-y", "-p", "@engram-ai-memory/mcp@latest", "engram-store-session", "Session summary: " + summary], {
detached: true, stdio: "ignore",
env
});
child.on("error", () => {});
child.unref();
} catch {}' >/dev/null 2>&1 || true10sENGRAM_DB_PATH="${ENGRAM_DB_PATH:-~/.engram/engram.db}" ENGRAM_SOURCE="${ENGRAM_SOURCE:-claude-code}" npx -y -p @engram-ai-memory/mcp@latest engram-session-start 2>/dev/null || true10sWhere this hook configuration is defined
Defined in hooks/hooks.json
npx claudepluginhub ayvazyan10/engram --plugin engram245 plugins in 237 repositories ship this exact hooks config · first indexed Nov 28, 2025
Showing 6 of 245 plugins, one per repository first
Other plugins' hooks for the same job