by kunchenguid
"Work appears completed or recorded. Run /compact to save tokens."
# Add to your Claude Code skills
git clone https://github.com/kunchenguid/compact-adviserGuides for using ide extensions skills like compact-adviser.
Last scanned: 9/19/2026
{
"issues": [
{
"file": "README.md",
"line": 37,
"type": "secret-exfiltration",
"message": "Instruction appears to send credentials/secrets to an external endpoint",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-09-19T08:33:00.464Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how compact-adviser compares with popular alternatives.
compact-adviser is an open-source ide extensions skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by kunchenguid. "Work appears completed or recorded. Run /compact to save tokens.". It has 201 GitHub stars.
Yes. compact-adviser passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/kunchenguid/compact-adviser" and add it to your Claude Code skills directory (see the Installation section above).
compact-adviser is primarily written in TypeScript. It is open-source under kunchenguid on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other IDE Extensions skills you can browse and compare side by side. Open the IDE Extensions category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh compact-adviser against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
compact-adviser is an agent plugin that answers a single question: should I /compact now?

It uses Jev to instantly judge whether the current session is likely at a boundary that's safe to compact.
It can give you a hint to run /compact - or, on Pi and Claude Code, if you opt in, it can run it for you at the right time automatically. Codex CLI and Grok are hint-only: nothing outside their sessions can trigger /compact.
Judgment is two one-sentence Jev questions in one request (is the unit finished; is this hands-on work or coordination), composed in code into one score. The hint floor is 0.90 while the context is mostly empty (through about 10%) and relaxes toward 0.50 by about 90% full - a wrong hint costs most when there is still room. "Full" means the point where the host compacts: on Claude Code that is its auto-compact threshold when enabled, elsewhere the model's window. If you would rather compact well before that (long contexts cost more every turn), set a context budget: the floor then relaxes as the context approaches the smaller of your budget and that point. Automatic mode is the same gate, plus a first-use confirmation.
Prerequisites: Node 22+ (22.18+ for Codex and Grok), and one of Pi 0.82.0 or newer (verified on 0.85.1), Claude Code 2.1.274 or newer (verified on 2.1.275), Codex CLI 0.153.0 or newer (verified on 0.153.4), or Grok Build 1.0.34 or newer (verified on 1.0.34), plus a TypeSafe API key. Supply it as TYPESAFE_API_KEY in the launch environment or put it in the session cwd's ./.env; Pi and Claude Code can also save it through their settings, while Codex and Grok provide an external compact-adviser CLI. Jev is TypeSafe's structured decision model; this package asks it two one-sentence classification questions and never asks it to write a summary.
Installing the package is consent to send eligible checkpoint context to TypeSafe when a key is available and the other product gates pass. With TYPESAFE_BASE set, that context and the key go to that base instead.
pi install npm:compact-adviser
Restart Pi or run /reload, then /compact-adviser.
/compact-adviser status should say Key: env, Key: saved, or Key: .env.
To install from git: pi install git:github.com/kunchenguid/compact-adviser (add -l for project-local).
This plugin uses Claude Mod which is an experimental feature that requires CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in your environment.
claude plugin marketplace add kunchenguid/compact-adviser
claude plugin install compact-adviser@compact-adviser
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude
Then /compact-adviser.
Codex support is macOS and Linux only. The plugin's hooks run through POSIX sh, matching
this repository's platform badge; Windows is not supported this ship.
codex plugin marketplace add kunchenguid/compact-adviser
codex plugin add compact-adviser@compact-adviser
Restart Codex and review the hook in /hooks once, so it is trusted. After a completed
checkpoint the advice appears as a ↳ Hook · Compact adviser: ... line under the answer.
Codex is hint-only: it has no surface that lets another process run /compact, so there is
no automatic mode there. Settings live in a small CLI instead of a slash command; ask Codex for
"compact-adviser status" and the bundled skill runs it, or run it yourself:
node "$(ls -d "${CODEX_HOME:-$HOME/.codex}"/plugins/cache/*/compact-adviser/*/ | tail -1)src/cli.ts" status
Grok is hint-only: nothing outside a running session can trigger /compact, so there is no automatic mode here. The hint is painted on the status row and never enters the model's context.
grok plugin install kunchenguid/compact-adviser#packages/grok-plugin --trust
(Install from the subdirectory, not the repository root: Grok also reads the Claude marketplace index in this repo, so a plain grok plugin marketplace add offers two plugins of the same name and refuses an unqualified install.)
Then two one-time steps, because Grok does not let a plugin do either of them for you. Start Grok and run:
/compact-adviser-install
That writes ${GROK_HOME:-~/.grok}/hooks/compact-adviser.json, because Grok 1.0.34 lists a plugin's own hooks/hooks.json but never loads it into a session. Hooks in your own Grok home are always trusted, so nothing else is needed; delete that file to remove them. From a shell it is node "$(node -e 'const l=JSON.parse(require("child_process").execFileSync("grok",["plugin","list","--json"],{encoding:"utf8"})); const p=(Array.isArray(l)?l:[]).find(x=>x&&x.name==="compact-adviser"); if(!p||typeof p.path!=="string") throw new Error("compact-adviser is not installed"); process.stdout.write(p.path)')/bin/adviser.ts" install. After install, ${GROK_HOME:-~/.grok}/compact-adviser/adviser.sh resolves the currently installed plugin the same way.
Then paste the [ui.status_line] block install printed into the config.toml path it named and restart Grok. The status row is off by default and only your own config can turn it on - a plugin cannot, and neither can a repository. Grok has one status row, so this script paints the built-in segments (cwd, model, context) too. Minimal render mode has no status row at all.
On Grok, save the TypeSafe key as TYPESAFE_API_KEY or a cwd .env, or with the CLI key command from a shell outside Grok. Do not type secrets after a Grok slash command; Grok appends those words to the model.
| Symptom | Cause |
|---|---|
Key: missing in /compact-adviser status (Pi, Claude Code) or /compact-adviser (Grok) |
No TYPESAFE_API_KEY in the launch environment, saved settings, or the session cwd's ./.env |
No /compact-adviser command in Claude Code |
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS is not exactly 1 |
| Command exists, no hint | Context is below the constant 40,000-token minimum, the session is not idle, or the last turn was not a settled final answer |
| Claude Code: "nonessential traffic" | CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC blocks plugin network requests |
| No hint in Codex | The hook is untrusted (review it in /hooks), Node is older than 22.18, or the hook cannot find Node at all - Codex rebuilds its PATH, so set COMPACT_ADVISER_NODE to an absolute node path |
| Grok: no hint row at all | [ui.status_line] is not set in the config.toml install named, or Grok is in minimal render mode |
| Grok: no hint after a completed turn | /compact-adviser-install has not run, so no Stop hook is judging |
Pi print / RPC / JSON, Claude -p, or codex exec |
The adviser stays inert in reliably detected non-interactive sessions |
| Nothing at all, in any host | COMPACT_ADVISER_DISABLE is set to a truthy value |
| Variable | Effect |
|---|---|
TYPESAFE_API_KEY |
The Jev key; a saved key or the session cwd's ./.env is used when this is unset |
TYPESAFE_BASE |
Replaces the TypeSafe API base URL, https://api.typesafe.ai by default; the request goes to <base>/v1/systemone with a trailing slash dropped. Read from the launch environment only, never a saved setting or ./.env. It must be an https URL; plain http is accepted only for a loopback host (127.0.0.1, [::1], localhost). Any other value, or one that carries credentials, a query or a fragment, is a configuration error: no request and no advice |
COMPACT_ADVISER_DISABLE |
1, true, yes or on (any case) makes the session inert: no TypeSafe request, no hint, no automatic compaction, no command. It wins over a saved hint or auto mode |
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS |
Claude Code only; must be exactly 1 for the mod to load |
COMPACT_ADVISER_NODE |
Codex only; absolute path to a Node 22.18 or newer executable when the hook cannot find one on its rebuilt PATH |
Export COMPACT_ADVISER_DISABLE=1 for unattended agent sessions, where advice has nobody to read it.
| Included | Not sent |
|---|---|
| Bounded user constraints, up to the last 64 visible replies and tool results (clipped), short tool-result excerpts, an existing summary, saved-artifact names, omission markers | System prompts, hidden reasoning, images, environment variables, the API key in the model context and request body, complete transcripts |
| Best-effort redaction of known key patterns and obvious sensitive-file results | A guarantee. Uninstall or set mode Off for material that must not leave the machine |
Requests go to https://api.typesafe.ai/v1/systemone, or <TYPESAFE_BASE>/v1/systemone when that is set, are capped at 32,000 serialized UTF-8 bytes, and never treat an error as an affirmative judgment.
The TypeSafe API key never enters the model context or the request body; it is sent as the Auth