Devin
Install from a checkout
Section titled “Install from a checkout”git clone --depth 1 https://github.com/alexgreensh/token-optimizer.gitcd token-optimizerbash install.sh --devin --dry-runbash install.sh --devinpython3 -I "$HOME/.config/devin/token-optimizer/plugin/devin_doctor.py" --probeFor automatic compression run bash install.sh --devin --auto instead (see below).
POSIX and Python are required; native Windows is refused. WSL uses the Linux home. The installer owns only ~/.config/devin/skills/token-optimizer-output/ and the private ~/.config/devin/token-optimizer/plugin/ payload. Without --auto, host config, foreign skills and hooks remain unchanged. Absolute XDG/namespaced home overrides must remain inside HOME.
Installation records consent: filtering/passthrough/recovery may show confidential capture contents to Devin/model context; numeric metrics remain local. A raw passthrough removes its capture after delivery; a compressed result keeps its capture for recovery until you delete it or uninstall with --purge. Other imported hooks may create their own copies. No auto-approval fields are installed in the skill.
Run devin skills show token-optimizer-output to check the selected source and Triggers: user. A same-named project skill can shadow the global skill. Doctor’s probe is local, not a live Devin model test.
Automatic mode
Section titled “Automatic mode”bash install.sh --devin --autoThis wires two hooks into the hooks key of ~/.config/devin/config.json, so large command output is compressed automatically in Devin CLI (interactive and -p) with no new prompts. Only commands your own user-level Devin allow rules already run without a prompt are compressed (a project’s .devin/ rules can only make it stricter; unquoted globs, ~ and # run natively); commands Devin asks about still ask. --auto records your statement that no Devin team or enterprise permission policy applies, because those policies are not stored locally and cannot be checked. --manual removes the hooks and keeps the skill, install.sh --devin alone stays manual-only, and a plain reinstall keeps the active mode. A JSONC config with comments is refused (the skill still installs). Mac and Linux only.
Restart running Devin sessions after installing. Run python3 -I "$HOME/.config/devin/token-optimizer/plugin/devin_doctor.py" --probe to prove the round trip: rewrite, one-time approval, other calls still prompting, and sizes; it also reads Devin’s log for loaded global hooks. If Python is upgraded to a new Homebrew versioned path, doctor flags it; rerun the install. Verified over ACP with both the CLI agent and the agent bundled in Devin Desktop.
Desktop: Devin Local
Section titled “Desktop: Devin Local”Install in the same POSIX HOME/environment used by Desktop’s local agent. Select Devin Local, enabling it in Devin User Settings > Agents and restarting if needed. Enterprise plans may need an admin to enable it; Restricted Mode disables agents. Open Customizations from the new-tab menu or the right-click menu on a Devin Local session in the agent sidebar to verify the selected user skill, then invoke /token-optimizer-output explicitly. Cascade and other ACP agents are not covered. Desktop’s bundled agent was exercised on macOS (skill listed and run over its ACP interface); the Desktop window itself was not.
For loader overrides, WSL boundaries, diagnostics and current limitations, see the full Desktop contract and the repository’s devin/README.md. Primary Desktop contract.
Capture workflow
Section titled “Capture workflow”Read the repository’s devin/README.md for the exact prepare, native redirection, seal and filter sequence. Use new pre-created 0600 files for each completed foreground command; never background the producer or run interactive input through capture. Do not display full successful output before filtering. Small output should skip this workflow because orchestration can outweigh reduction.
Remove
Section titled “Remove”bash install.sh --devin --uninstallbash install.sh --devin --uninstall --purgeUninstall removes only unchanged owned files, plus Token Optimizer’s own hook entries if automatic mode was on; every other hook and key stays. Purge additionally removes metrics/SQLite sidecars, private salt, consent and stored captures. Changed installed files are preserved and removal is refused. To stop activation manually, move only your edited token-optimizer-output skill directory out of Devin’s search paths. See Devin limits.
