Agentskin

io.github.Shawn5cents由 GitHub 账号 Shawn5cents 发布v4.0.1更新于 Oct 24, 2026

The Semantic Layer for AI Agents. Prunes noisy API data by 70%+ for token-efficient reasoning.

概览

AI 生成的概览

本地 Node.js MCP 服务器,在 JSON、命令行输出、纯文本和抓取的网页进入 AI 助手上下文前进行压缩。

可以做什么
  • 通过一个自动识别的入口压缩 JSON、命令行输出或纯文本
  • 抓取公开网址并按网址专属规则裁剪返回内容
  • 用规则驱动的缩减器精简终端输出
  • 提供诊断工具:识别网址类型、去除 ANSI 控制码、估算 token 数量、查看推理信息
适用场景
适合助手需要处理庞大的 API 响应、冗长的 JSON、终端日志或抓取的网页,希望在保留任务所需信息的同时减少 token 消耗的场景。
运行要求
通过 npx 以 stdio 在本地运行,需要 Node.js。可选通过环境变量提供搜索与媒体 API 密钥:APILAYER_KEY、BRAVE_SEARCH_API_KEY、SERPER_API_KEY、TAVILY_API_KEY。抓取网址需要网络访问。
安装前请注意
它会代助手抓取公开网址;README 提到 SSRF 检查、响应大小限制、速率限制和超时,但抓取内容仍会离开本机。可选 API 密钥以环境变量传入,可能产生服务商使用费用。压缩本身有损,需确认关键信息未被删掉。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Agentskin,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

AgentSkin

[npm version] [License: MIT]

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.

What it does

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.

Quick start

bash
npx -y agentskin@latest

MCP config:

json
{  "mcpServers": {    "agentskin": {      "command": "npx",      "args": ["-y", "agentskin@latest"]    }  }}

Design rule

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.

Current verification

The release gate runs the AgentSkin-owned test suite, including MCP startup/security and live HTTP integration tests. Run it with:

bash
cd agentskinnpm cinpm test

Benchmarks are workload-specific. The test suite prints measured reductions for its fixtures instead of claiming one universal savings percentage.

Runtime

  • Node.js MCP server over stdio
  • Tokenjuice is a normal npm dependency for CLI reduction
  • URL-specific semantic pruning rules for structured APIs
  • SSRF checks for fetches, response-size limits, rate limiting, Zod validation, and processing timeouts

Development

The npm package lives in agentskin/ inside this repository.

bash
cd agentskinnpm cinpm testnpm run lintnpm pack --dry-run

Credits

AgentSkin semantic pruning and MCP integration: Shawn Nichols Sr. / Nichols Transco LLC.

CLI reduction uses Tokenjuice by Vincent Koc under its MIT license.

来源:README.md,提交 0c35b05

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v4.0.1最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。