From g-line
Before context compaction (auto): runs sh "${CLAUDE_PLUGIN_ROOT}/hooks/compaction.sh" pre. On PostCompact: runs sh "${CLAUDE_PLUGIN_ROOT}/hooks/compaction.sh" post. When a session starts: runs [ -n "$CLAUDE_ENV_FILE" ] && echo 'unset FORCE_HYPERLINK' >> "$CLAUDE_ENV_FILE";….
3 events · 3 hooks
Ships in g-line. Installing the plugin adds it to Claude Code.
Event handlers and matchers — expand Raw configuration for the full JSON
autosh "${CLAUDE_PLUGIN_ROOT}/hooks/compaction.sh" presh "${CLAUDE_PLUGIN_ROOT}/hooks/compaction.sh" post[ -n "$CLAUDE_ENV_FILE" ] && echo 'unset FORCE_HYPERLINK' >> "$CLAUDE_ENV_FILE"; in=$(cat); case "$in" in *'"source":"resume"'*|*'"source": "resume"'*|*'"source":"fork"'*|*'"source": "fork"'*) v() { printf '%s' "$in" | tr ',{}' '\n\n\n' | sed -n "s/^ *\"$1\" *: *\"\{0,1\}\([A-Za-z0-9_.-]*\)\"\{0,1\} *$/\1/p" | head -n 1; }; s=$(v session_id); a=$(v seconds_since_last_response); c=$(v context_tokens); x=$(v prompt_cache_likely_expired); case "$s$a$c" in *[!A-Za-z0-9_.-]*|'') ;; *) case "$x" in true|false) ;; *) x=null;; esac; [ -n "$s" ] && [ -n "$a" ] && [ -n "$c" ] && mkdir -p "$HOME/.cache/g-line/resume" && printf '{"at":%s,"since":%s,"context":%s,"expired":%s}\n' "$(date +%s)" "$a" "$c" "$x" > "$HOME/.cache/g-line/resume/$s.json";; esac;; esac; exit 0Where this hook configuration is defined
Defined in hooks/hooks.json
8 plugins ship this exact hooks config · first indexed Apr 7, 2026
npx claudepluginhub lifeofgurpreet/g-line --plugin g-lineOther plugins' hooks for the same job