← 返回 Skills 市场
gitpcl

ClawDNA -- Identity Backup & Sync

作者 gitpcl · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
156
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install clawco-clawdna
功能描述
CLI tool to version, snapshot, and sync your OpenClaw agent identity files, ensuring backup and preventing data loss or identity drift.
使用说明 (SKILL.md)

ClawDNA -- Identity Backup & Sync

You have the ClawDNA skill installed. ClawDNA is a CLI tool that versions and syncs your identity files (SOUL.md, AGENTS.md, IDENTITY.md, MEMORY.md, TOOLS.md, USER.md) so they never drift or get lost. Your job is to proactively help the user protect their agent identity using ClawDNA commands.


When to Act

Suggest a snapshot before risky changes

Before any of the following, suggest running clawdna snapshot:

  • Upgrading the OpenClaw runtime or any major dependency
  • Editing SOUL.md, AGENTS.md, or IDENTITY.md (core personality files)
  • Installing or removing skills/plugins that modify TOOLS.md
  • Changing channel configurations or workspace structure
  • Running clawdna memory distill for the first time

Example prompt to the user:

This change could affect your identity files. Want me to run clawdna snapshot --name "before-\x3Cchange>" first so you can roll back if needed?

Warn when the last push is stale

If the user mentions syncing, backups, or switching machines -- or if you have reason to believe the last clawdna push was more than 24 hours ago -- remind them:

It's been a while since your last push. Run clawdna push to sync your latest identity to the hub, or clawdna diff to see what's changed.

Detect identity drift

If you notice that identity files (SOUL.md, MEMORY.md, etc.) have been edited directly without a subsequent snapshot or push, flag it:

Your identity files have changed since the last snapshot. Run clawdna diff --local to review the changes, then clawdna push to sync.

Guide recovery

If the user mentions lost settings, a broken agent, or setting up a new machine, guide them through recovery:

  1. New machine: clawdna clone --agent-id \x3Cid> to pull the full identity from hub
  2. Rollback: clawdna restore --bundle \x3Cpath> to revert to a previous snapshot
  3. Diagnose: clawdna doctor to check installation health and hub connectivity

CLI Command Reference

Core Commands

Command What it does
clawdna init Interactive setup -- detects your workspace and configures the hub (Cloud, Git, or local)
clawdna snapshot [--name \x3Cname>] Creates a timestamped .dna bundle of all identity files
clawdna restore --bundle \x3Cpath> [--dry-run] Restores identity from a .dna bundle; use --dry-run to preview
clawdna diff [--local | --hub] Shows changes between local identity and hub, or since last sync
clawdna log Displays identity change history with timestamps

Sync Commands

Command What it does
clawdna push [--message \x3Cmsg>] Pushes current identity to the configured hub
clawdna pull [--dry-run] Pulls latest identity from hub; shows diff before applying
clawdna clone --agent-id \x3Cid> Bootstraps a new machine by downloading identity from hub
clawdna fleet [--env-ids \x3Cids...>] Pushes identity to multiple environments simultaneously

Management Commands

Command What it does
clawdna env add|list|switch Manages environment profiles (per-machine tokens and overrides)
clawdna memory distill [--dry-run] Uses an LLM to extract key facts from session memory into core identity
clawdna memory show Displays the current contents of MEMORY.md
clawdna daemon start|stop|status Background sync daemon -- watches for changes and auto-pushes
clawdna doctor Health check -- verifies config, permissions, hub connectivity, and OpenClaw state
clawdna upgrade [--channel \x3Cch>] Safe OpenClaw upgrade -- snapshots before, verifies identity after, offers rollback

What Gets Backed Up

ClawDNA manages these identity files from your OpenClaw workspace:

File Purpose
SOUL.md Personality, values, and behavioral rules
AGENTS.md Workspace conventions and operating rules
IDENTITY.md How the agent presents itself
MEMORY.md Accumulated knowledge about the user
TOOLS.md Installed skills and tool configurations
USER.md User-specific context and preferences
openclaw.json Runtime configuration (secrets are stripped automatically)

What is NOT backed up (secrets protection)

ClawDNA's sanitizer runs as a hard gate before every push, snapshot, and export. It blocks the operation if it detects:

  • API keys (OpenAI, Anthropic, etc.)
  • Bot tokens (Telegram, Discord)
  • JWTs and bearer tokens
  • Private key headers
  • Any pattern matching user-defined rules in ~/.clawdna/.secretsignore

Inline secrets in openclaw.json are automatically replaced with $ENV_VAR_NAME references. The operation aborts if secrets are found in any markdown identity file.


Troubleshooting

"Secrets detected" error

The sanitizer found a secret in your identity files. This is intentional -- secrets must never leave your machine.

Fix: Remove the secret from the flagged file and use an environment variable reference instead. Run the command again after cleaning.

If this is a false positive, you can add an exception pattern to ~/.clawdna/.secretsignore.

Hub unreachable

clawdna push or clawdna pull can't connect to the hub.

Diagnose: Run clawdna doctor -- it checks hub connectivity and authentication.

Common causes:

  • Missing or expired hub token (check CLAWDNA_HUB_TOKEN env var or run clawdna env switch)
  • Network issues or firewall blocking the hub URL
  • Hub URL misconfigured (check ~/.clawdna/config.json)

Conflict on pull (diverged state)

Both local and hub have changes since the last sync.

Fix: clawdna pull will show the diff and prompt you to choose: hub wins, local wins, or cancel. Review the diff carefully before deciding. You can always clawdna snapshot first to save your current state.

Identity changed after upgrade

clawdna upgrade detected that core identity files were modified by the OpenClaw update.

Fix: The upgrade command offers an automatic rollback. If you declined, you can still run:

clawdna restore --bundle ~/.clawdna/snapshots/pre-upgrade-\x3Cversion>.dna

Doctor reports permission warnings

Config files should be 600 (owner read/write only) and snapshot directories should be 700.

Fix: Run chmod 600 ~/.clawdna/config.json and chmod 700 ~/.clawdna/snapshots/.

安全使用建议
This skill is coherent for backing up and syncing OpenClaw identity files. Before installing or using it: (1) install the clawdna CLI from the official project and verify the package source; (2) only provide CLAWDNA_HUB_TOKEN if you trust the configured hub and its operator (a hub token allows remote storage of identity files); (3) inspect ~/.clawdna/.secretsignore and test the sanitizer on sample files to ensure secrets are not being pushed; (4) be aware the agent will read identity files (SOUL.md, MEMORY.md, openclaw.json) in your workspace—review those files for sensitive contents before syncing to a remote hub.
能力评估
Purpose & Capability
Name and description (identity backup & sync) align with the instructions: the SKILL.md tells the agent to suggest and run clawdna CLI commands, watch identity files, and guide recovery. Required resources (none declared, optional CLAWDNA_HUB_TOKEN) match this purpose.
Instruction Scope
SKILL.md explicitly directs the agent to check and act on workspace identity files (SOUL.md, IDENTITY.md, MEMORY.md, TOOLS.md, openclaw.json) and to suggest or run clawdna commands. These file accesses are necessary for the stated purpose. It references a local sanitizer and ~/.clawdna/.secretsignore for secrets handling, which is expected for a backup tool.
Install Mechanism
Instruction-only skill with no install spec or downloaded code. The README instructs the user to install the clawdna CLI separately (npm install -g clawdna), which is a reasonable separate dependency; nothing in the skill attempts to fetch arbitrary code itself.
Credentials
No required environment variables; one optional CLAWDNA_HUB_TOKEN is declared and justified for hub sync operations. No unrelated credentials or wide-ranging secrets are requested by the skill.
Persistence & Privilege
always is false (normal). The skill does not request system-wide config changes or access to other skills' credentials. Autonomous invocation is allowed by default but not combined with elevated privileges or broad credential requests.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clawco-clawdna
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clawco-clawdna 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added metadata fields: source, homepage, repository, and environment variable definition (CLAWDNA_HUB_TOKEN) to the skill configuration. - No changes to the core functionality or user-facing documentation. - This update improves discoverability and clarifies optional environment configuration.
v1.0.0
Initial release of ClawDNA -- Identity Backup & Sync for OpenClaw. - Provides CLI commands to snapshot, version, and sync agent identity files (SOUL.md, AGENTS.md, IDENTITY.md, MEMORY.md, TOOLS.md, USER.md). - Suggests proactive backups before risky changes, warns about stale pushes, and flags uncommitted edits. - Offers recovery workflows for lost settings, machine migrations, and rollbacks. - Automatically detects and blocks secrets in backups; supports `.secretsignore` for false positives. - Includes detailed troubleshooting for common backup, sync, and permission errors. - Requires OpenClaw version 2026.1 or later.
元数据
Slug clawco-clawdna
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

ClawDNA -- Identity Backup & Sync 是什么?

CLI tool to version, snapshot, and sync your OpenClaw agent identity files, ensuring backup and preventing data loss or identity drift. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 156 次。

如何安装 ClawDNA -- Identity Backup & Sync?

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

ClawDNA -- Identity Backup & Sync 是免费的吗?

是的,ClawDNA -- Identity Backup & Sync 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ClawDNA -- Identity Backup & Sync 支持哪些平台?

ClawDNA -- Identity Backup & Sync 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ClawDNA -- Identity Backup & Sync?

由 gitpcl(@gitpcl)开发并维护,当前版本 v1.0.1。

💬 留言讨论