← 返回 Skills 市场
Smart Cache
作者
heimaomao83
· GitHub ↗
· v2.0.0
· MIT-0
97
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install sunlixue-smart-cache
功能描述
本地智能缓存系统,为AI助手提供语义级别的请求缓存。当用户需要(1)减少重复API调用成本、(2)加速相似问题的响应、(3)创建本地缓存层来优化AI助手性能时使用此技能。支持精确匹配(L1)和语义相似匹配(L2)两种缓存模式。
安全使用建议
This package appears to be a coherent local semantic cache. Before installing or running it: 1) Review and, if needed, remove or rotate any API keys—config.json is stored in plaintext under ~/.qclaw/smart-cache by default. Prefer environment variables or a secrets manager if you’re concerned. 2) If you use MCP HTTP mode, run it bound to localhost and/or behind authentication/firewall to avoid exposing cached responses to the network. 3) If you need stronger privacy, prefer the 'local' embedding provider (requires sentence-transformers) so no external embedding calls are made. 4) Because the package source/homepage is unknown, consider auditing the full (non-truncated) source before running in production and avoid running the HTTP server on publicly routable interfaces without proper safeguards.
能力标签
能力评估
Purpose & Capability
Name/description (local semantic cache) match the shipped code: L1/L2 cache implementations, embedding provider adapters, CLI manager, and an MCP server. Requiring or using OpenAI/DashScope API keys for embeddings is coherent with the stated L2 functionality; local provider is supported as documented.
Instruction Scope
Runtime instructions and code operate on the declared config path (~/.qclaw/smart-cache) and the local SQLite DB. They read config and optional env vars (OPENAI_API_KEY/DASHSCOPE_API_KEY) as expected. One operational note: the MCP HTTP mode (suggested --mode http --port 8080) can expose cached responses over the network if started without proper binding/authentication — the SKILL.md does not explicitly recommend securing the HTTP server.
Install Mechanism
No install spec (instruction-only + bundled scripts). No external arbitrary downloads or installers are present in the package; code is plain Python and creates user-level files under the home directory.
Credentials
No required env vars declared in metadata, but the code legitimately reads OPENAI_API_KEY and DASHSCOPE_API_KEY (and allows api_key in config.json) for embedding API calls. This is proportionate to L2 embedding functionality. Caution: config.json storing API keys in plaintext under the user home directory is supported by the skill and is a practical (but sensitive) choice.
Persistence & Privilege
Skill does not request always:true and does not attempt to modify other skills or system-wide configuration. It persists cache and config under the user's home (~/.qclaw/smart-cache) which is normal for a local cache.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install sunlixue-smart-cache - 安装完成后,直接呼叫该 Skill 的名称或使用
/sunlixue-smart-cache触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.0
sunlixue-smart-cache v2.0.0 introduces semantic embedding support and a new MCP server.
- 新增 scripts/embeddings.py,支持 OpenAI、DashScope、本地 embedding,实现多源文本向量语义匹配
- 新增 scripts/mcp_server.py,支持标准输入和 HTTP 两种 MCP 协议接入方式,便于与各类 AI 工具结合
- 配置支持 embedding_provider、embedding_model、api_key 等新的嵌入相关参数
- 升级 L2 语义缓存逻辑,可选多种 embedding 来源,语义缓存无需仅限 OpenAI
- 更新文档和配置模板,详细列出多种 embedding 接入方式及参数说明
v1.0.0
smart-cache 1.0.0 初始版本发布:
- 提供本地智能缓存系统,支持AI请求的L1精确匹配与L2语义相似匹配两种缓存模式。
- 集成缓存管理功能:自动过期、容量限制、手动清理与成本(token/费用)追踪。
- 提供命令行、Python API及MCP协议服务三种调用与集成方式。
- 配置支持缓存目录、容量、过期时间、embedding模型与阈值等调整。
- 附带详细的用法示例、快速入门、脚本说明及故障排查指南。
元数据
常见问题
Smart Cache 是什么?
本地智能缓存系统,为AI助手提供语义级别的请求缓存。当用户需要(1)减少重复API调用成本、(2)加速相似问题的响应、(3)创建本地缓存层来优化AI助手性能时使用此技能。支持精确匹配(L1)和语义相似匹配(L2)两种缓存模式。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 97 次。
如何安装 Smart Cache?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install sunlixue-smart-cache」即可一键安装,无需额外配置。
Smart Cache 是免费的吗?
是的,Smart Cache 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Smart Cache 支持哪些平台?
Smart Cache 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Smart Cache?
由 heimaomao83(@heimaomao83)开发并维护,当前版本 v2.0.0。
推荐 Skills