Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Real-Time Coaching

Real-time feedback comes from two pieces of the plugin: the submit hook (fast, local, always runs) and the /prism:advisor command (on-demand, LLM-driven). They do different jobs.

Every time you send a prompt, the UserPromptSubmit hook fires before Claude processes the turn. It has a narrow job:

  1. Print the prior turn’s status line (turn count, tokens, cost).
  2. Emit context-management nudges based on turn count and token growth.
  3. Capture the prompt for server-side scoring.

The hook does not score Prompt Efficiency and never blocks your prompt — it always exits 0.

The hook skips status / nudge processing for short or navigational prompts:

  • prompt.length < 10 characters
  • Slash commands — ^/ (e.g. /compact, /clear, /model sonnet)
  • Shell passthrough — ^!
  • Navigational words (case-insensitive): y, n, yes, no, ok, done, thanks, exit, quit, help, continue, go ahead, looks good, lgtm, approve

Prompt capture still runs for these; only the UI-facing nudges are skipped.

Source: optra-prism-plugin/hooks/scripts/submit-handler.js.

ConditionNudge
Turn count > 80 or context grew > 10×Suggests /clear
Turn count > 20 and context grew > 3×Suggests /compact
Every 15 turns (low-priority)Periodic context-check reminder

These print to stderr and appear above your prompt — they don’t modify or delay it.


/prism:advisor — on-demand prompt review

Section titled “/prism:advisor — on-demand prompt review”

Prompt-quality coaching inside Claude Code is on-demand. When you want a review, invoke the command:

Terminal window
/prism:advisor "your prompt text here"

You get a conceptual PES-style scorecard (Information Density, Context Leverage, Turn Economy, Ambiguity Cost), a concrete rewrite using real paths from the project, and a short explanation of why the rewrite is better. Works in any human language — the rewrite is written back in the same language as your prompt, with technical identifiers preserved.

Session context for tailoring the advice is written by the submit hook to ~/.prism/advisor-context.json (turn count, token growth, model mix). If the file is missing, the command still works from conversation context alone.

Automatic, per-session coaching — coaching you don’t have to invoke — runs server-side, not in the plugin. The Prism Engine scores each sub-session, produces advisor cards for the weakest Skill input, and surfaces them on the dashboard and in reports. See Advisor & Summaries.

The prismThreshold value in ~/.prism/config.json (default 4) is exposed to the plugin runtime. The showStatusLine value controls whether the submit hook’s status line is printed above each prompt. Both can be toggled from /prism:status. See the Configuration Reference for the full list of knobs.

{
"prismThreshold": 5,
"showStatusLine": true
}