← 返回 Skills 市场
shaoxiang616

Context Memoize

作者 shaoxiang616 · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
128
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install context-memoize
功能描述
Caches and manages frequently used context fragments to avoid redundant processing by saving, listing, and clearing cached data.
使用说明 (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 and simple, but review these before installing: (1) The runtime uses $CONTENT (not declared); ensure the agent will supply only intended fragments. (2) Anything appended is stored plaintext at ~/.openclaw/context-cache/fragments.md — do not cache secrets or sensitive data. (3) Consider changing the append/clear commands to safer variants (explicit file creation, use a directory listing pattern instead of aggressive rm -rf, and set file permissions). (4) If you plan to preload cached fragments on startup, audit those fragments first to avoid unintentionally exposing private information to agents. If you want stronger safety, require explicit user confirmation before memoizing and add sanitization/limits on fragment size and content.
功能分析
Type: OpenClaw Skill Name: context-memoize Version: 0.1.0 The skill implements a context caching mechanism using shell commands in SKILL.md that are vulnerable to shell injection. Specifically, the use of echo "$CONTENT" >> ~/.openclaw/context-cache/fragments.md allows for arbitrary command execution if the content variable contains shell metacharacters. While the stated purpose of local context memoization appears legitimate, the lack of input sanitization is a significant security flaw.
能力评估
Purpose & Capability
The name and description (cache and manage context fragments) align with the instructions, which implement a file-based cache under ~/.openclaw/context-cache. No unrelated credentials, binaries, or installs are requested.
Instruction Scope
Instructions are narrowly scoped to saving, listing, and clearing a cache file. They do reference the $CONTENT variable (used to append data) and suggest pre-loading the cache on session startup. The skill does not attempt to read unrelated system files or credentials, but the use of $CONTENT is implicit and not declared.
Install Mechanism
Instruction-only skill with no install steps and no code artifacts — minimal installation risk because nothing is written to disk by an installer.
Credentials
The SKILL.md uses $CONTENT but the skill declares no required environment variables. This mismatch means the runtime expects an external value to be provided but doesn't document it. Also, the skill will persist whatever is given into a user file (including secrets) without sanitization or access controls.
Persistence & Privilege
The skill writes persistent data to the user's home (~/.openclaw/context-cache) and suggests auto-loading it on session startup. That is reasonable for a cache, but persistent storage can unintentionally retain sensitive data and will remain until explicitly removed (rm -rf is destructive if misapplied).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install context-memoize
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /context-memoize 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
- Initial release of Context Memoize Skill. - Allows users to cache and reuse frequently used context fragments with a simple command. - File-based caching for quick save, list, and clear operations. - Supports integration with session startup to preload cached contexts automatically.
元数据
Slug context-memoize
版本 0.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Context Memoize 是什么?

Caches and manages frequently used context fragments to avoid redundant processing by saving, listing, and clearing cached data. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 128 次。

如何安装 Context Memoize?

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

Context Memoize 是免费的吗?

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

Context Memoize 支持哪些平台?

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

谁开发了 Context Memoize?

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

💬 留言讨论