ClaudeSuperPower
U

UserPromptSubmit

Hook

Mercado Pago developer plugin hooks

Fires on

UserPromptSubmit

Every time you send a message, before Claude sees it.

Where this sits in a session

  1. Session start
  2. Prompt submitted
  3. Prompt expansion
  4. Before tool use
  5. After tool use
  6. Notification
  7. Before compaction
  8. Subagent finished
  9. Turn finished
  10. Session end

Observes onlyEmits messages or context. It never returns a permission decision.

What it runs

Executed automatically when the event fires — no prompt, no confirmation.

command· timeout 3s
bash ${CLAUDE_PLUGIN_ROOT}/hooks/check-version.sh

Install it yourself

Paste into .claude/settings.json to run this hook without installing the whole plugin. Adjust the paths to point at your own copy of the scripts.

settings.json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/check-version.sh",
            "timeout": 3
          }
        ]
      }
    ]
  }
}

Source

Read this before installing — it runs on your machine with your permissions.



#!/usr/bin/env bash
#
# Runs on every UserPromptSubmit. Silent unless the plugin version changed.
# When it changes, injects a one-line notice into the conversation context.
#

set -uo pipefail

PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-}"
[[ -z "$PLUGIN_ROOT" ]] && exit 0

VERSION_FILE="$PLUGIN_ROOT/.claude-plugin/plugin.json"
[[ -f "$VERSION_FILE" ]] || exit 0

current=$(python3 -c "import json,sys; d=json.load(open(sys.argv[1])); print(d['version'])" "$VERSION_FILE" 2>/dev/null) || exit 0
[[ -z "$current" ]] && exit 0

SEEN_DIR="${HOME}/.claude"
SEEN_FILE="$SEEN_DIR/mp-plugin-seen-version"

mkdir -p "$SEEN_DIR" 2>/dev/null || exit 0
seen=$(cat "$SEEN_FILE" 2>/dev/null || echo "")

if [[ "$current" != "$seen" ]]; then
  echo "$current" > "$SEEN_FILE" || exit 0
  if [[ -n "$seen" ]]; then
    echo "[Mercado Pago plugin updated: v${seen} → v${current}. Run /mp-connect to verify your connection.]"
  fi
fi

exit 0

Shipped by 1 plugin

Installing any of these installs this hook.

Reviews

Log in to leave a review.

No reviews yet — be the first.

Explore related

Other things in this space — across every part of the ecosystem, not just hooks.