← Back to Skills Marketplace
354
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install layered-memory
Description
基于 L0/L1/L2 三层结构的分层记忆管理系统,大幅减少 Token 消耗。L0 节省 99% Token(摘要层),L1 节省 88%(概览层),L2 为完整内容。支持自动生成分层文件、智能按需加载、防重复写入。适用于需要高效管理大型记忆文件的场景。
README (SKILL.md)
Usage Guidance
This skill appears to implement the claimed layered-memory functionality, but it has notable inconsistencies that you should resolve before installing or running it with real data: 1) Verify the external scripts it calls (~/clawd/scripts/generate-layers-simple.js, memory-extractor.js, memory-archiver.js) actually exist and inspect their contents — the package does not include them. 2) Do not run this on sensitive conversation data until you confirm the helper scripts are trusted; execSync will execute whatever code is at those locations. 3) Confirm the publisher/source (none provided) and ask for a release that bundles all necessary components or documents required runtime files. 4) Consider running in an isolated environment (container or VM) and back up your ~/clawd memory files before use. 5) If you need a safer choice, prefer a version that includes all scripts in the package or one from a known homepage/repository with a validated LICENSE and reproducible build.
Capability Analysis
Type: OpenClaw Skill
Name: layered-memory
Version: 1.2.0
The skill implements a memory management system that relies on high-risk execution patterns, specifically using 'execSync' in 'index.js' to run shell commands for generating and reading memory layers. It employs an 'agent:bootstrap' hook in 'hooks/openclaw/handler.js' to inject instructions that command the AI agent to execute these shell scripts based on token usage thresholds. While the behavior appears aligned with the stated goal of token optimization, the architecture of using prompt injection to trigger shell execution creates a significant attack surface for potential command injection or unauthorized local execution.
Capability Assessment
Purpose & Capability
The skill claims to be a self-contained L0/L1/L2 memory manager, but its code expects multiple scripts and files in ~/clawd/scripts (e.g. generate-layers-simple.js, memory-extractor.js, memory-archiver.js) that are not bundled. test.js also expects a LICENSE file and scripts under the user's HOME. Requiring external files in the user's home without declaring them is disproportionate to the described purpose and will cause failures or silently execute whatever is present there.
Instruction Scope
SKILL.md describes benign CLI usage (generate/read/search) and integration guidance (cron, hooks). However documentation and code instruct reading/writing many files under HOME (~/clawd, ~/.clawd, memory daily files) and installing cron/hooks. The hook injects a bootstrap reminder into agent bootstrapFiles. These actions are consistent with a memory manager, but they also give the skill access to conversation contents and local files — so verify you want a skill that will read/write your workspace memory files.
Install Mechanism
There is no install spec (instruction-only), but the published bundle includes operational code (index.js, hooks, tests). The code runs child_process.execSync to execute scripts located in ~/clawd/scripts. Because the skill does not bundle those scripts, it implicitly depends on arbitrary files in the user's HOME; this is risky because execSync will execute whatever is present at those paths.
Credentials
The manifest declares no required env vars, but lib/config-loader will read environment variables prefixed with LAYERED_MEMORY_. index.js and many docs rely on process.env.HOME and global paths. More importantly, the skill reads/writes user memory files and state files (e.g. ~/.clawd/.memory-checker-state.json, ~/clawd/memory/daily/...) — appropriate for a memory manager but sensitive. The package does not declare or justify its dependency on external scripts in HOME, nor include a LICENSE file referenced by tests, which is inconsistent.
Persistence & Privilege
always:false (good). The skill installs an OpenClaw hook (handler.js) that injects a bootstrap reminder into agent context — expected for a memory helper. Combined with autonomous invocation and the ability to exec local scripts, this increases impact if the external scripts or paths are untrusted. The skill does not request other skills' configs, but it will read/write local memory files and state files.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install layered-memory - After installation, invoke the skill by name or use
/layered-memory - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.0
v1.2.0: Add config loader, concurrent processing, incremental generation, dry-run mode, verbose logging. Full rewrite of generator with performance improvements. 10/10 tests passing.
v1.1.0
v1.1.0: Add test suite, config example, benchmark script, contributing guide. Fix missing test.js. Improved documentation and hooks. Enhanced error handling.
v1.0.0
- 首次发布:提供分层记忆管理系统 layered-memory。
- 采用 L0/L1/L2 三层结构,智能加载记忆内容,大幅减少 Token 消耗。
- 支持自动生成摘要层、概览层和完整内容层的分层文件。
- 提供自动按需加载与防重复写入功能。
- 适用于高效管理和调用大型记忆文件。
Metadata
Frequently Asked Questions
What is Layered Memory?
基于 L0/L1/L2 三层结构的分层记忆管理系统,大幅减少 Token 消耗。L0 节省 99% Token(摘要层),L1 节省 88%(概览层),L2 为完整内容。支持自动生成分层文件、智能按需加载、防重复写入。适用于需要高效管理大型记忆文件的场景。 It is an AI Agent Skill for Claude Code / OpenClaw, with 354 downloads so far.
How do I install Layered Memory?
Run "/install layered-memory" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Layered Memory free?
Yes, Layered Memory is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Layered Memory support?
Layered Memory is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Layered Memory?
It is built and maintained by yingdadaa (@yingdadaa); the current version is v1.2.0.
More Skills