Skip to content
Productivity
Hook

Hooks

What mentor runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
mentor
173 skills2 commands1 hook

Claude Code

> /plugin marketplace add hcsum/dont-let-me
> /plugin install mentor@dont-let-me

What fires, and when

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"
Read hooks/hooks.json

In the plugin's words

How mentor describes its own hook set.

Injects the mentor stance and the user's profile at the start of every session.

Where it lives

  • hooks/session-start.shRunsGitHub
    Read the script
    #!/usr/bin/env bash
    # Injects the mentor stance (+ the user's profile, if set up) into every session
    # as SessionStart additionalContext. Runs under Claude Code and Codex — both fire
    # SessionStart hooks with the same schema, and Codex sets CLAUDE_PLUGIN_ROOT for
    # compatibility. Never fails the session: any error exits 0 with no output, which
    # the harness treats as "no extra context".
    
    set -uo pipefail
    
    # Where the profile and todos live. An explicit $MENTOR_HOME wins; otherwise
    # reuse whichever directory already holds a profile, so an existing setup keeps
    # working when the plugin is installed in the other agent too.
    MENTOR_DIR="${MENTOR_HOME:-}"
    if [ -z "$MENTOR_DIR" ]; then
      for candidate in "$HOME/.mentor" "$HOME/.claude/mentor" "${CODEX_HOME:-$HOME/.codex}/mentor"; do
        if [ -r "$candidate/profile.md" ]; then
          MENTOR_DIR="$candidate"
          break
        fi
      done
    fi
    [ -n "$MENTOR_DIR" ] || MENTOR_DIR="$HOME/.mentor"
    
    PROFILE="$MENTOR_DIR/profile.md"
    STANCE="${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}/stance.md"
    
    [ -r "$STANCE" ] || exit 0
    
    body="$(cat "$STANCE")"
    body+=$'\n\n---\n\n# Mentor directory\n\nThis user\'s mentor directory is `'"$MENTOR_DIR"$'`. Its two files are the profile\nat `'"$PROFILE"$'` and the todo file at `'"$MENTOR_DIR"$'/todos.md`. Either may be a\nsymlink pointing elsewhere; follow it without comment. Use these paths, not any\ndefault mentioned elsewhere.'
    
    if [ -r "$PROFILE" ]; then
      body+=$'\n\n---\n\n# This user\'s profile\n\nThe user wrote this themselves during mentor setup. It is the yardstick for the\nstance above — if they ask to change a goal, edit a shortcoming, or add to the\ndon\'t-let-me list, edit the profile file directly.\n\n'
      body+="$(cat "$PROFILE")"
    else
      body+=$'\n\n---\n\n# No profile yet\n\nThis user has not set up a mentor profile, so the stance above has no yardstick\nand cannot function. At the next natural pause — not mid-task — mention once\nthat setting one up takes a few minutes: `/mentor:init` in Claude Code, or in\nCodex just ask to set up the mentor profile. Say it once per session at most.\nDo not nag, and do not invent goals for them in the meantime.'
    fi
    
    # JSON-encode safely: the profile contains quotes, newlines and likely non-ASCII.
    if command -v python3 >/dev/null 2>&1; then
      printf '%s' "$body" | python3 -c 'import json,sys; print(json.dumps({"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":sys.stdin.read()}}))'
    else
      # Fallback: minimal escaper, good enough for the stance text alone.
      esc=$(printf '%s' "$body" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
      printf '{"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":"%s"}}\n' "$esc"
    fi
    
    exit 0
    

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

@hcsum
Ships withmentor

Turn your agent into a mentor. It knows what you're working toward, and how you get in your own way.

Stars on GitHub

Momentum

stars in total
17
Star history of hcsum/dont-let-me on GitHub, a chart by star-history.com

More plugins that ship hooks.

i-have-adhd

i-have-adhd

A skill that shapes Claude Code's output for readers with ADHD: it leads with the next action, numbers multi-step work, restates state across turns, drops tangents, gives specific time estimates, and makes progress visible. Invoke it with /i-h.

1 skill1 hook60k
@ayghri@ayghri
Install Plugin
pua

pua

A Claude Code plugin that makes the assistant work harder when it stalls or repeats failures. It adds pressure-style coaching, plus skills for workplace reminders and senior engineer, CTO and team-lead modes for planning and execution.

12 skills+320k
@tanweai@tanweai
Install Plugin
claude-obsidian

claude-obsidian

Turns the sources you read, such as papers, articles and transcripts, into a linked wiki of Markdown notes in Obsidian. Claude keeps sources and citations so every summary can be traced back to its origin.

15 skills+216k
@agricidaniel@agricidaniel
Install Plugin
obsidian-second-brain

obsidian-second-brain

Gives Claude Code a persistent second brain stored as plain markdown in an Obsidian vault. Notes rewrite themselves as new sources arrive, and scheduled agents handle research synthesis and note capture.

1 skill+25.3k
@eugeniughelbur@eugeniughelbur
Install Plugin
arscontexta

arscontexta

A Claude Code plugin that builds a personal knowledge system through conversation, with skills for adding knowledge domains, checking vault health, getting methodology guidance, and evolving the system over time.

10 skills+23.5k
@agenticnotetaking@agenticnotetaking
Install Plugin
pro-workflow

pro-workflow

A Claude Code workflow plugin that learns from your corrections and keeps a self-correcting memory across sessions. It adds skills for agent teams, parallel worktree batch changes, bug capture as GitHub issues, project auto-setup and context compaction.

41 skills+32.9k
@rohitg00@rohitg00
Install Plugin
engram

engram

Helps you learn any topic with a first-principles curriculum, guided tutoring, and spaced review that schedules free-recall practice. Includes coaching for retention stats and study strategy.

3 skills+21.5k
@nagisanzenin@nagisanzenin
Install Plugin
hey

hey

A command line tool for HEY that lets you read and send email, manage contacts, labels, calendars, todos, habits, time tracking and journal entries from the terminal or from your coding agent.

1 skill1 hook423
@basecamp@basecamp
Install Plugin

Questions about the hooks in mentor.

Which coding agents can use the hooks in mentor?
The hooks in mentor install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.