Skip to content
Back to skills

Agent Migration

ASecurity

Safely rename or migrate an OpenClaw agent by updating config and naming, migrating session content, fixing session metadata, restarting, verifying, and asking separately before deleting the old agent.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
toolsshellbashrails

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add Lord1Egypt/awesome-skill-forge --skill agent-migration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Migration?

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

Security grade badge for Agent Migration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lord1egypt-agent-migration/badge)](https://www.skillsdirectory.com/skills/lord1egypt-agent-migration)

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: agent-migration
description: Safely rename or migrate an OpenClaw agent by updating config and naming, migrating session content, fixing session metadata, restarting, verifying, and asking separately before deleting the old agent.
input: old agent id, new agent id, new workspace, optional model change
output: new agent active; prior session content migrated unless explicitly skipped; old agent deletion handled only after separate confirmation
---

# Agent Migration

Use this skill when the user wants to rename or migrate an OpenClaw agent safely.

## Scope
This skill handles:
- agent id rename
- workspace rename
- config/path updates
- prior session content migration
- session display metadata updates
- restart and verification
- separate deletion confirmation for the old agent

## Defaults and boundaries
- Confirm old id, new id, new workspace, and whether model also changes.
- Migrate prior session content by default unless the user explicitly says not to.
- Do not skip migration just because a session does not look active.
- Do not hard-edit active lock files or force-rewrite a live session shell.
- Restart is required after migration.
- Never delete the old agent without a separate user confirmation.

## Files involved
- config: `~/.openclaw/openclaw.json`
- agent dirs: `~/.openclaw/agents/<id>/...`
- workspace: `/home/yln/claw-workspace/<name>`
- session metadata such as `sessions.json`

## Use the included files
- `references/checklist.md`
- `references/cleanup.md`
- `scripts/inspect_agent_migration.sh`
- `scripts/copy_session_content.sh`
- `scripts/verify_agent_migration.sh`

## Recommended commands
```bash
bash skills/agent-migration/scripts/inspect_agent_migration.sh <old-id> <new-id>
bash skills/agent-migration/scripts/copy_session_content.sh <old-id> <new-id>
bash skills/agent-migration/scripts/verify_agent_migration.sh <old-id> <new-id>
```

## Guardrails
- Keep config, workspace, and naming changes consistent.
- Update session display-layer metadata as part of the migration.
- Verify the new agent before offering deletion of the old one.
- Use `references/cleanup.md` only after the user separately confirms deletion.

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.

Comments

Loading comments…