← 返回 Skills 市场
Semantic Cache
作者
rylinjames
· GitHub ↗
· v1.0.0
· MIT-0
218
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install semantic-cache
功能描述
Semantic cache for LLM API calls using Redis. Caches responses by meaning, not exact match. Activate when the user wants to cache AI responses, reduce API co...
安全使用建议
This skill appears to be what it claims, but take these precautions before installing/using it: (1) Point REDIS_URL to a Redis instance you control and preferably to a dedicated database/namespace so cache operations (keys, del, ft.dropIndex) don't remove unrelated data. (2) Be aware that running query/test/stress scripts will call OpenAI (embedding + completion) and can incur cost. (3) Use least-privilege credentials for Redis (ACLs or limited user) and rotate API keys as usual. (4) Run tests in a sandboxed/dev environment first to confirm key-prefix behavior and TTLs. (5) If you require stricter review, inspect the package-lock and installed transitive dependencies or run npm audit before deployment.
功能分析
Type: OpenClaw Skill
Name: semantic-cache
Version: 1.0.0
The semantic-cache skill is a legitimate utility for caching LLM responses using Redis vector search and OpenAI embeddings. Analysis of scripts/cache.js and scripts/stress-test.js shows standard implementation of KNN search and cache management without any dangerous sinks, unauthorized network calls, or data exfiltration logic. The instructions in SKILL.md are aligned with the code's functionality and do not contain prompt-injection attacks or deceptive commands.
能力评估
Purpose & Capability
Name/description, required binaries (node), npm dependencies (redis, openai), and required env vars (REDIS_URL, OPENAI_API_KEY) all match the stated goal of embedding queries, searching Redis vector index, and calling OpenAI on misses. The primary credential (REDIS_URL) is appropriate.
Instruction Scope
SKILL.md and the scripts limit actions to embedding text, searching/creating a Redis vector index, storing results, and calling OpenAI. The code does not read unrelated local files or exfiltrate data to unexpected endpoints. Caveats: the CLI commands and test/stress scripts use redis.keys and redis.del with the KEY_PREFIX and attempt to drop the index; if your Redis contains other keys with the same prefix or you misconfigure REDIS_URL, these commands could delete entries. The stress-test makes many OpenAI embedding requests (costly) and may create many keys during testing.
Install Mechanism
Installation is via normal npm packages (redis, openai) declared in package.json and package-lock.json; no downloads from arbitrary URLs or extractor installs. The package-lock shows many transitive dependencies (expected for these SDKs) — standard but increases the dependency surface.
Credentials
Required env vars (REDIS_URL, OPENAI_API_KEY) are necessary for Redis access and embedding/completion calls. Optional env vars used by the code (SEMANTIC_CACHE_THRESHOLD, SEMANTIC_CACHE_TTL) are reasonable configuration knobs. No unrelated secrets or system credentials are requested.
Persistence & Privilege
Skill does not request always: true and does not modify other skills or system-wide agent settings. It runs as a normal user-invocable tool. Note that autonomous invocation is allowed by default on the platform (not a fault of this skill).
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install semantic-cache - 安装完成后,直接呼叫该 Skill 的名称或使用
/semantic-cache触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release — Redis vector search cache for LLM API calls. Cache by meaning, not exact match. 77x faster responses on cache hits.
元数据
常见问题
Semantic Cache 是什么?
Semantic cache for LLM API calls using Redis. Caches responses by meaning, not exact match. Activate when the user wants to cache AI responses, reduce API co... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 218 次。
如何安装 Semantic Cache?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install semantic-cache」即可一键安装,无需额外配置。
Semantic Cache 是免费的吗?
是的,Semantic Cache 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Semantic Cache 支持哪些平台?
Semantic Cache 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Semantic Cache?
由 rylinjames(@rylinjames)开发并维护,当前版本 v1.0.0。
推荐 Skills