
Daily Digest
Suggest the right effort before the turn starts
Suggest effort before the turn — you still flip the dial.
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:
- Claude Code —
UserPromptSubmitcommand hook. Reads the prompt from stdin JSON, printsadditionalContextwithRECOMMEND effort=…. Never blocks (always exit 0). If current effort (fromCLAUDE_EFFORToreffort.level) disagrees, the context saysrun /effort <level>. - 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.jsonMerge 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 blockOptional: 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 mediumTune 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):
| Check | Result |
|---|---|
| Classifier vs 16 gold prompts | 16/16 exact |
| Hook stdin sim (low / medium / high) | exit 0; correct level; mismatch text when current=medium |
Cursor CLI suggest-effort.mjs | same 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
/effortor change Cursor thinking effort. - Regex classifiers miss novel phrasing; start simple, log misses, add patterns.
- Do not
exit 2on this hook — you would block the user's prompt. - Writing
settings.local.jsonfrom a hook can auto-apply effort on some builds; treat that as advanced and verify on your Claude Code version (settings acceptlow|medium|high|xhigh, notmax).
Try it
- Copy
hooks-kit/to a scratch project root. - Merge the settings snippet; restart Claude Code — or drop the
.mdcinto Cursor. - Send three prompts: subject lines (expect low), LinkedIn from transcript (medium), Stripe reconcile (high).
- When you see a mismatch line, run
/effortonce 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)