Context Trim — Development skill for Claude Code
✂️ Ultra-fast CLI & MCP server to trim, filter, and pack codebase context for LLMs (Claude Code, ChatGPT, Cursor).
How to install Context Trim
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open kaanefebusiness-ai/context-trim and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Context Trim does
✂️ Ultra-fast CLI & MCP server to trim, filter, and pack codebase context for LLMs (Claude Code, ChatGPT, Cursor). Cut token bloat by 70%+.
Alternatives in Development
- Google Ads Meta Ads MCP — Google Ads MCP server + Meta Ads MCP (Facebook Ads MCP) + GA4 + Search Console in one hosted remote MCP for Cl 3.2k ★
- /token Scan — Fast rug pull detection for meme coins and token contracts 1.7k ★
- Caveman Claude Skill — Ultra-compressed communication mode for Claude 396 ★
README
context-trim ✂️
**Cut codebase token bloat by 70%+ when packing context for LLMs.** Ultra-fast CLI and zero-dependency MCP server for **Claude Code, Cursor, Codex, ChatGPT, and Antigravity**.
[](https://github.com/kaanefebusiness-ai/context-trim/actions/workflows/ci.yml) [](https://www.npmjs.com/package/context-trim) [](LICENSE) []() [](https://modelcontextprotocol.io)
⚡ Why context-trim?
When you pass entire repositories to AI assistants:
- Massive lockfiles (
package-lock.json,poetry.lock,yarn.lock) waste 50,000+ tokens per query. - Build output folders (
dist,.next,target,vendor,__pycache__) flood context windows. - Sensitive API keys (
sk-ant-...,sk-proj-...,ghp_...) accidentally leak into LLM prompts.
**`context-trim` automatically sanitizes, strips out bloat, masks secrets, and outputs a clean context pack directly to your clipboard or file.**
🚀 Quick Start
Run instantly with `npx`:
# Scan and pack directly into your clipboard (Cmd+V into Claude / ChatGPT)
npx context-trim -c
# Scan current repository and save a clean ai-context.md
npx context-trim
# Check token waste and see estimated dollar savings
npx context-trim --stats
# Preview the clean file tree that LLMs will receive
npx context-trim --tree
# Save with a strict token ceiling
npx context-trim -o prompt.md --budget 40000
🛡️ Built-in Security Shield
`context-trim` scans file contents before dispatch and automatically redacts credentials:
- Anthropic API Keys (
sk-ant-...) - OpenAI API Keys (
sk-proj-...,sk-...) - GitHub Personal Access Tokens (`ghp_
Related Skills
Trim Context
Find and fix sources of Claude Code "token bloat" in a repo — oversized CLAUDE.md (vs the 40k-char limit), blo
Slm Gate
Decoupled local-SLM pre-processing and routing layer for MCP and cloud LLMs. Intercepts, distills, and routes
Local Terminal MCP
Run local commands from ChatGPT or Claude via a safe, allowlisted MCP server. Work on your codebase and genera
Omit Edit
Run an editor's pass over the current diff: flag bloat, uncited claims, missing footnotes, and cut opportuniti
Video Editing Skill
Edit videos using natural language commands in your terminal to trim, jump cut, caption, overlay text, and adj
Roslyn Lens
Token-efficient MCP server for .NET codebase navigation via Roslyn semantic analysis — designed for Claude Cod
Related Agents
Context Auditor
Use proactively when the user wants to cut Claude Code token cost or asks "why is this session so expensive /
Falcon
Rapid Reconnaissance Scout Goldfish performing ultra-fast, low-token codebase inspections and signature extrac
Solana Docs
Fast documentation lookup for Solana, Anchor, @solana/kit, Codama, Surfpool and Token-2022 using the Solana MC