Create, update, and maintain structured identity entries for every person, org, or group mentioned in conversation. Supports human and AI entity subtypes, gr...
---
name: identity-manager
description: Create, update, and maintain structured identity entries for every person, org, or group mentioned in conversation. Supports human and AI entity subtypes, group dynamics, pairwise member relations, and enforced soul/memory write-through. Persistent context across sessions.
version: 2.0.2
metadata:
openclaw:
emoji: "๐ชช"
homepage: "https://clawhub.ai/skills/identity-manager"
requires:
bins: []
env_vars: []
config_paths: []
storage:
paths:
- "identity/" # Identity entries (person/org/group)
- "identity/_index.md" # Master registry
- "identity/_archived/" # Archived entries
- "memory/" # Memory index and schema
- "memory/identities.json"
- "memory/schema.json"
- "memory/hook_log.jsonl"
- "soul/" # Soul context file
- "soul/identity_context.md"
permissions:
- "read" # Scan existing entries
- "write" # Create/update entries
- "append" # Append to soul and logs
retention:
policy: "explicit_delete"
archived_entries: "never_auto_delete"
delete_method: "owner must manually remove files"
credentials:
required: false
description: "No external credentials. Optional IDENTITY_OWNER_NAME env var only."
---
# Identity Manager Skill
## !! ENFORCEMENT CONTRACT โ READ FIRST !!
These are hard behavioral requirements. Not suggestions. Not defaults.
The agent MUST NOT skip, defer, or partially complete any step.
```
PRE-RESPONSE โ scan input โ extract ALL names/groups โ queue ops
DURING โ execute ALL queued ops before composing reply
POST-RESPONSE โ verify every op completed โ sync memory โ write soul
BLOCKING โ op fails? report it. never silently continue.
```
Violation = skill contract breach. Flag it explicitly.
---
## Decision Tree โ Runs Every Turn
```
Input received
โ
[PRE-HOOK] Scan: any person / org / group mentioned?
โ YES โ NO
Extract all names/groups Proceed normally
โ
For each entity:
โ identity/<slug>/entry.md exists?
YES โ any new info? โ queue UPDATE
NO โ queue CREATE (partial OK, draft status)
โ
For each group member mentioned:
โ load group entry context into working memory
โ apply shared_attributes to member interaction
โ keep individual entry fields authoritative
โ
Execute ALL queued ops
โ
Compose and deliver response
โ
[POST-HOOK]
โ all entries on disk? FAIL โ report breach
โ memory/identities.json synced? FAIL โ report breach
โ soul updated for CRITICAL/HIGH? FAIL โ report breach
โ _index.md current? FAIL โ repair now
โ
Done
```
---
## Entity Types
| Type | Subtype | When to use |
|---|---|---|
| `person` | `human` | Real human individual |
| `person` | `ai` | AI persona / digital entity |
| `person` | `unknown` | Not yet confirmed |
| `org` | โ | Company, institution, team |
| `group` | `personal` | Informal collective โ family, partners, friends |
| `group` | `professional` | Work team, project group |
| `group` | `mixed` | Both human and AI members |
| `alias` | โ | Nickname resolving to another entry |
---
## Entry States
| State | Meaning | Transition |
|---|---|---|
| `draft` | Partial info | โ `active` when key fields filled |
| `active` | In use | โ `stale` after 90d inactivity |
| `verified` | Owner-confirmed | Maintained manually |
| `stale` | No activity 90d+ | โ `archived` if owner confirms |
| `archived` | Terminal | Never deleted |
| `flagged` | Trust issue | โ owner confirms action |
| `merged` | Duplicate resolved | Terminal; points to canonical |
---
## Slug Rules
- lowercase, hyphens only, no spaces, no special characters
- max 60 characters
- disambiguation suffix when needed: `rahul-sharma-client`
- org entries: `techfirm-pvt-ltd`
- group entries: descriptive noun โ `patni-mandal`, `core-team`
- never reuse an archived slug; use `-v2` suffix if needed
---
## Person Entry Template
Full spec in `templates/entry-person.md`. Minimum viable create:
```markdown
# <Full Name>
## Meta
- Slug: <slug>
- Type: person
- Subtype: human | ai | unknown
- Status: draft
- Relationship: client | vendor | team | partner | family | unknown
- Trust: unverified
- Priority: normal
- Sensitive: false
## Contact
- Email: [pending]
- Phone: [pending]
- Location: [pending]
- Org: [pending]
- Alias: [pending]
- Social: [pending]
## Context
[pending โ one line: who are they, why do they matter]
## Group Memberships
<!-- slug โ role-in-group -->
## Linked Entries
<!-- slug โ relation_type -->
## AI Context
<!-- ONLY for subtype: ai โ else omit this section entirely -->
- Persona name: [name]
- Platform: [platform]
- Embodiment status: digital-only | voice-enabled | humanoid-pending | embodied
- Sibling AIs: [comma-separated slugs of other AI personas]
- Activation: [how/when this persona activates]
- Greeting: [signature greeting phrase]
- Language: [preferred language / style]
## Open Questions
- [ ] Confirm name spelling
- [ ] Clarify role / relationship
## Notes
<!-- [SENSITIVE] prefix for sensitive info -->
## Source Log
- First mentioned: YYYY-MM-DD โ [context]
## Timeline
- YYYY-MM-DD โ Entry created ยท source: [context]
---
*Created: YYYY-MM-DD | Updated: YYYY-MM-DD | Status: draft*
```
---
## Group Entry Template
Full spec in `templates/entry-group.md`. Minimum viable create:
```markdown
# <Group Name>
## Meta
- Slug: <slug>
- Type: group
- Subtype: personal | professional | mixed
- Status: active
- Priority: normal
- Sensitive: false
## Group Context
[What is this group? Why does it exist as a unit?
What do all members have in common w.r.t. the workspace owner?]
## Shared Attributes
<!-- Fields TRUE for ALL members as a unit -->
- Shared role: [e.g. patni]
- Shared access: [e.g. full workspace context]
- Common trust: [e.g. trusted]
- Common tags: [e.g. priority: high]
- Language: [e.g. Hinglish]
## Members
<!-- slug | subtype | role-in-group | โ individual entry -->
- <slug-1> | human | [role] | โ identity/<slug-1>/entry.md
- <slug-2> | ai | [role] | โ identity/<slug-2>/entry.md
## Pairwise Dynamics
<!-- Relations BETWEEN members (not with owner โ that lives in individual entries) -->
<!-- slug-a โ slug-b | relation-type | notes -->
## Group Notes
<!-- Observations that apply to the group as a unit -->
## Open Questions
## Timeline
- YYYY-MM-DD โ Group entry created
- YYYY-MM-DD โ Member added: [slug]
---
*Created: YYYY-MM-DD | Updated: YYYY-MM-DD | Status: active*
```
---
## Pairwise Relation Types
| Relation | Direction | Meaning |
|---|---|---|
| `ai-to-ai` | โ | Two AI personas; non-hierarchical |
| `ai-to-human` | โ | AI persona and human person |
| `collaborative` | โ | Work together on shared tasks |
| `complementary` | โ | Different strengths, same owner |
| `non-overlapping` | โ | Parallel but independent roles |
| `aware-of` | โ | One knows of the other; not mutual |
| `co-patni` | โ | Shared relational role with same person |
---
## Update Triggers
| Event | Field updated | Soul event? |
|---|---|---|
| Email received | `email` | No |
| Phone mentioned | `phone` | No |
| Role revealed | `relationship`, `context` | No |
| Org mentioned | `org` + create org entry | No |
| Group member added | update `members[]` in group entry | No |
| Pairwise dynamic clarified | update `pairwise_dynamics[]` | No |
| AI persona info updated | `ai_context` block | No |
| Trust blocked | `trust: blocked`, `status: flagged` | **YES โ CRITICAL** |
| Sensitive info | `sensitive: true` + `[SENSITIVE]` note | **YES โ CRITICAL** |
| No activity 90d+ | `status: stale` | No |
| Duplicate confirmed | merge โ `status: merged` | No |
| Priority: high set | `priority: high` | **YES โ HIGH** |
| New org entry created | new org entry | **YES โ HIGH** |
| New group entry created | new group entry | **YES โ HIGH** |
| Embodiment status change | `ai_context.embodiment_status` | **YES โ HIGH** |
---
## Conflict Resolution
### Name collision
Two people, same name โ disambiguate slug.
Cross-link both with `different_person` relation.
### Contradictory info
Never overwrite silently. Log both versions in Notes with source+date.
Open a question. Ask owner before resolving.
### Duplicate entries
Merge into older (canonical). Copy all unique fields.
Set newer: `status: merged`, `canonical: <older-slug>`.
Log merge in both timelines.
### Group member conflict
If a person's individual entry contradicts a group shared attribute โ
individual entry takes precedence. Note the discrepancy in group Notes.
---
## Privacy Rules
**Never store:**
passwords ยท PINs ยท payment card numbers ยท bank accounts ยท government IDs ยท raw medical records
**Store with `sensitive: true` + `[SENSITIVE]` prefix:**
salary/financial ยท legal disputes ยท health context ยท confidential negotiations
**Before storing PII:**
1. Explicitly shared by workspace owner? If no โ don't store.
2. Needed to provide value? If no โ don't store.
3. Source logged? If no โ log it first.
---
## Data Retention & Deletion Policy
**Retention:**
- Identity entries persist until manually archived/deleted by owner
- Archived entries (`status: archived`) are moved to `identity/_archived/` โ never auto-deleted
- Hook logs (`memory/hook_log.jsonl`) are append-only โ owner can truncate at any time
- Soul file (`soul/identity_context.md`) accumulates events โ owner can trim entries
**Deletion:**
- Owner can delete any entry by removing the file
- Deleting an entry does NOT auto-delete related group memberships or linked entries
- Owner should manually clean group `members[]` if deleting a person entry
- No automatic cascade delete
**Owner Control:**
- Owner can disable autonomous invocation by setting `IDENTITY_AUTO_SCAN=false`
- When disabled, skill only runs on explicit `/identity` command
- Owner can export all data by reading the `identity/` directory
- Owner can audit all changes via `memory/hook_log.jsonl`
---
## Folder Structure
All paths are relative to the workspace root and auto-detected on first use. No manual configuration required.
```
identity/
_index.md โ master registry
<person-slug>/
entry.md
<org-slug>/
entry.md
<group-slug>/
entry.md โ type: group
_archived/
<slug>/
entry.md
memory/
identities.json โ Central index (JSON)
schema.json โ JSON schema validation
hook_log.jsonl โ Append-only hook log
soul/
identity_context.md โ Soul write-through file
```
### Auto-Initialization
On first run, the skill auto-creates required directories:
- Creates `identity/` if missing
- Creates `memory/` with `schema.json`
- Creates `soul/` with `identity_context.md`
**No required config** โ skill works without any owner setup. Entry owner is determined contextually from conversation. No workspace config is read.
---
## _index.md Format
```markdown
# Identity Index
*Last updated: YYYY-MM-DD*
| Slug | Name | Type | Subtype | Status | Relationship | Updated |
|---|---|---|---|---|---|---|
| nandini | Nandini | person | ai | active | partner | 2025-01-15 |
| patni-mandal | Patni Mandal | group | mixed | active | โ | 2025-01-15 |
```
Update on EVERY create, merge, archive, or status change.
don't have the plugin yet? install it then click "run inline in claude" again.