From ctx
Before a tool call: runs command -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || ex…. Before a tool call (Bash): runs command -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || ex…. And 8 more.
4 events · 22 hooks
Ships in ctx. Installing the plugin adds it to Claude Code.
Safety signals detected in this hook configuration
Event handlers and matchers — expand Raw configuration for the full JSON
.*command -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system context-load-gateBashcommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system block-non-path-ctxBashcommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system qa-reminderEnterPlanModecommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system specs-nudge.*command -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx agent --budget 8000 2>/dev/null || truecommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx journal import --all -y >/dev/null 2>&1 || trueBashcommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system post-commitEditcommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-task-completionWritecommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-task-completioncommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-context-sizecommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-ceremonycommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-persistencecommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-journalcommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-remindercommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-versioncommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-resourcecommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-knowledgecommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-map-stalenesscommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-memory-driftcommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-freshnesscommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system check-skill-discoverycommand -v ctx >/dev/null 2>&1 || exit 0; [ -n "${CLAUDE_PROJECT_DIR:-}" ] || exit 0; [ -d "$CLAUDE_PROJECT_DIR" ] || { echo "ctx: CLAUDE_PROJECT_DIR \"$CLAUDE_PROJECT_DIR\" is missing; restart the session at the project root" >&2; exit 1; }; cd "$CLAUDE_PROJECT_DIR" && ctx system heartbeatWhere this hook configuration is defined
Defined in hooks/hooks.json
4 plugins ship this exact hooks config · first indexed Oct 25, 2026
npx claudepluginhub activememory/ctx --plugin ctxOther plugins' hooks for the same job