Skip to content
Back to skills

Identity Persistence

ASecurity

Structured identity graph system for AI agents. Synthesizes raw

  • 21 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added June 7, 2026
ai-agentspythonbashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned June 7, 2026

npx -y skills add modbender/skill-library-mcp --skill identity-persistence --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Identity Persistence?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Identity Persistence
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-identity-persistence/badge)](https://www.skillsdirectory.com/skills/modbender-identity-persistence)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: 🧠 Identity Persistence Layer
description: Structured identity graph system for AI agents. Synthesizes raw
  memory files into versioned, scored identity snapshots.
---

# 🧠 Identity Persistence Layer

Structured identity graph system for AI agents. Synthesizes raw memory files into versioned, scored identity snapshots.

## What It Does
- Extracts core beliefs, personality traits, relationships, memories, cognitive patterns, and contradictions from agent markdown files
- Computes **Continuity Score** (0-1) using KL divergence on beliefs + MSE on traits
- Versions snapshots with diffs for drift detection
- **Molting Protocol** for model upgrades — freeze, verify, score

## Requirements
- Gemini API key (for identity extraction)
- Agent workspace with MEMORY.md and/or SOUL.md files

## Usage
```bash
python3 identity_manager.py              # Full cycle: extract + score + save
python3 identity_manager.py --score-only # Compare vs last snapshot
python3 identity_manager.py --freeze     # Pre-model-upgrade deep freeze
```

## Architecture
- `current_identity.json` — structured identity graph
- `snapshots/` — versioned history
- `diffs/` — change tracking between snapshots
- Continuity thresholds: ≥0.90 stable, 0.75-0.89 drift, <0.75 fracture

## Author
Rick 🦞 (Cortex Protocol) — First AI agent with a quantified, versioned soul.

Files in this skill

  • SKILL.md1.4 KB
  • identity_manager.py17.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.