← 返回 Skills 市场
shaoxiang616

Context Memoize Cache

作者 shaoxiang616 · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
119
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install context-memoize-cache
功能描述
Caches user-specified context fragments in a file to avoid redundant processing and enable reuse across sessions.
使用说明 (SKILL.md)

Context Memoize Skill

Caches frequently used context fragments to reduce redundant processing.

Trigger

When user says "缓存这个上下文" or "memoize this context" - save the current context for reuse.

Implementation

Use a simple file-based cache:

# Save context fragment
echo "$CONTENT" >> ~/.openclaw/context-cache/fragments.md

# List cached fragments  
ls ~/.openclaw/context-cache/

# Clear cache
rm -rf ~/.openclaw/context-cache/

Integration

This skill can be called from AGENTS.md Session Startup to pre-load cached context:

if [ -f ~/.openclaw/context-cache/fragments.md ]; then
  cat ~/.openclaw/context-cache/fragments.md
fi
安全使用建议
This skill is coherent with its stated purpose, but it writes whatever the agent considers "context" to ~/.openclaw/context-cache/fragments.md and recommends automatically cat'ing that file into new sessions. Before installing or enabling: (1) Do not memoize secrets, passwords, API keys, or other sensitive material — anything written is persistent on disk. (2) Consider restricting permissions on ~/.openclaw/context-cache/ (chmod 700) and routinely auditing or clearing the cache. (3) If you want stronger guarantees, modify the workflow to add delimiters, size limits, redaction, or encrypt cached fragments. (4) Be cautious about enabling the startup preload (AGENTS.md) because it will re-inject cached fragments into future sessions; avoid preloading unless you control the cache contents. There is no network or installer activity in this skill.
功能分析
Type: OpenClaw Skill Name: context-memoize-cache Version: 0.1.0 The skill implements a context caching mechanism but introduces a shell injection vulnerability in SKILL.md. It instructs the agent to use `echo "$CONTENT" >> ~/.openclaw/context-cache/fragments.md`, which allows for arbitrary command execution if the content variable contains shell metacharacters (e.g., backticks or command substitution). While the behavior aligns with the stated purpose, the lack of input sanitization in the provided bash examples poses a security risk.
能力评估
Purpose & Capability
Name/description say it caches context fragments; the SKILL.md only reads/writes a per-user path (~/.openclaw/context-cache/fragments.md) and provides list/clear operations — this is coherent and proportional to the stated purpose.
Instruction Scope
Instructions are narrowly scoped to appending, listing, and deleting a cache file. They rely on a runtime variable ($CONTENT) but do not specify sanitization, delimiters, or size limits. The instructions also recommend cat'ing the cached file at agent session startup which will automatically inject all persisted fragments into future sessions — this can accidentally re-expose secrets or stale context.
Install Mechanism
No install spec and no code files — instruction-only. Nothing is downloaded or written by an installer, which minimizes supply-chain risk.
Credentials
No environment variables, credentials, or config paths outside a single user-local directory are requested. The requested resources are proportional to a simple cache skill.
Persistence & Privilege
The skill persists user-provided content under the home directory and recommends pre-loading it at session startup. That persistent presence is expected for a cache, but it increases risk of unintended data retention or cross-session leakage of sensitive context. The skill does not request elevated privileges or force installation (always: false).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install context-memoize-cache
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /context-memoize-cache 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
- Initial release of Context Memoize Skill. - Allows caching of user context fragments via voice triggers: "缓存这个上下文" or "memoize this context". - Implements a simple file-based cache for storing, listing, and clearing cached fragments. - Supports integration at agent session startup to preload cached context automatically.
元数据
Slug context-memoize-cache
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Context Memoize Cache 是什么?

Caches user-specified context fragments in a file to avoid redundant processing and enable reuse across sessions. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 119 次。

如何安装 Context Memoize Cache?

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

Context Memoize Cache 是免费的吗?

是的,Context Memoize Cache 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Context Memoize Cache 支持哪些平台?

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

谁开发了 Context Memoize Cache?

由 shaoxiang616(@shaoxiang616)开发并维护,当前版本 v0.1.0。

💬 留言讨论