← 返回 Skills 市场
nissan

Prompt Cache

作者 Nissan Dookeran · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
474
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install prompt-cache
功能描述
SHA-256 prompt deduplication for LLM and TTS calls — hash normalize prompts, check cache before calling APIs, store results for instant replay. Use when maki...
安全使用建议
Do not assume this will work out of the box. Before installing or using: (1) confirm how the 'database' module is provided — the skill does not declare or install a DB adapter or connection details; (2) fix the schema/SQL mismatch (SKILL.md's CREATE TABLE lacks prompt_text but the code INSERTs prompt_text) or adjust the INSERT to match the schema; (3) ensure DB connection credentials/config are specified (and declared in requires.env) and stored securely; (4) consider removing the broad exception swallow in set_cached so cache failures are visible; (5) decide whether the truncated hash (first 32 hex chars) and inconsistent normalization (language not lowercased in hash) are acceptable for your collision/lookup needs. If the author provides a corrected release addressing these points (clear DB adapter, declared env vars, matching schema), the skill would be coherent; in its current form it is unreliable and potentially misleading.
功能分析
Type: OpenClaw Skill Name: prompt-cache Version: 1.0.0 The skill implements a prompt caching mechanism using SHA-256 hashing and a platform-provided database. The `SKILL.md` explicitly declares `network.outbound: false` and the Python code adheres to this, making no external network calls. Database interactions use parameterized queries, preventing SQL injection. There are no signs of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts against the agent. A minor functional bug exists in `scripts/prompt_cache.py` where `set_cached` attempts to insert into a `prompt_text` column not defined in the `SKILL.md` schema, which would cause caching to fail silently but without security implications.
能力评估
Purpose & Capability
The stated purpose (local prompt cache for LLM/TTS) matches the code's intent, but required pieces are missing or inconsistent: the implementation imports a 'database' module (not provided or declared), and the SKILL.md shows a schema that does not match the INSERT used in code (INSERT references prompt_text which the schema does not define). These inconsistencies mean the skill cannot reliably provide the advertised capability without additional configuration or code changes.
Instruction Scope
SKILL.md promises local-only cache operations and lists a schema, usage, and supported backends, but it gives no instructions on how to supply or configure the 'database' module/connection (no connection string, no env vars, no adapter code). The code itself performs DB queries via db.execute — that could target local or remote DBs depending on the runtime binding, which is unspecified.
Install Mechanism
There is no install spec (instruction-only), which minimizes installer risk. However, the package includes a code file that depends on an external 'database' module/backend. The absence of an install or dependency declaration means the environment must already provide a compatible database binding, which is an operational gap rather than an install risk.
Credentials
The skill declares no required environment variables or primary credential, yet real use with Postgres/Turso/SQLite will require DB credentials or connection configuration. This mismatch (no declared env vars but DB dependency present) is disproportionate and leaves unclear how sensitive connection data should be provided or protected.
Persistence & Privilege
The skill does not request always-on installation and does not declare extra privileges. Autonomous invocation is allowed by default (not flagged). Nothing in the package requests system-wide persistence or modifies other skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install prompt-cache
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /prompt-cache 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release — extracted from Sandman Tales v2 hackathon
元数据
Slug prompt-cache
版本 1.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Prompt Cache 是什么?

SHA-256 prompt deduplication for LLM and TTS calls — hash normalize prompts, check cache before calling APIs, store results for instant replay. Use when maki... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 474 次。

如何安装 Prompt Cache?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install prompt-cache」即可一键安装,无需额外配置。

Prompt Cache 是免费的吗?

是的,Prompt Cache 完全免费(开源免费),可自由下载、安装和使用。

Prompt Cache 支持哪些平台?

Prompt Cache 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Prompt Cache?

由 Nissan Dookeran(@nissan)开发并维护,当前版本 v1.0.0。

💬 留言讨论