Think-Short — install terse-mode hooks
sonnet install / remove project | globalWhat it does
/brewtools:think-short installs (or removes) a small set of hooks that inject a fixed brevity directive into the Claude Code session. Run the skill with a free-text intent — “make responses shorter”, “stop the preamble” — and it asks via AskUserQuestion whether to apply to the current Project or Globally. It then copies four files into the target hooks directory — three hook scripts and think-short-prompt.md (the directive body) — and registers three hook entries in the appropriate settings.json. The task hook injects the directive by prepending it to the subagent prompt: ${injection}\n\n${tool_input.prompt}.
There are no profiles, no on/off toggle, no blacklist, and no persisted configuration. The only runtime state is an ephemeral per-session counter written to the OS temp directory.
The same directive body is injected at every point:
Be terse. Results first, no preamble/filler/sycophancy. ASCII only.
Grep before Read. Edit over Write. Parallel calls in one message.
Plan the full edit set, then execute.
Keep code simple - do not over-engineer. Before writing anything new,
check existing code and libraries for the needed functionality.
Prefer extending or abstracting a similar class over adding a new one.
When to use
| Situation | Suggested invocation |
|---|---|
| Long automated runs where preamble accumulates across many subagent turns | /brewtools:think-short install in this project |
| Consistent brevity across all projects on this machine | /brewtools:think-short install globally |
| Undo a previous installation | /brewtools:think-short remove |
| Output-heavy sessions where you want periodic reinforcement, not constant injection | Install project-scope — counter hook fires every 10 turns, not every turn |
Examples
Install for the current project:
/brewtools:think-short make responses shorter, install in this project
Install globally (all projects on this machine):
/brewtools:think-short install for all my projects globally
Remove a previously installed instance:
/brewtools:think-short remove the terse hooks
In all three cases the skill calls AskUserQuestion to confirm scope (Project vs. Global) before writing any files.
Workflow
- Run the skill with free-text intent
Any invocation of
/brewtools:think-shorttriggers the skill. The argument is a free-text description of what you want — the skill reads intent from natural language, not flags. - Scope confirmation (AskUserQuestion)
The skill asks: Project (writes to
.claude/hooks/+.claude/settings.json) or Global (writes to~/.claude/hooks/+~/.claude/settings.json). No files are written until you answer. - Hook files copied to target directory
Four files are copied: three hook scripts (
think-short-session.mjs,think-short-prompt-counter.mjs,think-short-task.mjs) andthink-short-prompt.md(the directive body text each hook reads at runtime). For global scope, writes go via Bash (theWritetool is blocked on~/.claude/*in all permission modes). - Entries merged into settings.json
Three hook registrations are added to the matching
settings.json— one per hook file. Existing entries from other skills are preserved. - Hooks active from the next session start
The
SessionStarthook fires immediately on the next Claude Code session. The counter and Task hooks are active for the same session. Removal is the mirror: re-run the skill, confirm, and all four copied files plus their settings entries are stripped.
Delegation
Warning
A big task handed to one agent = an agent gone for an hour. You cannot observe it, you cannot correct it, and it usually drifts off-target. Install or remove for one target is one bounded unit — 4 asset files plus one settings.json, well under 10 steps — so it is a single brewcode:hook-creator spawn. A wider request (“install here AND globally AND clean three other repos”) is split into N tasks, one per target, all spawned in a single message.
The spawn prompt carries six fields. A bare one-line task is never enough:
| Field | Content |
|---|---|
| GOAL | the user wants terse-mode hooks installed or removed for this target; pure file + settings wiring |
| ROLE | own the file copy/strip and the settings.json merge — never edit hook logic or unrelated settings keys |
| SCOPE | in — the 4 assets, the target .claude/ dir, its settings.json; global target is Bash-only (protected path) |
| CONTEXT | the plugin cache is already verified and every path resolved; nothing copied yet, no sibling writer |
| CONSUMER | the settings file is loaded by the next Claude Code session — a malformed merge breaks that session, not this one |
| DONE | which hooks were installed or removed, plus the exact settings.json path touched |
That CONSUMER line is the reason the agent must report the exact path: the failure surfaces one session later, so it has to be checkable now.
How it works
Three hooks are installed, each targeting a different injection point:
| Hook | Event | Behavior |
|---|---|---|
think-short-session.mjs | SessionStart | Injects the full directive; resets the per-session prompt counter in $TMPDIR; prunes stale counters from prior sessions |
think-short-prompt-counter.mjs | UserPromptSubmit | Injects the directive on every 10th user prompt (turns 10, 20, 30 — never turn 1, which is covered by SessionStart) |
think-short-task.mjs | PreToolUse:Task|Agent | Injects the full directive into every spawned subagent; coexistence-safe (see below) |
The counter hook keeps injection periodic, not per-turn. Turns 2–9 run without re-injection; at turn 10 the hook fires again to reinforce brevity after context drift.
Installation targets
| Scope | Hook files written to | Settings file updated |
|---|---|---|
| Project | .claude/hooks/ | .claude/settings.json |
| Global | ~/.claude/hooks/ | ~/.claude/settings.json (via Bash) |
Global installs use the Bash tool for all file operations because ~/.claude/* is a protected path — the Write and Edit tools are blocked there in every permission mode, including bypassPermissions.
Task hook injection
Note
think-short-task.mjs fires on PreToolUse:Task and injects the directive by prepending it to the subagent prompt: ${injection}\n\n${tool_input.prompt}. Plugin paths resolve natively via ${CLAUDE_PLUGIN_ROOT} at Task spawn — no coordination between hooks or shared module dependency is required.
Removal
Re-run the skill and describe removal intent. The skill deletes all four copied files (the three hook scripts and think-short-prompt.md) and strips the corresponding three entries from settings.json. It does not touch entries added by other skills or plugins.
Manager
Installs a HARD wall that blocks main-session edits and forces subagent delegation. Pairs with think-short for focused, low-noise automated runs.
Brewtools overview
All brewtools skills and agents in one place.
GitHub source
Hook scripts, install/remove logic, and coexistence implementation.
Updating plugins
/brewtools:plugin-update to check and update the brewcode plugin suite in one command.
See the FAQ for details.