winnow plugin

A Claude Code plugin that hides large output blocks a judge model deems unneeded and leaves a key to restore the full text.

  • 115 ★ on the repository
  • Last commit
  • MIT
Plugin

Broad access

Why this level

  • File contents and command output pass through external TypeSafe or Anthropic services, and they may contain secrets.
All reasons and checks

ghalebdweikat/winnow

Install

Works in

In your terminal, with SkillFoxx CLI

npx skillfoxx add plugins/winnow

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • File contents and command output pass through external TypeSafe or Anthropic services, and they may contain secrets.

This is third-party code. Review the repository files before installing.

What it does

winnow evaluates every large Read, Bash or Grep result before it enters Claude's context. The result is cut into blocks of about 25 lines, and a judge returns a probability for whether each block is needed for the current task. Blocks the judge is confident are unneeded are replaced with a three-line stub: what is hidden, a short summary from a cheap model and a key that brings the full text back via the winnow_recall call. If the judge thinks the output shows an error, nothing is hidden, and uncertain blocks are kept. A second hook at prompt time ranks Claude Code memory files and directories from WINNOW_CONTEXT_DIRS against the prompt. Files on disk, executed commands and the Claude Code transcript are untouched, and only what the model sees changes. The full text of hidden output is kept in ~/.winnow/cache/.

Who it is for. Claude Code users with large repositories and long logs whose context fills up with command output.

Good fit when

  • Reading a huge file fills the context while only a part of it is needed.
  • A repository-wide grep returns hundreds of matches, most of them off topic.
  • A test log is long and only the error line matters.
  • The agent must bring back a hidden block by key once it turns out to be needed.

Not a fit when

  • File contents and command output must not go to an external service: result blocks are sent to the judge.
  • Claude Code is older than 2.1.260 or lacks function hooks.
  • Outputs are small: the size threshold skips them and nothing is saved.

Example request

Read the large log file and return only what relates to the test failure; restore hidden blocks by key if needed.

Limitations

Python 3.10, uv and Claude Code 2.1.260 or newer with CLAUDE_CODE_ENABLE_FUNCTION_HOOKS enabled are required: it is early access, and without it the plugin does nothing. The Jev judge from TypeSafe AI needs a waitlist signup and a key, while the WINNOW_JUDGE=adapter alternative goes through Claude Haiku 4.5 and an Anthropic key but its probabilities are not calibrated. Output blocks and a task description go to the judge, and hidden blocks go to Anthropic for summaries. The cache of hidden text does not clean itself.

How to disable. Remove the plugin with claude plugin uninstall winnow, drop CLAUDE_CODE_ENABLE_FUNCTION_HOOKS from settings and, if you like, clean ~/.winnow/cache/ with winnow clean.

FAQ

How do I install winnow?

Enable `CLAUDE_CODE_ENABLE_FUNCTION_HOOKS` in `~/.claude/settings.json`, then run `claude plugin marketplace add GhalebDweikat/winnow` and `claude plugin install winnow@winnow`.

How do I check that the plugin works?

Open a new session and read a file longer than 1500 characters. A `[winnow]` line in the result means it works. `winnow doctor` runs diagnostics.

What if I have no Jev key?

Add `WINNOW_JUDGE=adapter` to `~/.winnow/env` so Claude Haiku 4.5 acts as the judge through your Anthropic key. Without keys you can try `winnow demo --fake`.

How do I restore a hidden block?

Call `winnow_recall` with the key from the stub and a line range, for example `start=41, end=188`.

What stays untouched?

Files on disk, executed commands and the Claude Code transcript do not change. Only what enters the model context changes.

Discussion

No questions or reviews yet.

Plugins

The context-optimizer plugin shows Claude session cost, trims context and hands file reads and tests to cheap Haiku agents.

PluginExtended access130Repository stars

An installer for a set of hooks, commands and plugins that compress tool output and save tokens in Claude Code.

WorkflowBroad access95Repository stars

A Claude Code plugin with hooks and 26 skills: measures what the agent knows, blocks edits until code is read, keeps memory

PluginExtended access255Repository stars

A Claude Code plugin that switches session modes with /work-mode: autonomous work, delegation and converging wrap-up.

PluginExtended access177Repository stars

A Claude Code plugin that replaces built-in file tools with lighter versions so a session spends fewer tokens

PluginExtended access209Repository stars

A local proxy and plugin for Claude Code and Codex that trims tool output, keeps the prompt cache warm and shows the savings

PluginBroad access74Repository stars

README in short

The documentation explains the judge and stub scheme and includes a table of data leaving the machine. Experiment results on calibration are alongside. The repository works as its own plugin marketplace.

README badge

Report a problem