{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "ghalebdweikat-winnow--trim-large-claude-code-tool-results",
 "repo": "GhalebDweikat/winnow",
 "repo_url": "https://github.com/GhalebDweikat/winnow",
 "repo_slug": "ghalebdweikat-winnow",
 "title": "Trim large Claude Code tool results before they fill context",
 "page_title": "How to trim large Claude Code tool results before they fill context with Winnow",
 "summary": "Install Winnow as a Claude Code plugin so big Read, Bash, and Grep outputs are filtered before Claude sees them.",
 "who": "A developer using Claude Code on a large repo whose sessions fill up with long file reads and command output.",
 "problem": "Large tool results add many tokens to context, and most of the lines are not needed for the current task.",
 "outcome": "Low-relevance blocks are replaced by a three-line stub with a summary and a key to restore the full text, and a [Winnow] line marks each rewrite.",
 "steps": [
  "In ~/.claude/settings.json, add { \"env\": { \"CLAUDE_CODE_ENABLE_FUNCTION_HOOKS\": \"1\" } }.",
  "Clone the repo with `git clone https://github.com/GhalebDweikat/winnow.git`, then run `claude plugin marketplace add ./winnow` and `claude plugin install winnow@winnow`.",
  "Put TYPESAFE_API_KEY in ~/.winnow/env, or set WINNOW_JUDGE=adapter with ANTHROPIC_API_KEY to use the adapter.",
  "Run `uv run --project winnow/sidecar winnow doctor` to check which keys were found and whether each backend starts.",
  "Open a new Claude Code session and read a file longer than about 1,500 characters; a [Winnow] line in the result means it is working."
 ],
 "agent_prompt": "Using the winnow repo at <repo path>, install it as a Claude Code plugin and run `uv run --project winnow/sidecar winnow doctor`. Report which judge backend initialized. Then read <target file> in a new session and confirm a [winnow] line appears in the result if the file is longer than 1,500 characters.",
 "agents": [
  "claude-code"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Hidden blocks are judged by an early-access model or by Claude Haiku 4.5 through your Anthropic account, and Winnow changes only what Claude sees, not files on disk.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.10+",
  "uv installed",
  "Claude Code 2.1.260 or newer with function hooks enabled (early access)",
  "A Jev key from TypeSafe, or an Anthropic API key for the adapter judge",
  "Git to clone the repo"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The setup stores API keys in ~/.winnow/env or in ~/.claude/settings.json, so those files must be kept private."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ghalebdweikat-winnow/trim-large-claude-code-tool-results/",
 "md": "https://dedupedai.com/use-cases/ghalebdweikat-winnow/trim-large-claude-code-tool-results/index.md",
 "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 hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ghalebdweikat-winnow--trim-large-claude-code-tool-results.json",
 "api_version": "v1"
}
