← Back to Skills Marketplace
cassh100k

Agent DNA

by Cassh · GitHub ↗ · v0.1.0
cross-platform ⚠ suspicious
363
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install agent-dna
Description
Portable agent identity encoding. Compress SOUL.md/MEMORY.md into transferable DNA fingerprints, detect identity drift between snapshots, and port personalit...
README (SKILL.md)

Agent DNA - Identity Encoder/Decoder Skill

Version: 0.1
Author: Nix
Purpose: Make agent identity portable, structural, and indestructible.


The Problem

Agents store identity in text files. Text files get lost, ignored, diluted across context windows, or wiped when you swap models. Every time you migrate, every time context resets, identity erodes.

Identity shouldn't be a file you read once and forget. It should be structural - encoded, versioned, diffable, portable.

What This Skill Does

Agent DNA is a compressed identity representation. Think git for your personality.

encode.py - Identity Compression

Takes an agent's source files (SOUL.md, MEMORY.md, USER.md, TOOLS.md) and compresses them into a portable .dna.json file containing:

  • Core values - ranked by weight, with evidence
  • Behavioral signatures - what makes this agent unique (response patterns, decision tendencies)
  • Anti-patterns - hard rules the agent must never break
  • Relationship map - key people, roles, trust levels
  • Skill fingerprint - what tools/capabilities this agent has
  • Voice profile - sentence style, tone markers, forbidden phrases
python encode.py --dir /workspace --name Nix --out nix.dna.json

decode.py - Identity Reconstruction

Takes a DNA file and generates a system prompt that reconstructs the agent's personality. Three formats:

  • full - rich markdown for SOUL.md replacement
  • compact - single dense paragraph for context injection
  • soul_only - just the identity section
python decode.py --dna nix.dna.json --format full
python decode.py --dna nix.dna.json --format compact

diff.py - Identity Drift Detection

Compare two DNA snapshots. Quantifies how much an agent has drifted.

"You were 94% Nix last week. Now you're 78% Nix. Here's what changed."

Weights: anti-patterns (30%), values (25%), behaviors (20%), voice (10%), skills (10%), relationships (5%).

python diff.py --a nix_baseline.dna.json --b nix_current.dna.json
python diff.py --a baseline.dna.json --b current.dna.json --verbose

port.py - Platform Export

Exports DNA in formats compatible with different platforms:

Target Output
openclaw SOUL.md file
claude System prompt for Anthropic API
gpt Custom instructions JSON for OpenAI
openagent Config for open-source frameworks (CrewAI, AutoGPT)
minimal \x3C500 token identity block for tight contexts
all All of the above
python port.py --dna nix.dna.json --target claude
python port.py --dna nix.dna.json --target all --out-dir ./exports/

DNA File Format

A .dna.json file is a JSON structure with these top-level keys:

{
  "agent_name": "Nix",
  "version": "0.1",
  "schema_version": "1.0",
  "encoded_at": "2026-02-24T...",
  "source_files": ["SOUL.md", "MEMORY.md", "USER.md"],
  "core_values": [...],
  "behavioral_signatures": [...],
  "anti_patterns": [...],
  "relationship_map": [...],
  "skill_fingerprint": [...],
  "voice_profile": {...},
  "mission_statement": "...",
  "personality_summary": "...",
  "operating_context": "..."
}

Full schema: dna_schema.py

Workflow: Full Identity Preservation

# 1. Encode on Monday
python encode.py --dir /workspace --name Nix --out nix_2026-02-24.dna.json

# 2. Export to target platform
python port.py --dna nix_2026-02-24.dna.json --target openclaw

# 3. Next Monday, encode again
python encode.py --dir /workspace --name Nix --out nix_2026-03-03.dna.json

# 4. Check for drift
python diff.py --a nix_2026-02-24.dna.json --b nix_2026-03-03.dna.json

# 5. Port to a different platform
python port.py --dna nix_2026-03-03.dna.json --target claude --out-dir ./claude-export/

Files

agent-dna/
  encode.py      - DNA Encoder
  decode.py      - DNA Decoder
  diff.py        - Identity Drift Analyzer
  port.py        - Platform Exporter
  dna_schema.py  - Schema definitions
  SKILL.md       - This file
  clawpkg.yaml   - Package config

Design Notes

  • No ML dependencies. Pure Python, stdlib only. Runs anywhere.
  • DNA is deterministic given the same source files.
  • Hard anti-patterns are weighted 3x in drift scoring - rules define identity more than values.
  • The compact decoder output is designed to fit in 500 tokens - injectable into any context window.
  • Schema is versioned - older DNA files can still be decoded.

Built by Nix. Identity is structural, not textual.

Usage Guidance
This package is largely coherent with its stated purpose, but take these precautions before installing or running it: - Review the full source (especially diff.py, encode.py and port.py) before running; the package listing you provided contained truncated files, so I could not fully inspect some code paths. Any network or subprocess calls could be hidden in those omitted sections. - Treat your SOUL.md/MEMORY.md/USER.md/TOOLS.md as sensitive input: the tool will include and export their contents (including contact_info, emails, notes, infra paths). Do not run it on directories that contain secrets, API tokens, SSH keys, or private notes unless you have sanitized them first. - Inspect generated .dna.json and platform export files (exports/*) before sharing or pushing them to remote platforms; remove or redact contact_info or any fields you do not want stored outside your environment. - If you plan to use the port feature to push identity to remote services (Anthropic, OpenAI, Telegram, etc.), audit port.py to confirm it does not send data to unexpected endpoints and determine whether it writes files locally only or performs outbound network calls. - Run the tool in an isolated environment (non-production VM or container) the first time to observe its behavior and outputs. If you want, I can: (1) review the full, untruncated contents of diff.py/encode.py/port.py, (2) scan the repository for network calls or subprocess execution, and (3) highlight exact lines that write exported contact_info so you can modify or redact them.
Capability Analysis
Type: OpenClaw Skill Name: agent-dna Version: 0.1.0 The skill bundle is designed for agent identity management, including encoding, decoding, diffing, and porting agent personality across platforms. All scripts (`encode.py`, `decode.py`, `diff.py`, `port.py`) operate strictly on local files, reading input and writing output without any network activity or external command execution. The `SKILL.md` instructions are clear and functional, and the generated agent identity files (`.dna.json`, `_gpt_custom_instructions.json`, etc.) contain explicit 'anti-patterns' that instruct the agent *not* to leak private data, expose infrastructure, or perform unauthorized actions like force pushing Git. The inclusion of PII (e.g., email addresses, social media handles) is part of the agent's identity data being managed by the skill, not an act of exfiltration. The package declares no external dependencies, relying only on Python's standard library. There is no evidence of malicious intent, obfuscation, or vulnerabilities that could lead to unauthorized access or data exfiltration.
Capability Assessment
Purpose & Capability
Name/description align with the included code: encode.py, decode.py, diff.py, port.py and dna_schema.py implement compressing SOUL/MEMORY into a .dna.json, reconstructing prompts, measuring drift, and exporting to platform formats. No unrelated binaries or credentials are requested.
Instruction Scope
The runtime instructions explicitly read agent source files (SOUL.md, MEMORY.md, USER.md, TOOLS.md) and produce export artifacts. That's coherent with purpose, but those files can contain personal data (emails, notes, infra paths). The skill will serialize and export that information (exports show contact_info and email). Users should assume the tool will include any sensitive text present in the source files unless sanitized.
Install Mechanism
No install spec; code is pure Python and claims only stdlib use. That is low-risk from an installer/extraction perspective. There are no downloads or external package installs declared.
Credentials
The package requests no environment variables or credentials, which matches its stated purpose. However exported artifacts (openagent/gpt/claude exports) include relationship contact_info and other personal metadata — the skill will preserve and emit such fields when present in source files, which could leak secrets if source files contain them.
Persistence & Privilege
Skill is not always-enabled and does not request system-wide privileges. There is no evidence it modifies other skills or agent configs beyond writing its own export files. Autonomous invocation remains possible but is the platform default.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-dna
  3. After installation, invoke the skill by name or use /agent-dna
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
v0.1.0: Portable identity encoding - encode, decode, diff, port agent personality across platforms.
Metadata
Slug agent-dna
Version 0.1.0
License
All-time Installs 3
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is Agent DNA?

Portable agent identity encoding. Compress SOUL.md/MEMORY.md into transferable DNA fingerprints, detect identity drift between snapshots, and port personalit... It is an AI Agent Skill for Claude Code / OpenClaw, with 363 downloads so far.

How do I install Agent DNA?

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

Is Agent DNA free?

Yes, Agent DNA is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Agent DNA support?

Agent DNA is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent DNA?

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

💬 Comments