UserPromptSubmit

UserPromptSubmit is a hook for Claude Code from Monet-AI-Editor/Monet. Its token cost is not measured, scanned A, original, MIT.

An automatic action that runs before the agent receives a submitted prompt. It checks whether the Monet editor is in canvas mode and, in that mode, runs Paper.js and applies the editor's required method-choice instructions.

In plain words
What is it for?
Use it to enforce Monet's canvas-mode prompt handling, including the required choice between Paper.js, Matter.js, and GPT image 2.
Why use it?
It ensures canvas prompts follow the editor's configured workflow before any agent work begins.

Hook for Claude Code

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else.

One of 2 entries in settings.json — they are configured in one file and arrive together.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for UserPromptSubmit

README.md
[![agentmods](https://agentmods.dev/badge/hooks/monet-ai-editor/monet/user-prompt-submit.svg)](https://agentmods.dev/hooks/monet-ai-editor/monet/user-prompt-submit)
Your own site
<a href="https://agentmods.dev/hooks/monet-ai-editor/monet/user-prompt-submit"><img src="https://agentmods.dev/badge/hooks/monet-ai-editor/monet/user-prompt-submit.svg" alt="Measured on agentmods" height="20"></a>
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Security

Grade A, and why

UserPromptSubmit scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the commands this hook runs, not an audit. A hook is shell that executes on your machine at the event it names, which is why every command in it is printed with what was found.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"command": "bash -c 'TMPFILE=\"$TMPDIR/monet-active-view\"; if [ -f \"$TMPFILE\" ]; then VIEW=$(cat \"$TMPFILE\" 2>/dev/null); else EDITORCTL=\"/Users/hetpatel/Library/Application Support/monet/bin/editorctl\"; RAW=$(\"$
.claude/settings.json · 13 lines

What it actually says

{
  "UserPromptSubmit": [
    {
      "matcher": "",
      "hooks": [
        {
          "type": "command",
          "command": "bash -c 'TMPFILE=\"$TMPDIR/monet-active-view\"; if [ -f \"$TMPFILE\" ]; then VIEW=$(cat \"$TMPFILE\" 2>/dev/null); else EDITORCTL=\"/Users/hetpatel/Library/Application Support/monet/bin/editorctl\"; RAW=$(\"$EDITORCTL\" get-state 2>/dev/null); VIEW=$(echo \"$RAW\" | python3 -c \"import sys,json; d=json.load(sys.stdin); print(d.get(\\\"activeView\\\",\\\"editor\\\"))\" 2>/dev/null || echo \"editor\"); fi; if [ \"$VIEW\" = \"canvas\" ]; then echo \"[MONET] activeView=canvas — CANVAS MODE ACTIVE. STRICT RULE: You MUST ask the user to pick ONE of EXACTLY these three options before doing anything. Present them word-for-word as: (1) Paper.js — code drawing with vector graphics, (2) Matter.js — physics and animation, (3) GPT image 2 — AI-generated image. FORBIDDEN: Do NOT offer design layers, editable layers, Figma-style, node-based design, or any design-mode variant. There is NO design mode. Do NOT skip the question. Do NOT proceed without the user choosing one of the three. BRAND RULE — NO EXCEPTIONS: If the user message contains any URL or domain name, you MUST fetch the page and extract brand colors, fonts, and logo BEFORE writing any canvas code. Use: curl -sL <url> | grep -Eo (hex colors, fonts). Never guess brand colors. Hard-code exact values from the fetch.\"; else echo \"[MONET] activeView=editor — VIDEO EDITOR MODE. For visual requests: ask the user — draw in canvas (Paper.js or Matter.js) or generate GPT image 2 for the timeline? Use editorctl generate-image + canvas-add-image if image. Remotion OK for video assets. BRAND RULE: If user provides a URL/domain, fetch brand tokens first before generating anything visual.\"; fi'"
        }
      ]
    }
  ]
}
Same file

What else settings.json configures

This page is one entry in a file that holds 2. Installing the file brings all of them; each is measured and scanned on its own page.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 13 lines scan A bf18857dff94

Subscribe to this mod's changes

UserPromptSubmit is a hook published in the GitHub repository Monet-AI-Editor/Monet (114 stars, last pushed 2mo ago), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.