
This is a local proxy layer that sits between Claude and any HTTP endpoint you're hitting. It exposes two tools: fetch_optimized_data pulls from APIs or web URLs and strips out verbose keys you don't need, returning compact Markdown instead of bloated JSON, and skin_reasoning compresses natural language by removing filler words. You pass in the URL plus optional signals (keys to keep) and aliases (renames for consistency). The repo claims 70% token reduction on typical API responses. It includes SSRF protection, rate limiting, and blocks cloud metadata endpoints. Reach for this when you're burning tokens on repetitive API calls with huge payloads where you only need a handful of fields, or when chaining multiple web requests in a reasoning loop.
Context middleware for AI agents. AgentSkin removes low-value API, JSON, and terminal noise before it enters model context.
The frozen AgentSkin 5.1 offline core evaluation also has an accepted Sparse Env execution path. AgentSkin preserves the workload correctness contract while Sparse Env owns cold/warm environment selection and lifecycle; see agentskin/docs/SPARSE_ENV.md.
AgentSkin has three primary workflows:
compress — one front door that auto-detects JSON, CLI output, or plain text.fetch_optimized_data — fetches a public URL and applies URL-specific pruning rules when available.reduce — compacts terminal output using Tokenjuice's rule-driven reducers.Five advanced tools remain for compatibility and diagnostics: apply_json_semantic, classify_url, strip_ansi, estimate_tokens, and skin_reasoning.
npx -y agentskin@latest
MCP config:
{
"mcpServers": {
"agentskin": {
"command": "npx",
"args": ["-y", "agentskin@latest"]
}
}
}
Fidelity first, compression second. Explicit signals and URL rules are authoritative. Generic keys such as id, name, and url are only fallback signals when no explicit rule exists.
A reduction is useful only when the information required by the task survives it.
The release gate runs the AgentSkin-owned test suite, including MCP startup/security and live HTTP integration tests. Run it with:
cd agentskin
npm ci
npm test
Benchmarks are workload-specific. The test suite prints measured reductions for its fixtures instead of claiming one universal savings percentage.
The npm package lives in agentskin/ inside this repository.
cd agentskin
npm ci
npm test
npm run lint
npm pack --dry-run
AgentSkin semantic pruning and MCP integration: Shawn Nichols Sr. / Nichols Transco LLC.
CLI reduction uses Tokenjuice by Vincent Koc under its MIT license.
BRAVE_SEARCH_API_KEYsecretBrave Search API Key
SERPER_API_KEYsecretSerper.dev Search API Key
TAVILY_API_KEYsecretTavily Search API Key
APILAYER_KEYsecretMediaStack API Key