← Back to Skills Marketplace
Smart Cache
by
heimaomao83
· GitHub ↗
· v2.0.0
· MIT-0
97
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install sunlixue-smart-cache
Description
本地智能缓存系统,为AI助手提供语义级别的请求缓存。当用户需要(1)减少重复API调用成本、(2)加速相似问题的响应、(3)创建本地缓存层来优化AI助手性能时使用此技能。支持精确匹配(L1)和语义相似匹配(L2)两种缓存模式。
Usage Guidance
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.
Capability Tags
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install sunlixue-smart-cache - After installation, invoke the skill by name or use
/sunlixue-smart-cache - Provide required inputs per the skill's parameter spec and get structured output
Version History
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模型与阈值等调整。
- 附带详细的用法示例、快速入门、脚本说明及故障排查指南。
Metadata
Frequently Asked Questions
What is Smart Cache?
本地智能缓存系统,为AI助手提供语义级别的请求缓存。当用户需要(1)减少重复API调用成本、(2)加速相似问题的响应、(3)创建本地缓存层来优化AI助手性能时使用此技能。支持精确匹配(L1)和语义相似匹配(L2)两种缓存模式。 It is an AI Agent Skill for Claude Code / OpenClaw, with 97 downloads so far.
How do I install Smart Cache?
Run "/install sunlixue-smart-cache" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Smart Cache free?
Yes, Smart Cache is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Smart Cache support?
Smart Cache is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Smart Cache?
It is built and maintained by heimaomao83 (@heimaomao83); the current version is v2.0.0.
More Skills