optimize-context

A skill for reducing the context and token load used in each turn. Context is the information an AI assistant receives while working, and tokens are the text units used to process it.

In plain words
What is it for?
Use it when trimming kernels, skills, or connectors, or when applying a general context reduction to the starter.
Why use it?
It helps keep work within context limits and reduces unnecessary material sent to the assistant.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ryanportfolio/winuse-mcp/optimize-context
Any agent
npx skills add ryanportfolio/winuse-mcp --skill optimize-context
Clone the repo
git clone --depth 1 https://github.com/ryanportfolio/winuse-mcp

Made for: Claude Code, Codex.

Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 295 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.00295
Opus 5 $0.00018 $0.00148
Sonnet 5 $0.00007 $0.00059
Haiku 4.5 $0.00004 $0.00030

Measured 2d ago against content hash e6b7fcc2a862, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

optimize-context scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/optimize-context/SKILL.md · 19 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 19 lines · 36 tokens per session scan A e6b7fcc2a862

Subscribe to this mod's changes

optimize-context is a skill published in the GitHub repository ryanportfolio/winuse-mcp (0 stars, last pushed 4d ago), with no licence file. It adds 36 tokens to every session and 295 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

open-computer-use

Platform-neutral guidance for using Open Computer Use, the open-source Computer Use MCP server and CLI for macOS, Linux, and Windows. Use when an agent needs to install, verify, troubleshoot, configure, or operate Open Computer Use through its native CLI, stdio MCP server, or direct Computer Use tool calls.

iFurySt/open-codex-computer-use · 68 tokens

desktop-gui-inspect

Full-desktop automation for targets that have no browser and no API at all — a legacy Java-based NMS client, a vendor's Windows-only configuration utility, a terminal emulator with no scriptable interface. Drives OpenClaw's ClawHub computer-use skill (Xvfb+XFCE virtual desktop, xdotool input automation) to read…

automateyournetwork/netclaw · 143 tokens

data-analysis

Analyze, explore, clean, and visualize datasets with statistical rigor. Use when user asks to analyze data, find patterns, compute statistics, create visualizations, clean messy data, or explore a dataset. Trigger when user says things like "analyze this data", "what trends do you see", "find patterns in", "create a…

Upsonic/Upsonic · 138 tokens

cli-docs-guidelines

Review or write CLI documentation. Enforces progressive disclosure, logical command ordering, and plain-language explanations. Use when asked to "write CLI docs", "document commands", "review CLI reference", or "update command docs".

CelestoAI/SmolVM · 50 tokens

readme-guidelines

Review or write README content for open-source projects. Enforces progressive disclosure, jargon-free language, and single-concept code examples. Use when asked to "write README", "review README", "update README", or "check docs".

CelestoAI/SmolVM · 52 tokens

experiment_management

Set up and manage the experiment folder structure. This is Phase 0 — it runs before any analysis begins. All bookkeeping files are JSON (never markdown).

Upsonic/Upsonic · 0 tokens