optim-jev plugin
A plugin that cuts token use in long sessions: prunes stale tool output, picks a subagent model and narrows the skill list.
- 54 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Hooks change the context history and the model subagents start on.
- An external service API key is required and lands in the environment of child processes.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add plugins/optim-jevDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Hooks change the context history and the model subagents start on.
- An external service API key is required and lands in the environment of child processes.
This is third-party code. Review the repository files before installing.
What it does
optim-jev bundles three independent tools built on Jev. `jev-compacter` removes stale tool calls and outputs on `/compact` and auto-compaction instead of summarizing the whole conversation. `jev-router` runs each subagent, Explore searches included, on the cheapest model that fits, within project rules that evolve with your work. `jev-skills` sends a short list of relevant skills with each prompt instead of the whole catalog. All three work in Claude Code, with compaction on by default and the router and skill picker switched on by commands. Compaction style `balanced`, `save-tokens` or `keep-context` is chosen in `/config`. Codex gets the subagent router and an experimental advisory skill mode. Each tool works separately and fails open when unavailable.
Who it is for. People running long Claude Code or Codex sessions who pay for a bloated context and expensive models on small subagents.
Good fit when
- A session runs for hours and the context collects tool output that is no longer needed.
- Subagents searching and reading files need a cheap model but start on the main one.
- The skill catalogue is large enough that its list bloats every prompt.
- You want to see how many tokens compaction and routing saved: `/jev-compact stats` shows session statistics.
Not a fit when
- You have no TypeSafe API key for Jev: the plugin does not work without it.
- Sessions are short and there is no context to save.
- You need cost reports in Codex: measured cost reports exist only for Claude.
Example request
Switch on the subagent router and the skill picker, then show with `/jev-compact stats` how many tokens compaction saved in this session.Limitations
It needs Python 3.10 or newer and a TypeSafe API key for Jev, set in `/config` or the `TYPESAFE_API_KEY` variable. The key is passed to child processes through the environment and never written to project files or logs. Codex does not support compaction because Codex hooks cannot replace live conversation history. Codex needs CLI 0.162.1 or newer, and after installation you open `/hooks`, review and trust every optim-jev hook, then restart Codex. Measured cost reports are available only in Claude Code. The router and skill picker are off by default.
How to disable. In Claude Code remove the plugin through `/plugin`. For Codex switch the tool off with `optim-jev codex off` and remove the hooks in `/hooks`. Delete the TypeSafe key from `/config` and from environment variables.
FAQ
How do I install optim-jev in Claude Code?
Clone the repository, then run `claude plugin marketplace add ./optim-jev` and `claude plugin install optim-jev@optim-jev`. Set the TypeSafe key in `/config` or `TYPESAFE_API_KEY` and restart Claude Code.
How do I install optim-jev for Codex?
Install the package with `py -3 -m pip install "https://github.com/Oqura-ai/optim-jev/archive/refs/heads/main.zip"`, then run `optim-jev codex install` and `optim-jev codex setup`. Trust the hooks in `/hooks` on the first Codex launch.
Which tools are enabled out of the box?
Only `jev-compacter` in Claude Code. The `jev-router` router and the `jev-skills` picker are off by default and are enabled with commands such as `/jev-skills on` and `/jev-skills scope project`.
How do I set the compaction style?
Open `/config`, the optim-jev section, and pick a style: `balanced`, `save-tokens` to prune earlier or `keep-context` to keep more.
What happens if the Jev service is unavailable?
Each tool fails open: the request passes through without optimization. The plugin uses only the Python standard library.
Discussion
No questions or reviews yet.
Related
PluginsA local proxy and plugin for Claude Code and Codex that trims tool output, keeps the prompt cache warm and shows the savings
The Jev classifier as an agent tool: labels items, answers yes or no and ranks candidates with probabilities within milliseconds.
A Claude Code plugin that prunes stale tool calls instead of summarizing old history and keeps everything else verbatim
claude-mods adds 112 skills, 3 agents and 3 commands to Claude Code: stacks, agent operation, defense, session continuity.
Microsoft Research and UC Berkeley plugin that cuts the cost of Claude Code, Codex and Copilot CLI sessions using earlier sessions
A Claude Code skill that hands bulk sorting of files, logs and tickets to the fast Jev model to cut Claude token use
README in short
The README opens with a promise to spend fewer tokens without changing habits. Three tools are laid out in a table: where they work and whether they are on by default. Then come Claude Code installation, Codex support and links to detailed guides for each tool.