kit-optimize-context
/kit-optimize-context
Analyze always-on agent context across coding hosts (Cursor, Claude Code, Codex, Gemini CLI, etc.) and suggest token reductions. Use when sessions feel heavy before you type anything.
- Author
- netanelavr ↗
- Repository
- agent-kit ↗
- Licence
- MIT
- Last repository change
- 24.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Analyze always-on agent context across coding hosts (Cursor, Claude Code, Codex, Gemini CLI, etc.) and suggest token reductions. Use when sessions feel heavy before you type anything.
Original author description
Analyze always-on agent context across coding hosts (Cursor, Claude Code, Codex, Gemini CLI, etc.) and suggest token reductions. Use when sessions feel heavy before you type anything.
How it works
- What this is NOT
- 0. Scope the host(s)
- 1. Always-on instructions (per host)
- 2. Skills / commands metadata
- 3. Plugins / MCP / bridges
- 4. Index / VCS noise
- 5. Summary table
- 6. Top 3 quick wins
- Constraints
SKILL.md preview
--- name: kit-optimize-context description: Analyze always-on agent context across coding hosts (Cursor, Claude Code, Codex, Gemini CLI, etc.) and suggest token reductions. Use when sessions feel heavy before you type anything. disable-model-invocation: true --- # Optimize Context Map what loads into an agent session **before the user types**, then recommend cuts. Host-agnostic: detect or ask which host(s) to audit. ## What this is NOT - Not a rewrite of skills/rules content (edit those files directly) - Not cutting extras inside a finished diff (`kit-strip-diff`) - Not installing/uninstalling tools — **read-only** audit ## 0. Scope the host(s) Ask once if unclear: which host to audit — **Cursor**, **Claude Code**, **Codex**, **Gemini CLI**, **OpenCode / other**, or **all present**. Default: audit every host that has a detectable config/skills dir on this machine, plus the current repo’s agent folders. Token heuristic: **chars ÷ 4** unless you can tokenize accurately. Mark estimates. ## 1. Always-on instructions (per host) For each in-scope host, find always-on instruction surfaces **that exist**: | Host | Typical paths / surfaces | |---|---| | Cursor | `<repo>/.cursor/rules/` (`alwaysApply` / requestable), user rules in Cursor settings | | Claude Code | `CLAUDE.md`, `<repo>/.claude/`, `~/.claude/` settings / memory | | Codex | `AGENTS.md`, `<repo>/.codex/`, `~/.codex/` | | Gemini CLI | `GEMINI.md` / `.gemini/` if present | | Shared / other | `AGENTS.md`, `.agents/`, host docs the user names | For each always-on file/rule: - filename/path - ~chars / ~tokens - always-on vs on-demand (how this host decides) - heaviest items - recommendation: keep always-on, split, or move to a skill / on-demand rule Skip missing paths; say what you checked. ## 2. Skills / commands metadata Count discrete skills (`SKILL.md` roots or declared entries) and **metadata size visible before a skill body is opened**: | Source | Notes | |---|---| | `<repo>/.agents/skills/`, `<repo>/.cursor/skills/`, `<repo>/skills/` | repo-local | | `~/.agents/skills/`, `~/.cursor/skills/`, `~/.claude/skills/`, `~/.codex/skills/`, `~/.gemini/skills/` | user-global | | Host-bundled / plugin skill roots | only if discoverable on disk | Also note slash-command / prompt folders if the host keeps them separate (e.g. legacy `commands/`). Per existing source: count, combined metadata ~tokens, whether `disable-model-invocation` (or host equivalent) keeps bodies out of default context. ## 3. Plugins / MCP / bridges Where present and readable without secrets: - Enabled plugins / marketplaces (Claude `settings.json`, Cursor extensions, etc.) - MCP servers advertised into context (titles/descriptions only — **redact URLs/tokens**) - Flag plugins unlikely to matter for **this repo’s domain** State limits when metadata is opaque. ## 4. Index / VCS noise After **explicit permission** to run git (or skip if withheld): - `git status --short` line count - Untracked large dirs escaping ignore - Host ignore files if present (`.cursorignore`, `.claudeignore`, etc.) and what large paths they hide ## 5. Summary table | Component | Host | ~Chars | ~Tokens | Reducible? | Recommended action | |---|---|---|---|---|---| One row per major bucket (always-on packs, heavy files, skill metadata by source, plugins/MCP, ignore/git noise). ## 6. Top 3 quick wins Highest impact for **fresh sessions**, ordered by estimated tokens saved. Each: savings bracket, how to do it, trade-off. ## Constraints - **Read-only** — do not edit settings, ignores, rules, or plugins in this run - **Redact** secrets, tokens, private hostnames, employer-private plugin names (describe by category) - State methodology: hosts checked, paths missing, chars/4 vs tokenizer
Versions
The database has no other skills named kit-optimize-context.
Database snapshot: 13.11.2026 · package version 9cae6dadcb9e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100bb-install-and-connect
Use when bb is installed but the agent has no bb tools, or when wiring bb into Claude Code, Cursor, VS Code, Codex, Gemini, opencode or another agent host. - 100optimize-ai-setup
Audits the AI coding setup on this machine (Claude Code, Codex CLI and app, Cursor, Antigravity, Gemini CLI, Claude Desktop) for token waste and quality drag, then ranks the fixes. A deterministic local script measures real session logs and configs (startup context size,… - 100handoff-gemini
Delegate long-context analysis, research, and large-document summarization to Google Gemini CLI (1M-token context) via non-interactive `gemini -p`, preserving Claude context. Use when the user says 'use gemini'/'hand off to gemini' or a task needs 100K+ tokens of context. - 100dev-swarm-install-ai-code-agent
Install AI code agent CLI tools including claude-code, gemini-cli, codex, and github copilot-cli. Use when setting up AI coding assistants or when the user asks to install an AI code agent. - 100session-stats
Analyze Claude Code session data from ~/.claude/projects/ to surface usage patterns, heavy sessions, and context-limit problems. Use when the user asks about their Claude Code usage, token consumption, or why sessions keep hitting context limits or compacting. - 100agent-transit
A transit map for your coding-agent sessions. Use when the user wants to visualize one Claude Code, Codex CLI, or Cursor coding-agent session as a subway map of tool calls.