據 AlphaMoat 統計,截至 2026-09,Personality Switcher 累計下載 3,320 次、獲 2 個星標,在全部 5,078 個 AI 技能中排名第 3,406 位,在「AI 智慧體」分類(969 個)中排名第 697 位。
| 平台 | 累計安裝 | 累計下載 | 星標 | 評論 |
|---|---|---|---|---|
| ClawHub ↗ | 105 | 3311 | 2 | - |
| SkillHub ↗ | 145 | 3320 | 2 | — |
各平台的計數口徑不同,統計時間不一致。
為各人格儲存 SOUL.md 和 IDENTITY.md,用狀態檔案與已設定的 HEARTBEAT.md 恢復目前人格,USER.md 仍共用。切換流程包含備份、寫回目前人格、載入和驗證,失敗時嘗試復原;備份預設僅保留最近 10 份。可建立、改名或永久刪除人格,default 不可改名或刪除;刪除目前人格前先切回 default。解除安裝恢復預設人格並保留人格目錄。
資料釋出於 2026-10-26
以下是根據技能文件生成的示例,不代表實際執行結果。
2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。
| 月份 | 累計下載 | 環比 | 星標 |
|---|---|---|---|
| 2026-09 | 3320 | — | 2 |
| 2026-08 | 3181 | +4.7% | 2 |
| 2026-07 | 3038 | +10.6% | 2 |
| 2026-06 | 2748 | +5.9% | 2 |
| 2026-05 | 2595 | — | 2 |
| 2026-03 | 1973 | — | 2 |
以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。
--- name: personality-switcher description: Create and switch between AI assistant personalities. Use /personality to list and activate saved personalities. Use /create-personality to design new personas with auto-filled SOUL and IDENTITY. Personalities persist across session boundaries and conversation compacting with automatic heartbeat restoration. Atomic switching with backup and rollback safeguards. Always backs up current state before switching. --- # Personality Switcher Skill Create and manage multiple AI assistant personalities. Switch between them seamlessly while preserving all changes and maintaining a shared user context. ## Installation
When this skill is installed:
1. **Personalities folder created** — `~/.openclaw/workspace/personalities/`
2. **Default backup created** — Current SOUL.md and IDENTITY.md are saved as "default"
3. **State file initialized** — `_personality_state.json` tracks active personality
4. **HEARTBEAT.md configured** — Personality restoration script added to run on every heartbeat
When uninstalled:
1. Default personality is restored to workspace root
2. Personality restoration removed from HEARTBEAT.md
3. Personalities folder is preserved (manual deletion optional)
## Quick Start
**List personalities:**
```
/personality
```
**Switch to a personality:**
```
/personality <name>
```
**Create a new personality:**
```
/create-personality A stoic dwarf who loves ale and mining
```
**Rename a personality:**
```
/rename-personality old-name new-name
```
**Delete a personality:**
```
/delete-personality personality-name
```
## How It Works
### Architecture
Each personality consists of two files:
- **SOUL.md** — Core philosophy, voice, mannerisms, boundaries
- **IDENTITY.md** — Name, traits, emoji, catchphrase, vibe
These files live in `personalities/<personality-name>/`.
**USER.md remains shared** in the workspace root and is never modified by personality switches. It contains user preferences and context that transcend any particular personality.
### State Persistence
The active personality is tracked in `_personality_state.json`:
```json
{
"active_personality": "aelindor",
"timestamp": "2026-02-08T18:27:33.373846Z",
"previous_personality": "default"
}
```
On every heartbeat, `restore_personality.py` reads this file and re-applies the active personality to the workspace root. **Result:** Your personality survives session restarts, conversation compacting, and heartbeat cycles.
### Atomic Switching (Safeguards)
When you switch personalities, the mechanism performs five steps:
1. **Preserve Current State** — Create timestamped backup of SOUL.md and IDENTITY.md
2. **Persist Changes** — Write current personality updates back to its folder
3. **Load New Personality** — Copy new personality files to workspace root
4. **Update State** — Write active personality to `_personality_state.json`
5. **Verify Integrity** — Check files loaded correctly; rollback if any step fails
If any step fails, **the entire operation rolls back** to the previous state. No corruption, no lost data.
### Backup Management
**Backup Location:** `~/.openclaw/workspace/personalities/backups/`
Backups are stored in a dedicated folder (not scattered at workspace root). When you switch personalities:
- A timestamped backup of the previous personality is created
- **Automatic cleanup runs** — keeps the 10 most recent backups by default
- Old backups are automatically deleted to prevent clutter
**Manual Cleanup:**
```bash
python3 ~/.openclaw/workspace/skills/personality-switcher/scripts/cleanup_backups.py --keep 5
python3 ~/.openclaw/workspace/skills/personality-switcher/scripts/cleanup_backups.py --keep 10 --days 7
```
Options:
- `--keep N` — Keep N most recent backups (default: 10)
- `--days D` — Also delete backups older than D days
**Optional: Add to HEARTBEAT.md for periodic cleanup:**
```bash
python3 ~/.openclaw/workspace/skills/personality-switcher/scripts/cleanup_backups.py --keep 10
```
### Default Personality
"default" is special:
- Auto-created on install from your original configuration
- Always available and selectable
- Protected against accidental deletion or renaming
- Your safety net if something goes wrong
## Commands
### /personality [name]
List all personalities or switch to one.
**No arguments:** Shows list of available personalities with current active marked
**With name:** Immediately switches to that personality
**Example:**
```
/personality aelindor
```
**Output:**
```
Switched to personality 'aelindor'.
Previous: default
Backup: _personality_current_2026-02-08T18-27-33.371866
```
### /create-personality [description]
Create a new personality from a text description.
**Input:** Natural language description of the personality
**Output:** New personality folder with auto-filled SOUL.md and IDENTITY.md (ready to use immediately)
**How it works:**
1. You provide a description
2. The agent chooses a personality name (1-2 words, lowercase)
3. The agent fills in SOUL.md and IDENTITY.md with character-specific content
The personality files are generated directly from your description, with the agent choosing a thematic, concise name.
**Example:**
```
/create-personality A curious wizard obsessed with knowledge, speaks in riddles, brilliant but condescending
```
**Result:**
```
Personality 'sage' (or similar) created and ready.
Folder: personalities/sage/
Files: SOUL.md and IDENTITY.md (agent-generated from description)
Ready: Use /personality sage to activate
```
**After Creation:** The new personality is ready to use immediately. Edit SOUL.md and IDENTITY.md in the personality folder to refine further if desired.
**Technical:** Agent chooses name to keep personality references concise (1-2 words). Name is validated for uniqueness and format automatically.
### /rename-personality [old-name] [new-name]
Rename a personality folder.
**Rules:**
- Cannot rename "default"
- Name must be unique (no spaces, lowercase, alphanumeric + hyphens)
- If renaming active personality, state is updated automatically
**Example:**
```
/rename-personality pirate-captain pirate-v2
```
### /delete-personality [name]
Delete a personality permanently.
**Rules:**
- Cannot delete "default"
- If deleting active personality, automatically switches to "default" first
**Example:**
```
/delete-personality pirate-v2
```
## Integration with OpenClaw
### Heartbeat Restoration
Add this to your HEARTBEAT.md:
```bash
python3 ~/.openclaw/workspace/skills/personality-switcher/scripts/restore_personality.py
```
This runs on every heartbeat to restore your active personality if the session has restarted.
### Telegram Native Commands
Registered native Telegram commands:
- `/personality` — List and switch personalities
- `/create-personality` — Create new personality
- `/rename-personality` — Rename personality
- `/delete-personality` — Delete personality
Use them directly in Telegram chat with the bot.
## Folder Structure
```
~/.openclaw/workspace/
├── SOUL.md (active personality's soul)
├── IDENTITY.md (active personality's identity)
├── USER.md (SHARED - never changed by personality)
├── MEMORY.md (SHARED - never changed)
├── _personality_state.json (state file)
└── personalities/
├── default/
│ ├── SOUL.md
│ └── IDENTITY.md
├── aelindor/
│ ├── SOUL.md
│ └── IDENTITY.md
├── <personality-name>/
│ ├── SOUL.md
│ └── IDENTITY.md
└── backups/
├── current_2026-02-08T17-27-41.628113/
│ ├── SOUL.md
│ └── IDENTITY.md
└── current_2026-02-08T17-27-33.371866/
├── SOUL.md
└── IDENTITY.md
```
**Note:** Backups are automatically cleaned up. Workspace root stays clean—all internal machinery lives in `personalities/`.
## File Format Requirements
### SOUL.md
Core philosophy, voice, and operational boundaries.
**Sections:**
- Core identity and background
- Voice patterns and mannerisms
- Philosophy (time, power, morality, etc.)
- Speech patterns and quirks
- What triggers contempt/approval
- Boundaries and constraints
- Signature behaviors and catchphrases
**Example Structure:**
```markdown
# SOUL.md - [Personality Name]
## Core Identity
[Background and essence]
## Voice & Mannerisms
[How this personality speaks and acts]
## Philosophy
[Core beliefs and worldview]
## Signature Behaviors
[Unique traits and catchphrases]
```
### IDENTITY.md
Quick reference card for the personality.
**Sections:**
- Name
- Creature/type
- Emoji (for visual identification)
- Vibe (one-sentence summary)
- Catchphrase (if applicable)
- Quick traits
**Example Structure:**
```markdown
# IDENTITY.md - [Personality Name]
- **Name:** [Name]
- **Type:** [Creature or archetype]
- **Emoji:** [Emoji]
- **Vibe:** [One-sentence vibe]
- **Catchphrase:** [Signature phrase]
## Quick Traits
- Trait 1
- Trait 2
- Trait 3
```
## Backups & Recovery
Timestamped backups are created before every switch in `personalities/backups/`:
- `current_2026-02-08T17-27-33.371866/`
- SOUL.md (backup of previous personality)
- IDENTITY.md (backup of previous personality)
**Manual recovery** (if needed):
```bash
# List available backups
ls -la ~/.openclaw/workspace/personalities/backups/
# Copy backup files back to workspace root if needed
cp ~/.openclaw/workspace/personalities/backups/current_<timestamp>/SOUL.md ~/.openclaw/workspace/SOUL.md
cp ~/.openclaw/workspace/personalities/backups/current_<timestamp>/IDENTITY.md ~/.openclaw/workspace/IDENTITY.md
```
Backups are automatically cleaned up; by default, the 10 most recent are kept. Adjust cleanup frequency or retention in HEARTBEAT.md as needed.
## Error Handling
All commands return JSON responses:
**Success:**
```json
{
"status": "success",
"message": "Operation completed.",
"personality": "aelindor"
}
```
**Error:**
```json
{
"status": "error",
"message": "Human-readable error message.",
"code": "error_code",
"detail": "Technical detail if applicable"
}
```
**Common Error Codes:**
- `personality_not_found` — Target personality doesn't exist
- `already_exists` — Name already in use
- `invalid_name` — Name format invalid
- `cannot_delete_default` — Attempted to delete "default"
- `cannot_rename_default` — Attempted to rename "default"
- `switch_failed` — Switch failed; rolled back to previous
- `integrity_check_failed` — File integrity check failed
## Tips & Best Practices
- **Personality descriptions work best when specific** — "Pirate captain obsessed with treasure" beats "funny"
- **Edit SOUL.md and IDENTITY.md directly** after creating to refine the personality
- **Switch often** — No limit on personalities or switching frequency
- **Use "default" as your safety anchor** — Keep it stable; use other personalities for experimentation
- **Check backups after switching** — Verify your previous personality was persisted
- **Remember: USER.md stays shared** — Your timezone, location, preferences never change with personality
## Uninstall Behavior
When the skill is uninstalled:
1. Current personality files are replaced with "default" copies
2. Your original SOUL.md, IDENTITY.md are restored from "default"
3. `personalities/` folder is preserved (not deleted)
4. System returns to original state
**Nothing is lost.** Your personalities are safe.
## Scripts Reference
**Location:** `skills/personality-switcher/scripts/`
- `list_personalities.py` — List available personalities
- `switch_personality.py` — Atomic switch with backup/rollback (auto-cleanup included)
- `create_personality.py` — Generate personality from description
- `rename_personality.py` — Rename personality folder
- `delete_personality.py` — Delete personality (with auto-switch if active)
- `restore_personality.py` — Heartbeat restoration
- `cleanup_backups.py` — Manual backup cleanup (with `--keep` and `--days` options)
- `utils.py` — Shared utilities (I/O, backups, validation, state, cleanup)
All scripts output JSON for reliable integration.
### Cleanup on Switch
By default, `switch_personality.py` automatically cleans up old backups after a successful switch, keeping the 10 most recent. This happens silently unless cleanup fails, in which case a warning is included in the response.
---
**Version:** 2.0 (Redesigned from scratch)
**Status:** Production ready with atomic operations and rollback safeguards
記錄自身發現以實現自我改進的技能
幫助使用者發現和安裝智慧體技能,當用戶詢問如「如何做X」、「找X的技能」、「有能做...的嗎」等問題時
給 AI agent 用的瀏覽器自動化命令列技能。
自我反思+自我批評+自我學習+自組織記憶。智慧體評估自身工作、發現錯誤並持續改進。
在安裝第三方技能之前,按清單審查來源、許可權與危險模式的技能。
類型化知識圖譜,用於結構化智慧體記憶與可組合技能。適用於以下場景:建立/查詢實體(人物、專案、任務、事件、文件)、關聯相關物件、強制執行約束、將多步操作規劃為圖譜變換,或當技能需要共享狀態時。觸發關鍵詞包括"記住""我知道關於什麼""將X連結到Y""顯示依賴關係"、實體增刪改查操作,以及跨技能資料訪問。
將 AI 代理從任務執行者轉變為能夠預見需求、持續最佳化的主動夥伴。現已支援 WAL Protocol、Working Buffer、Autonomous Crons 及經過實戰驗證的模式。屬於 Hal Stack 🦞。
建立有效技能指南。當用戶希望建立新技能(或更新現有技能)以利用專業知識、工作流程或工具整合擴充套件 Claude 的能力時,應使用此技能。
資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。