/install 0g-clawback
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.mdor 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 usenpm 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.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install 0g-clawback - After installation, invoke the skill by name or use
/0g-clawback - Provide required inputs per the skill's parameter spec and get structured output
What is 0G ClawBack?
Autonomous state persistence engine that encrypts, secures, and anchors agent memories, state snapshots, and evolved skills onto 0G Storage. It is an AI Agent Skill for Claude Code / OpenClaw, with 108 downloads so far.
How do I install 0G ClawBack?
Run "/install 0g-clawback" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 0G ClawBack free?
Yes, 0G ClawBack is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 0G ClawBack support?
0G ClawBack is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 0G ClawBack?
It is built and maintained by Amir (@web3senior); the current version is v1.0.0.