Credentials. Your TypeSafe key is saved through Claude Code settings or the environment, and checkpoint context is sent to TypeSafe for judgment.
Who it is forA developer using Claude Code on long tasks who wants compaction timed to natural break points instead of guesswork.
The problemClaude Code's context fills up during long tasks, and compacting in the middle of unfinished work can cost context that the next turn needs.
The outcomeClaude Code shows /compact-adviser settings, and the adviser hints or compacts at a settled turn depending on the mode you pick.
What you need first
- Node 22 or newer (22.18 or newer for Codex and Grok)
- One supported host: Pi 0.82.0 or newer, Claude Code 2.1.274 or newer, Codex CLI 0.153.0 or newer, or Grok Build 1.0.34 or newer
- A TypeSafe API key, supplied as TYPESAFE_API_KEY in the launch environment, a cwd .env file, or saved through the host settings where supported
Steps
- Confirm Claude Code is version 2.1.274 or newer and Node 22 or newer is installed.
- Run
claude plugin marketplace add kunchenguid/compact-adviser. - Run
claude plugin install compact-adviser@compact-adviser. - Start Claude Code with
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude, since the variable must be exactly 1 for the mod to load. - Run
/compact-adviser, save your TypeSafe key through the settings or environment, then run/compact-adviser statusto check the key source.
Prompt for your agent
In Claude Code on <target machine>, add the kunchenguid/compact-adviser marketplace, install compact-adviser@compact-adviser, and start claude with CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1. Expected output: the /compact-adviser command appears and /compact-adviser status reports a key source. Verify that the environment variable is exactly 1 before reporting success.
Caveat. The README marks Claude Mod as an experimental feature, and CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC will block the plugin's network requests.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page