What do you want to do?
4 use cases
-
Get safe /compact hints or automatic compaction in Pi
Install Compact Adviser in Pi so it suggests or runs /compact at good stopping points.
- Compact Adviser
- Software and DevOps
- Intermediate
View prompt
Install the compact-adviser package in Pi on <target machine>: run `pi install npm:compact-adviser`, set TYPESAFE_API_KEY, then run `/compact-adviser status`. Expected output: a status line reporting a key source of env, saved, or .env. Verify that the key source is not missing before reporting success.
-
Add /compact advice and optional auto-compact to Claude Code
Install the Compact Adviser plugin in Claude Code with function hooks enabled.
- Compact Adviser
- Claude Code
- Software and DevOps
- Intermediate
View prompt
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.
-
Get hint-only /compact advice in Codex CLI on macOS or Linux
Install the Compact Adviser hook in Codex CLI to see a compact hint after each finished turn.
- Compact Adviser
- Codex
- Software and DevOps
- Intermediate
View prompt
Install compact-adviser in Codex CLI on <target macOS or Linux machine>: add the kunchenguid/compact-adviser marketplace, add compact-adviser@compact-adviser, then restart and trust the hook in /hooks. Expected output: a Compact adviser hint line appears after a completed turn. Verify the hook is trusted before reporting success.
-
Turn off Compact Adviser for unattended agent runs
Set COMPACT_ADVISER_DISABLE so scripted or background sessions skip all advice and compaction.
- Compact Adviser
- Software and DevOps
- Beginner
View prompt
For the unattended agent job on <target host>, export COMPACT_ADVISER_DISABLE=1 in the job environment before launching the session. Expected output: the echoed variable value is 1 and the session produces no compact-adviser hints. Verify the value is 1 before the session starts.
How to use Compact Adviser
- Check you have what it needs: 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.
- Open kunchenguid/compact-adviser on GitHub and read the README and license.
- Confirm Node 22 or newer is installed and that Pi is version 0.82.0 or newer.
- Run
pi install npm:compact-adviser. - Provide your TypeSafe key with TYPESAFE_API_KEY in the launch environment, or save it through the /compact-adviser settings.
- Restart Pi or run
/reload, then run/compact-adviser statusand confirm it showsKey: env,Key: saved, orKey: .env.
These steps come from our top use case, Get safe /compact hints or automatic compaction in Pi, which also has a copy-paste agent prompt.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeCompact Adviser alternatives · Best AI repos for Software and DevOps
About this repo
- Who it is forDevelopers who run long coding-agent sessions in Pi, Claude Code, Codex CLI, or Grok Build and want to know when compacting context is safe.
- Why it is hot
- LanguageTypeScript
- Sourcegithub.com/kunchenguid/compact-adviser · Back to Hot repos
Requirements
- 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
Maintain Compact Adviser? Add the Featured on Deduped badge
Paste this into your README:
[](https://dedupedai.com/use-cases/kunchenguid-compact-adviser/?ref=badge)
Questions about Compact Adviser
What is Compact Adviser?
compact-adviser is an agent plugin for Pi, Claude Code, Codex CLI, and Grok Build that uses the TypeSafe Jev model to judge whether a session is at a safe point to run /compact. It is an open-source project on GitHub: https://github.com/kunchenguid/compact-adviser.
Who is Compact Adviser for?
Developers who run long coding-agent sessions in Pi, Claude Code, Codex CLI, or Grok Build and want to know when compacting context is safe.
What can I do with Compact Adviser?
4 use cases so far, for example: Get safe /compact hints or automatic compaction in Pi; Add /compact advice and optional auto-compact to Claude Code; Get hint-only /compact advice in Codex CLI on macOS or Linux. Each has steps and a copy-paste agent prompt.
What do I need to run Compact Adviser?
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.
What are alternatives to Compact Adviser?
Other hot AI repos in Software and DevOps: Harness2, iFixAi, Orca, Diagram Design, AI Memory.
Is Compact Adviser safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.