Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By phuquocchampv0.1.0MITIn 1 marketplace
Context advice at turn boundaries: focuses Claude Code's own autocompact on the plan, decisions and changed files, and suggests compacting, clearing for a new task or switching model, with Jev (Haiku fallback) making the judgement calls. Starts in shadow mode.
Code that runs inside Claude Code on every session, as you, unsandboxed.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Advice modemode
shadow: log every verdict, show no advice. on: show advice at turn boundaries. off: do nothing. /q-advisor on|shadow|off overrides it.
One of shadow, on, off
stringdefault shadow
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it makes network requests; reads environment variables (TYPESAFE_API_KEY); runs commands; calls a model on your account; reads or rewrites your prompts.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
TypeSafe Jev API keyjevApiKey
Optional. Sent only in the Authorization header to api.typesafe.ai. Empty: TYPESAFE_API_KEY from the environment, else Haiku decides.
SensitivestringOptional
Focused autocompactfocusCompact
on: when Claude Code compacts on its own, add focus instructions (plan, decisions, changed files, open questions). off: leave autocompact untouched.
One of on, off
stringdefault on
Part of q-harness, a collection of Claude Code plugins by phuquocchamp
Is this still the right model, the right session, and enough room in the context? q-advisor watches the session and, at the moment it matters, suggests one thing: compact with a focus, start fresh for a new task, or switch model. It also focuses Claude Code's own autocompact on the plan, the decisions and the changed files. The numbers come from rules over the session; the judgement calls come from TypeSafe's Jev (the "System 1" of the harness), with Haiku as the fallback when there is no Jev key.
Status Built, starts in shadow mode (it logs every verdict and shows no advice until you switch it on) · Version 0.1.0 · Author phuquocchamp
Three things quietly go wrong in long sessions:
| Problem | What it costs you |
|---|---|
| The context fills up, autocompact fires mid-task and keeps the wrong things | Claude forgets the plan, the files it changed, the decision you made an hour ago |
| A new task starts in an old session | Every turn pays for (and is distracted by) unrelated history |
| The model doesn't fit the task: Opus for renaming a variable, Haiku for an architecture call | Money and rate limit, or quality |
Claude Code shows the raw numbers (/context, /cost, the status line) but leaves the decision to you, at a time you are not looking. q-advisor makes the decision visible at the right moment and leaves the action one key away.
| Component | What it is |
|---|---|
Mod (hooks/register.tsx, helpers in hooks/lib/) | The advice engine, the focused autocompact, the band above the prompt, /q-advisor and the shadow log |
/plugin install q-advisor --marketplace phuquocchamp/q-harness
Set them in /plugin (or under pluginConfigs["q-advisor"].options in your user settings).
| Option | Default | What it does |
|---|---|---|
jevApiKey | empty | TypeSafe Jev API key. Stored as sensitive and sent only in the Authorization header to api.typesafe.ai. When empty, TYPESAFE_API_KEY from the environment is used; when that is unset too, Haiku makes the calls. |
mode | shadow | shadow: log every verdict, show no advice. on: show advice at turn boundaries. off: do nothing. /q-advisor on|shadow|off overrides it (saved). |
focusCompact | on | on: when Claude Code compacts on its own, add focus instructions. off: leave autocompact untouched. |
More keys are set with /q-advisor config <key> <value>:
| Key | Default | Meaning |
|---|---|---|
compactAt | 60 | Context % from which "compact now" is advised, if the task is finished |
urgentAt | 80 | Context % from which "compact before autocompact" is advised |
focusAt | 70 | Context % from which the focus text is prepared in advance |
newTaskAt | 30 | Context % below which a new task is not worth a /clear |
freshAfter | 3 | Compactions after which a fresh session is advised |
rateLimitAt | 80 | Rate-limit % from which the cheaper model is advised |
quietTurns | 3 | Minimum turns between two pieces of advice |
minPromptChars | 25 | Shorter prompts are never sent to Jev |
jev | on | off: nothing leaves the machine; rules only |
jevModel | jev-latest | The Jev model name |
thresholds.relation .size .finished .keep | 0.9 0.7 0.7 0.5 | Probability a verdict must reach before it may drive advice (from live probes) |
/q-advisor config <key> reset restores one key. /q-advisor config lists every value and where it came from.
Rules decide the numbers; Jev makes the judgements; Haiku writes the text. Jev cannot generate text.
| Who | Decides |
|---|---|
Rules ($.session.usage) | Context %, rate limits, compaction count, turns |
Jev (api.typesafe.ai/v1/systemone) | relation (continuation, new task or side question), size (trivial, routine or deep), finished (is the task done), and a keep-score for each candidate item of the focus |
Haiku ($.model.complete, standalone, no history) | The focus text for compact and the handoff note for /clear |
npx claudepluginhub phuquocchamp/q-harness --plugin q-advisorBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.