Migration · soft · optional ak migrate --from=ck

Migrate ClaudeKit to AgentKit

Back up first. Preview by default (no writes yet). Usually keeps files you customized — not a full ClaudeKit wipe.

Choose a path

Two ways to leave ClaudeKit

Path A · this page

Move gradually

ak migrate --from=ck: scans your install, proposes a plan, previews by default. Files you customized are usually kept (not an “always” promise). ClaudeKit still works if you are not ready to leave fully.

Best when you want a gradual move and keep your custom setup.

Path B · separate guide

Clean cutover

Many steps: back up → remove CK place by place → install AgentKit → remove the ck command → clean leftovers by hand. No one-shot command; --all is not every project.

Open clean cutover →

ak migrate does not wipe every ClaudeKit leftover: it disables still-pristine CK pieces (with a record), and usually keeps files you customized. Want a full remove → Path B.

Manual backup

By platform

Copy configuration directories outside agent trees before the first mutating command.

Discovery scans when present

~/.claude ~/.claudekit .claude .claudekit ~/.agentkit %USERPROFILE%

Unix

macOS / Linux

bash
bash
set -Eeuo pipefail
umask 077
STAMP=$(date +%Y%m%d-%H%M%S)
DEST=$(mktemp -d "$HOME/agentkit-pre-migrate-backup-$STAMP.XXXXXX")

copy_tree() {
  src=$1
  name=$2
  [ -d "$src" ] || return 0
  [ ! -e "$DEST/$name" ] || { echo "Refusing existing destination: $DEST/$name" >&2; return 1; }
  cp -a "$src" "$DEST/$name"
  [ -d "$DEST/$name" ] || { echo "Backup verification failed: $DEST/$name" >&2; return 1; }
}

copy_tree "$HOME/.claude" claude
copy_tree "$HOME/.claudekit" claudekit
copy_tree "$HOME/.agentkit" agentkit
echo "Safety copy completed at: $DEST"

Windows

PowerShell

pwsh
powershell
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
$dest = Join-Path $env:USERPROFILE "agentkit-pre-migrate-backup-$stamp-$([guid]::NewGuid().ToString('N').Substring(0, 8))"
if (Test-Path -LiteralPath $dest) { throw "Refusing existing destination: $dest" }
New-Item -ItemType Directory -Path $dest -ErrorAction Stop | Out-Null
$items = @(
  @{ Src = (Join-Path $env:USERPROFILE '.claude'); Name = 'claude' }
  @{ Src = (Join-Path $env:USERPROFILE '.claudekit'); Name = 'claudekit' }
  @{ Src = (Join-Path $env:USERPROFILE '.agentkit'); Name = 'agentkit' }
)
foreach ($item in $items) {
  if (Test-Path -LiteralPath $item.Src -PathType Container) {
    $target = Join-Path $dest $item.Name
    if (Test-Path -LiteralPath $target) { throw "Refusing existing destination: $target" }
    Copy-Item -LiteralPath $item.Src -Destination $target -Recurse -Force -ErrorAction Stop
    if (-not (Test-Path -LiteralPath $target -PathType Container)) { throw "Backup verification failed: $target" }
  }
}
Write-Host "Safety copy completed at: $dest"

Run in PowerShell (not CMD). Paths under %USERPROFILE%.

Behavior

What migration does

SCN

Scan

Scans a ClaudeKit (ck) install and plans a transition to AgentKit.

CLS

Classify

CK-owned/standard, custom/unknown, and active conflicts.

DRY

Dry-run default

Nothing is written until you explicitly opt in.

BKP

Backup on apply

On apply: creates a backup, then writes the target after safety gates and --yes.

Preview

No mutation

shell
ak migrate
ak migrate --from=ck
ak migrate --from=ck --json --no-interactive

Default is --dry-run=true. The preview lists categories, conflicts, recommended actions, and recovery commands.

Apply

Writes files — only after backup + a good preview

shell
ak migrate --from=ck --dry-run=false --yes
# Claude Code project plugin delivery (only when intended):
# ak migrate --from=ck --switch-to-plugin --dry-run=false --yes

Verify

After migration

shell
ak doctor --json --exit-on-fail --offline
ak backups list
# Confirm Skills in the assistant: /ak:… or $ak:…

Recovery

Rollback boundaries

  1. 1

    ak migrate rollback

    Restores pre-apply state from the latest migration journal when available.

  2. 2

    ak backups list / restore

    List and restore AgentKit backups — restore scope is limited.

  3. 3

    Manual copy

    Your agentkit-pre-migrate-backup folder is the outside-the-tool safety net.

Next