Alignata
Daily DigestShare
A person with dark navy hair and round glasses in a coral vest reaches for the knob of a teal door, beside a wall signal with its yellow light glowing, with stars and confetti around him.

Daily Digest

Suggest the right effort before the turn starts

Suggest effort before the turn — you still flip the dial.

Daily Digest · Edited by Osbel Morell

The problem

You know low is for polish and high is for verify. You still forget. The session stays on high through a brainstorm, or stays on medium through a Stripe reconcile. The companion technique (model vs effort) only helps if something reminds you before the expensive turn.

Claude Code and Cursor both let you automate a suggestion. Neither gives you a perfect "set effort from this prompt" API out of the box. So the useful build is: classify fast, inject a one-line recommend, ask for /effort (or the Cursor picker) when it mismatches.

The technique

Share one classifier. Attach it two ways:

  1. Claude Code — UserPromptSubmit command hook. Reads the prompt from stdin JSON, prints additionalContext with RECOMMEND effort=…. Never blocks (always exit 0). If current effort (from CLAUDE_EFFORT or effort.level) disagrees, the context says run /effort <level>.
  2. Cursor — always-on rule that runs the same classifier via CLI and surfaces the line before substantial work. Cursor has no prompt-submit hook, so the rule is the harness.

Classifier order (stop at first yes): low → high → xhigh → medium, matching the decision tree in the companion piece.

Honest limits up front: a hook cannot return a new effort field today (open issue). Some community kits write effortLevel into .claude/settings.local.json for a hot-reload; that is a side channel, not official hook output. This technique stays on the supported path: suggest + you (or /effort) apply.

Claude Code install

Project layout:

hooks-kit/
  classify.mjs
  claude-code/suggest-effort-hook.mjs
  claude-code/settings.snippet.json

Merge into .claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "node \"${CLAUDE_PROJECT_DIR}/hooks-kit/claude-code/suggest-effort-hook.mjs\""
          }
        ]
      }
    ]
  }
}

Hook core (abbreviated):

import { classify } from '../classify.mjs';
// read stdin JSON → prompt, current effort
const { level, reason } = classify(prompt);
let ctx = `RECOMMEND effort=${level} (current=${current}). Reason: ${reason}.`;
if (level !== current) ctx += ` Mismatch: tell the user to run /effort ${level}.`;
console.log(JSON.stringify({
  hookSpecificOutput: {
    hookEventName: 'UserPromptSubmit',
    additionalContext: ctx
  }
}));
process.exit(0); // never block

Optional: EFFORT_HOOK_PLAIN=1 for plain stdout (also injected as context on this event).

Cursor install

Copy hooks-kit/cursor/effort-suggest.mdc into .cursor/rules/. The rule tells Agent to run:

node hooks-kit/cursor/suggest-effort.mjs "<the user's prompt>"

…and treat a mismatch as a one-line ask before proceeding. Manual check from a terminal works the same way.

Classifier sketch

// low: iterate / options / polish / subject lines / rubric tag / short rewrite / outline
// high: reconcile / verify / check against / contract / fact-check / why did / churn / stakes
// xhigh: unattended|walk away|won't be around AND long|year|full report|critical
// else medium

Tune patterns to your domain; keep the order.

What we saw

Validated the hooks-kit on 31 Oct 2026 (Node only, no live Claude Code or Cursor IDE session):

CheckResult
Classifier vs 16 gold prompts16/16 exact
Hook stdin sim (low / medium / high)exit 0; correct level; mismatch text when current=medium
Cursor CLI suggest-effort.mjssame three prompts correct

Not tested: installing into a real Claude Code UI session and watching the system reminder appear. The stdin contract matches Anthropic's UserPromptSubmit docs (additionalContext + plain stdout). Cursor path is rule+CLI by design.

Limits

  • Suggestion ≠ enforcement. You still run /effort or change Cursor thinking effort.
  • Regex classifiers miss novel phrasing; start simple, log misses, add patterns.
  • Do not exit 2 on this hook — you would block the user's prompt.
  • Writing settings.local.json from a hook can auto-apply effort on some builds; treat that as advanced and verify on your Claude Code version (settings accept low|medium|high|xhigh, not max).

Try it

  1. Copy hooks-kit/ to a scratch project root.
  2. Merge the settings snippet; restart Claude Code — or drop the .mdc into Cursor.
  3. Send three prompts: subject lines (expect low), LinkedIn from transcript (medium), Stripe reconcile (high).
  4. When you see a mismatch line, run /effort once and notice whether the next turn feels right.

Sources

  • Claude Code hooks reference — UserPromptSubmit, additionalContext
  • Claude Code model configuration — effort settings; skill effort: frontmatter
  • Companion: Pick model for what it knows, effort for how involved you want to be
  • Alignata hooks-kit (validated 31 Oct 2026; ships with this technique)

Found this useful? Send it to someone.

Share