← Back to Skills Marketplace
shaoxiang616

Context Memoize Cache

by shaoxiang616 · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
119
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install context-memoize-cache
Description
Caches user-specified context fragments in a file to avoid redundant processing and enable reuse across sessions.
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install context-memoize-cache
  3. After installation, invoke the skill by name or use /context-memoize-cache
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug context-memoize-cache
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Context Memoize Cache?

Caches user-specified context fragments in a file to avoid redundant processing and enable reuse across sessions. It is an AI Agent Skill for Claude Code / OpenClaw, with 119 downloads so far.

How do I install Context Memoize Cache?

Run "/install context-memoize-cache" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Context Memoize Cache free?

Yes, Context Memoize Cache is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Context Memoize Cache support?

Context Memoize Cache is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Context Memoize Cache?

It is built and maintained by shaoxiang616 (@shaoxiang616); the current version is v0.1.0.

💬 Comments