---
title: "Migrate from Claude Code & Desktop to Elf"
slug: migrate-claude-to-elf
htmlUrl: https://elf.dance/guides/migrate-claude-to-elf
markdownUrl: https://elf.dance/guides/migrate-claude-to-elf/md
description: "Move skills, CLAUDE.md instructions, MCP servers, and session history from Claude into Elf with Grade B+ fidelity and zero credential leakage."
status: published
author: "ELF"
evidenceLevel: public-docs-and-design
lastReviewedAt: 2026-12-03
lastModifiedAt: 2026-12-03
publishedAt: 2026-12-03
lastTestedAt: 2026-12-03
cacheKey: "sha256:migrate-claude-to-elf-20261203-v2"
workflowId: "stitch-migration"
workflowRepo: "ch5/elf-hands"
workflowPath: "tools/elf-hands/wf-dialog/workflows/lib/stitch-migrations.py"
portabilityGrade: "B+"
---

# Migrate from Claude Code & Desktop to Elf

Move skills, CLAUDE.md instructions, MCP servers, and session history from Claude into Elf with Grade B+ fidelity and zero credential leakage.

## Portability Receipt

- **Round-trip grade:** `B+`
- **Original bytes preserved:** Yes
- **Loss disclosed:** Yes

### Portable directly

- SKILL.md folders under ~/.claude/skills/ and project .claude/skills/
- MCP stdio and HTTP server entries from ~/.claude.json and claude_desktop_config.json
- Project and user CLAUDE.md instruction files (digest-addressed)

### Requires translation

- Claude Code hook matchers -> Elf hook manifest entries
- Claude Desktop project prompts -> Elf pack instruction blocks
- Local JSONL session transcripts -> elf.session.v1 normalized pack

### Unsupported

- Hosted Anthropic account billing state and cloud-only project caches
- Proprietary server-side memory indices not exposed in local files

### Credential checklist

- ANTHROPIC_API_KEY (user-supplied env or Elf Vault entry; never copied into pack)
- MCP OAuth / bearer environment references from source server env blocks

## Steps

### Step 1: Generate the stitched Claude-to-Elf pack specification

Run the deterministic migration stitcher against export-from-claude.yaml and import-into-elf.yaml to emit the compatibility buckets and merge rules.

**Agent action (`cli`):**

```sh
python3 tools/elf-hands/wf-dialog/workflows/lib/stitch-migrations.py --source claude --target elf --out-dir ./claude-to-elf-pack
```

### Step 2: Inspect the zero-secret credential checklist and source paths

Confirm that API keys and MCP server tokens stay out of original-bytes/claude/ and are listed only as environment variable references in the emitted pack.

**Agent action (`cli`):**

```sh
ls -la ~/.claude/skills ~/.claude.json && cat ./claude-to-elf-pack/migrate-claude-to-elf.guide.json
```

### Step 3: Archive untouched originals alongside normalized Elf manifests

Stage normalized skills, instructions, and MCP definitions while archiving untouched Claude source bytes under original-bytes/claude/ so future reverse moves stay lossless.

**Agent action (`cli`):**

```sh
ls -la ~/.elf/skills ~/.elf/AGENTS.md ./claude-to-elf-pack
```

### Step 4: Verify SHA-256 original-bytes retention and portability receipt

Check that sha256-manifest.json digests match every archived original file and that skills and AGENTS.md load cleanly under ~/.elf.

**Agent action (`cli`):**

```sh
cat ./claude-to-elf-pack/sha256-manifest.json
```

Moving from Claude Code or Claude Desktop into Elf keeps your skills, project instructions, and MCP tooling intact while storing untouched source bytes alongside the normalized Agent Pack.

## What moves and what stays behind

| Bucket                   | Items handled                                                                      | Fidelity notes                                                                      |
| ------------------------ | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| **Portable directly**    | `SKILL.md` skills, `.mcp.json` / `claude_desktop_config.json` servers, `CLAUDE.md` | SHA-256 digest preserved; safe merge never overwrites existing Elf objects silently |
| **Requires translation** | Claude hook matchers, Desktop prompts, JSONL session tails                         | Translated into Elf manifests; original source bytes remain in `original-bytes/`    |
| **Unsupported**          | Hosted Anthropic billing state and server-side private memory                      | Disclosed up front in the dry-run plan before any write occurs                      |

## Zero-secret pack guarantee

Secrets never travel inside an exported Agent Pack. Instead, the migration planner strips literal tokens from MCP `env` blocks and emits a **Credential checklist** referencing your local environment variables or Elf Vault items.

## Leaving Elf uses the same bar

Portability is symmetric: when you want to move back out of Elf to Claude, follow the parity guide at [Migrate from Elf to Claude Code & Desktop](/guides/migrate-elf-to-claude).

## Workflow Reference

```elf-hands
{
  "repo": "ch5/elf-hands",
  "path": "tools/elf-hands/wf-dialog/workflows/lib/stitch-migrations.py",
  "workflowId": "stitch-migration",
  "variables": {
    "preserveOriginals": true,
    "source": "claude",
    "target": "elf"
  }
}
```

## Sources

- https://docs.anthropic.com/en/docs/claude-code/mcp
- https://git.ch5.me/ch5/ch5-company/src/branch/main/docs/strategy/elf-portable-life/PORTABILITY.md
- https://git.ch5.me/ch5/ch5-company/src/branch/main/docs/strategy/elf-portable-life/MIGRATION_ENGINE.md
