Skip to main content
command CX Codex official · Anthropic

export-data — Claude Code command: what it does, how to install

The export-data command for Claude Code copies chat history, skills, and settings before a machine is rebuilt.

Apache-2.0 ★ 41,441 updated 2026-09-21

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add anthropics/financial-services
/plugin install claude-for-msft-365-install@claude-for-financial-services
Open on GitHub

What export-data does

The scripts read browser storage to back up conversation history, uploaded skills, MCP registrations, memory, and settings. macOS organizes files by application, while Windows groups them by signed-in Office account. Platform scripts are located at scripts/export-addin-data.sh for macOS and scripts/export-addin-data.ps1 for Windows.

The utility operates in read-only mode and leaves Office files intact. The exported archive includes sign-in credentials and connector tokens from MCP gateway databases. On Windows, the local storage folder captures the entire browser profile rather than just Claude data.

Execution requires Bash on macOS and PowerShell on Windows. The scripts write only to the designated target directory without modifying original storage.

What it helps with

  • backup chat history before machine rebuild
  • export MCP registrations and settings
  • save local skills before profile wipe
  • dump browser storage data for migration

Example prompts for the agent

  • Run scripts/export-addin-data.sh to check stored data
  • Export add-in state using scripts/export-addin-data.ps1

How to install export-data

1Plugin marketplace

/plugin marketplace add anthropics/financial-services
/plugin install claude-for-msft-365-install@claude-for-financial-services

2Manually: put the files in place

.claude/commands/export-data.md

Call it with /export-data. For all projects use ~/.claude/commands/

Questions about export-data

How to install export-data in Claude Code?

Run /plugin marketplace add anthropics/financial-services, then /plugin install claude-for-msft-365-install@claude-for-financial-services, and .claude/commands/export-data.md.

What does export-data do?

It copies chat history, uploaded skills, memory, settings, and MCP registrations from local browser storage before rebuilding a machine.

What is needed to use export-data?

You need either the Bash script scripts/export-addin-data.sh on macOS or the PowerShell script scripts/export-addin-data.ps1 on Windows.

Source text

export-data.md · Apache-2.0
---
description: Export a copy of a user's add-in chat history, skills, MCP registrations, and settings before a machine is rebuilt
---

# Export add-in data

Chat history, uploaded skills, MCP registrations, memory, and settings live in browser
storage **on the user's own machine**. Anthropic does not back up this data and
cannot restore it into the add-in. These scripts make a copy of it.

| Platform | Script |
|---|---|
| macOS | `scripts/export-addin-data.sh` |
| Windows | `scripts/export-addin-data.ps1` |

**Read only.** They read Office's storage and write only to the folder you
name. They never modify, move, or delete anything in Office. Run with no
arguments and they just print what they found.

```bash
./scripts/export-addin-data.sh                      # macOS: list
(umask 077; ./scripts/export-addin-data.sh --out ~/claude-export)
```
```powershell
.\scripts\export-addin-data.ps1                     # Windows: list
.\scripts\export-addin-data.ps1 -Out "$env:USERPROFILE\claude-export"
```

## Why reinstalling the add-in doesn't lose anything

The manifest is a **pointer, not a container**. It holds an `<Id>`, a
`<Version>`, and a `<SourceLocation>` URL — and no data. Office reads it,
then opens that URL in an embedded browser (WKWebView on macOS, WebView2 on
Windows). From there the ordinary web rules apply: that browser gives
IndexedDB to the page's **origin** — `scheme://host:port` — exactly as Chrome
or Safari would.

So the ID and the storage live on two different keys:

```
  manifest.xml                       the WebView                storage bucket
  ┌──────────────────────┐           ┌───────────────┐          ┌─────────────┐
  │ <Id>  3499c065-…     │──ignored─╳│               │          │             │
  │ <Version> 1.0.0.11   │──ignored─╳│  loads  URL   │──origin─▶│ IndexedDB   │
  │ <SourceLocation>     │──────────▶│               │          │  for that   │
  │   https://host/…     │           └───────────────┘          │   origin    │
  └──────────────────────┘                                      └─────────────┘
         ▲                                                             ▲
         │ replaced / deleted / re-ID'd / version-bumped               │
         └──── none of this reaches ───────────────────────────────────┘
```

Deleting a manifest is like deleting a bookmark: the site's cookies don't go
with it. Put a new manifest in place pointing at the same URL and the same
bucket is waiting — the ID it carries is irrelevant to the lookup.

You can see this directly: a pilot manifest and a production manifest with
**different `<Id>`s** that both point at `https://pivot.claude.ai` share one
store, because the origin is the same. The add-in ID appears nowhere in the
storage path.

So all of these keep the history in place, with nothing to do:

- replacing the manifest with a new one
- deleting the manifest, or uninstalling and reinstalling
- moving between a sideloaded manifest and the store listing
- a version bump, or a fresh `<Id>` to dodge the Admin Center cache

What **does** move the data is a change to the origin or to the profile
holding it:

| Change | Effect |
|---|---|
| Add-in served from a new host, or `https`→`http`, or a different port | New origin → new empty bucket. The old one still exists but nothing reads it. |
| Machine rebuilt, or the browser profile wiped | Gone. Anthropic cannot restore it. |
| Windows: Office signed into a different account | Different profile path → different bucket. Reversible — sign back in. |

## When you need this

Export when the machine or the storage location is about to change:

| Situation | Why |
|---|---|
| A PC or Mac is being rebuilt, reimaged, or handed to someone else | Anthropic cannot restore this data. |
| Clearing the Office add-in cache on **Windows** | The add-in's storage lives inside the `Wef` folder, so "delete the Wef folder" removes chat history too. On macOS these are separate trees and clearing the cache is harmless. |
| Roaming-profile / FSLogix cleanup, or Edge policies like `ClearBrowsingDataOnExit` | Wipes the browser profile the add-in stores into. |
| Old conversations matter | History keeps the 50 most recent chats per app, and drops the oldest automatically when storage runs low. |

## What is in the export

A plain folder tree, grouped by Office app (macOS) or signed-in account
(Windows), then by website:

```
claude-export/
└── Excel/                            macOS groups by app — each Office app has
    ├── pivot.claude.ai/              its own sandbox, so each keeps separate history
    │   ├── claude-chat-history/
    │   ├── claude-local-skills/
    │   ├── claude-mcp-gateways/
    │   ├── claude-memory/
    │   └── local-storage/            settings, sign-in credentials, onboarding + terms
    └── addins.contoso.com_8443/      a non-default port is kept in the name:
        └── …                         :8443 is a different origin, so a different store
```

Windows groups by signed-in Office account instead of by app, and its
localStorage is one store shared by every origin on that profile, so it is
copied whole and sits beside the origin folders:

```
claude-export\
└── <guid>_ADAL__2\                    the Office account (see "Putting data back")
    ├── pivot.claude.ai\
    │   └── https_pivot.claude.ai_0.indexeddb.leveldb\
    ├── addins.contoso.com_8443\
    └── Local Storage\                 ⚠ whole profile store — ALL origins, not
        └── leveldb\                     just Claude's. Chromium cannot split it.
```

That last folder is the one exception to "only Claude's data". localStorage —
settings, sign-in credentials, the inference config, the onboarding and
terms-accepted flags — is a single LevelDB per profile shared by every origin,
so it cannot be filtered down to one add-in. It is copied whole rather than
dropped, and its size is printed on every run, including the argument-less
preview. If that is unacceptable under your data policy, delete `Local Storage`
from the export; everything else is Claude-only. On macOS localStorage *is*
per-origin, so there it appears as a `local-storage/` folder inside each origin
with nothing extra.

Both layouts are **relabelled for readability, not a path mirror** — the real
locations are nested under salted hashes (macOS) or `…\2\[n]\EBWebView\Default\`
(Windows). Copying the export back over those paths will not work; see
[Putting data back](#putting-data-back).

The export **contains the add-in's sign-in credentials**, because they sit in
the same local storage the scripts copy, and it contains conversation text. It
also holds the connector tokens in the `claude-mcp-gateways` database, which is
its own folder on macOS and sits inside the `.indexeddb.leveldb` folder on
Windows, so deleting the local storage folder from the export does not remove
every credential. On Windows the `Local Storage` folder is the whole profile's
store, so it also holds whatever other add-ins and sites keep there, which can
include their credentials. A rebuilt machine signs in again regardless.

Treat an export folder as a secret. The scripts set no permissions of their
own, so the copy is only as private as the folder you write it to: keep it
somewhere only the people who need it can read, not a shared location (by
default, a folder created directly under `C:\` is readable by every user of
that PC, and a new folder directly in a macOS home folder by every local account
on that Mac, which is why the macOS example runs under `umask 077`; a folder
that already exists keeps the permissions it has). The example paths are inside
the user's profile on that device: before a rebuild, reimage or profile cleanup,
move the export off the device to storage only the people who need it can read,
or it is wiped along with the original.

### Checking an export is complete

On macOS the stores are SQLite, so compare the copy against the original:

```bash
sqlite3 <path>/IndexedDB.sqlite3 'SELECT sum(length(value)) FROM Records;'
```

Matching totals means the copy is whole. Note that `PRAGMA integrity_check`
and `SELECT count(*)` both fail with **`no such collation sequence: IDBKEY`**
— WebKit registers that collation at runtime and the `sqlite3` CLI has no way
to. That error says nothing about the copy; it appears on the *original* file
too. Don't read it as corruption.

## Putting data back

The scripts do not do this, on purpose. Writing into Office's storage risks
damaging a working setup, and the right move depends on why the data went
missing. Keep the export: it is your copy if the data on the device is lost.
Anthropic support cannot restore it into the add-in for you, and there are no
published steps for loading an export back in. If the earlier store is still on
a Windows PC, see
[Restore the earlier store on Windows](https://claude.com/docs/office-agents/data-storage#restore-the-earlier-store-on-windows).

One case worth checking first, because it needs no recovery at all: on
Windows the storage path includes the **signed-in Office account** —

```
%LOCALAPPDATA%\Microsoft\Office\16.0\Wef\webview2\<account>\2\[n]\EBWebView\
```

A GUID ending `_ADAL` is a work or school account; one ending `_LiveId` is a
personal Microsoft account. If Office is signed into a different account than
the one the chats were created under, the add-in reads a different folder and
the history looks gone. **Signing back into the original account brings it
back on its own — no copying needed.** Run the export script with no arguments
to see which account folders exist on the machine; it labels each one.

## Where the data lives

Point a skeptical admin at the folder — it is plain and readable without
running anything. Both scripts print these paths in their `--help` /
`Get-Help` output too.

**Windows** — paste into File Explorer:

```
%LOCALAPPDATA%\Microsoft\Office\16.0\Wef\webview2
```

Then `<account>\2\[n]\EBWebView\Default\IndexedDB\`, where folders are named
after the origin, e.g. `https_pivot.claude.ai_0.indexeddb.leveldb`.

**macOS** — per-app sandbox container, so each app has its own history:

```
~/Library/Containers/com.microsoft.Excel/Data/Library/WebKit/WebsiteData/Default
```

Each subfolder is one origin, named with a salted hash — read the plaintext
`origin` file inside to see which. Chat history is
`IndexedDB/<uppercase SHA-256 of "claude-chat-history">`; check that hash with
`printf 'claude-chat-history' | shasum -a 256`.

© Anthropic · Apache-2.0 · anthropics/financial-services

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set116

The whole set →
earnings-reviewer earnings-reviewer — a subagent for Claude Code automating end-to-end earnings event processing. It analyzes call transcripts and filings to update financial models and draft post-earnings notes. CX Codex ★ 41,441repo stars update-user-attrs The update-user-attrs Claude Code command sets per-user configuration through Microsoft Entra ID extension attributes. It updates one user or processes a CSV file. CX Codex +1 ★ 41,441repo stars setup A setup command for Claude Code that guides administrators through connecting the Claude Office add-in to their cloud infrastructure. CX Codex +1 ★ 41,441repo stars manifest This Claude Code command builds an add-in XML manifest with cloud settings. Outlook uses a separate template and needs Microsoft Graph admin consent before deployment. CX Codex +1 ★ 41,441repo stars entra-app This Claude Code command explains how to register a Microsoft Entra app in your own tenant. It covers sign-in setup for Outlook, gateways, Foundry, and sovereign clouds. CX Codex +1 ★ 41,441repo stars debug debug — a command for diagnosing deployment issues with office add-ins. It triggers when connection errors occur, configurations become stale, or the add-in fails to appear in host applications. CX Codex +1 ★ 41,441repo stars consent This Claude Code command guides Azure admin consent for Entra SSO and Outlook access to Microsoft Graph. A tenant admin opens the supplied URL and approves the permissions. CX Codex +1 ★ 41,441repo stars bootstrap bootstrap — a command for Claude Code that builds an endpoint for dynamic configuration and MCP server management. It runs during extension startup to push user-specific settings. CX Codex +1 ★ 41,441repo stars

Project sponsors

Companies that keep this analytics open