← Back to Skills Marketplace
shaoxiang616

Context Memoize

by shaoxiang616 · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
128
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install context-memoize
Description
Caches and manages frequently used context fragments to avoid redundant processing by saving, listing, and clearing cached data.
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 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.
Capability Analysis
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.
Capability Assessment
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).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install context-memoize
  3. After installation, invoke the skill by name or use /context-memoize
  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 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.
Metadata
Slug context-memoize
Version 0.1.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Context Memoize?

Caches and manages frequently used context fragments to avoid redundant processing by saving, listing, and clearing cached data. It is an AI Agent Skill for Claude Code / OpenClaw, with 128 downloads so far.

How do I install Context Memoize?

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

Is Context Memoize free?

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

Which platforms does Context Memoize support?

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

Who created Context Memoize?

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

💬 Comments