Start a prompt with + and that turn thinks at max effort. Other prompts keep the session's effort.

A Claude Code mod: start a prompt with + and that turn thinks at max effort. Other prompts keep the session's effort.
❯ +plan the refactor of the parser
Claude gets plan the refactor of the parser, without the +, and every model request of that turn asks for max effort. Models without an effort setting are left alone.
/plugin marketplace add midudev/better-claude
/plugin install think-hard@better-claude
One hooks module (hooks/register.ts): prompt.submit marks the turn and drops the +, turn.step sets effort: 'max' on each request of a marked turn, turn.complete clears the mark.
claude plugin validate . # from this folder
claude plugin test . # runs hooks/register.test.ts against the engine
MIT © Miguel Ángel Durán (midudev)
hooks/register.ts 24 lines1import type { Register } from 'claude-code'
2
3const MARK = '+'
4
5// Set by the prompt that starts the turn, cleared when the turn ends.
6let hardTurn = false
7
8export const register: Register = on => {
9 on('prompt.submit', ($, e, next) => {
10 hardTurn = e.text.startsWith(MARK)
11 return next(hardTurn ? { ...e, text: e.text.slice(MARK.length).trimStart() } : e)
12 })
13
14 on('turn.complete', ($, e, next) => {
15 hardTurn = false
16 return next(e)
17 })
18
19 // Every model request of a marked turn asks for max effort, when the model takes an effort at all.
20 on('turn.step', async function* ($, e, next) {
21 return yield* next(hardTurn && e.effort !== undefined ? { ...e, effort: 'max' } : e)
22 })
23}
24