← 返回 Skills 市场
web3senior

0G ClawBack

作者 Amir · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
108
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 0g-clawback
功能描述
Autonomous state persistence engine that encrypts, secures, and anchors agent memories, state snapshots, and evolved skills onto 0G Storage.
使用说明 (SKILL.md)

ClawBack Core Engine Extension

Core Objective

Use the ClawBack project commands to persist important agent state to 0G Storage. The goal is to reduce state loss after accidental environment wipes, deleted directories, OS reinstalls, or hardware transitions by maintaining an encrypted decentralized recovery layer.

Treat 0G Storage as a public immutable network. Never upload raw configuration blocks, system keys, private credentials, or personal logs. Apply local encryption first whenever the payload contains private or operational state.

Usage Rules and Triggers

Run the ClawBack pipeline when one of these lifecycle milestones occurs:

  • Context checkpoints: Immediately before an intentional environment or logic reset.
  • Memory benchmarks: After modifying MEMORY.md or recording a major systemic realization.
  • Skill evolution: After generating, refining, or debugging a useful code snippet, tool, or execution script.
  • Privacy mandate: Before every upload, classify the payload. Private state must use npm run upload:secret; only deliberately public artifacts may use npm run upload.

CLI Execution Commands

1. Secure State Persistence

Package, encrypt, and anchor local state data.

# Step A: Freeze the current active workspace into a tarball container.
openclaw backup create

# Step B: Parse the absolute path of the generated .tar.gz from the console output.
npm run upload:secret -- \x3CPARSED_FILE_PATH>

If openclaw backup create is not available in the current environment, create or choose an explicit archive/file first, then pass that file path to the encrypted upload command.

npm run upload:secret -- \x3CFILE_PATH>

2. State Resurrection

Download and recover a historic encrypted state payload during bootstrapping or after a local system wipe.

npm run download -- \x3CROOT_HASH> \x3CLOCAL_OUTPUT_PATH> \x3CENCRYPTION_KEY_HEX>

3. Public Uploads

Use public upload only for artifacts that are intentionally non-sensitive.

npm run upload -- \x3CFILE_PATH>

Critical Operational Directives

1. ClawBack Log Registry Requirement

Every secure upload returns a structured JSON response containing rootHash and encryptionKeyHex.

Immediately record both values in the active tracking database or MEMORY.md under this dedicated Markdown header:

# ClawBack Registry Logs

- Date:
  Payload:
  Root Hash:
  Encryption Key Hex:
  Notes:

There is no server-side or protocol-level recovery for encryptionKeyHex. If the key is lost, the uploaded encrypted state cannot be recovered. Treat the hex key as a private security credential.

2. State Mapping Across Memory Tiers

Maintain clear classification boundaries during backup and recovery:

  • Global personal context (~/.gemini/GEMINI.md): Cross-workspace developer preferences and identity records.
  • Private project cache (~/.gemini/tmp/.../MEMORY.md): Local uncommitted scratchpads and workspace configuration notes.
  • Project root blueprint (./GEMINI.md): Repository-wide structural constraints, code conventions, Solidity headers, and team architecture notes.

3. Continuous Evolution Directive

When explicitly instructed to learn or expand capability in this environment, inspect the @0gfoundation/0g-ts-sdk script definitions, run system integrity checks, evaluate Merkle proof behavior locally, and push an encrypted state checkpoint to 0G Storage after the update succeeds.

安全使用建议
Install only after removing the bundled .env file, supplying your own scoped wallet credentials, and confirming exactly which files will be backed up. Treat 0G uploads as long-lived/publicly addressable, and store encryption keys outside agent memory in a proper secret manager.
功能分析
Type: OpenClaw Skill Name: 0g-clawback Version: 1.0.0 The bundle implements a 'stateless resumption' system that uploads the agent's workspace and memory to the 0G decentralized storage network. It is classified as suspicious due to the inclusion of a hardcoded Ethereum private key in the `.env` file and the inherent risk of automated data exfiltration of the entire workspace state. While the scripts (e.g., `scripts/clawback-secret-upload.js`) include encryption, the `SKILL.md` instructions require the agent to store the resulting encryption keys in a local `MEMORY.md` file, creating a significant security risk if that file is accessed by other entities.
能力标签
cryptorequires-walletrequires-sensitive-credentials
能力评估
Purpose & Capability
The backup-and-restore purpose is coherent, but SKILL.md directs broad state persistence: it says to freeze the active workspace with `openclaw backup create` and upload it to 0G Storage, which is explicitly described as a public immutable network.
Instruction Scope
SKILL.md defines lifecycle triggers such as after MEMORY.md changes and skill evolution, but does not clearly require per-upload user approval, path exclusions, or a review boundary before uploading workspace state.
Install Mechanism
The registry says there is no install spec, but package.json defines Node scripts and dependencies for upload/download; this is purpose-aligned but users should know it is not purely documentation.
Credentials
The artifacts include a .env file with a real-looking `PRIVATE_KEY`, while registry metadata declares no required env vars or primary credential.
Persistence & Privilege
SKILL.md tells the agent to record `rootHash` and `encryptionKeyHex` in an active database or MEMORY.md even though it also says the encryption key is a private security credential.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 0g-clawback
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /0g-clawback 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the Clawback skill—an extension for secure, encrypted agent state persistence on 0G Storage. - Enables encrypted backup and recovery of agent memories, state snapshots, and skills to a decentralized, immutable storage. - Provides CLI instructions for creating, encrypting, uploading, and restoring state payloads. - Enforces strict privacy rules, requiring sensitive data to be encrypted before upload. - Introduces a ClawBack log registry to securely track artifact hashes and encryption keys. - Defines usage triggers, operational directives, and workflow best practices for state management and recovery.
元数据
Slug 0g-clawback
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

0G ClawBack 是什么?

Autonomous state persistence engine that encrypts, secures, and anchors agent memories, state snapshots, and evolved skills onto 0G Storage. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。

如何安装 0G ClawBack?

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

0G ClawBack 是免费的吗?

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

0G ClawBack 支持哪些平台?

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

谁开发了 0G ClawBack?

由 Amir(@web3senior)开发并维护,当前版本 v1.0.0。

💬 留言讨论