export-data — команда для Claude Code: что делает и как установить
Команда export-data для Claude Code копирует локальную историю чатов, скиллы и настройки надстройки перед пересборкой машины.
Apache-2.0 ★ 41 441 обновлён 2026-09-21
/plugin marketplace add anthropics/financial-services
/plugin install claude-for-msft-365-install@claude-for-financial-servicesЧто делает export-data
Скрипты сохраняют историю разговоров, загруженные навыки, регистрации MCP, память и настройки браузерного хранилища. На macOS файлы раскладываются по приложениям, а на Windows группируются по учетным записям Office. Пути к скриптам различаются в зависимости от ОС: scripts/export-addin-data.sh для macOS и scripts/export-addin-data.ps1 для Windows.
Программа работает в режиме чтения и не изменяет файлы Office. В экспорт попадают учетные данные для входа и токены коннекторов из баз данных шлюзов MCP. На Windows папка Local Storage содержит хранилище всего профиля, включая данные сторонних сайтов.
Перед запуском на Windows требуется PowerShell, а на macOS нужна среда Bash для выполнения скриптов. Содержимое копируется в указанную папку без изменения исходных данных.
Какие задачи решает
- сохранить историю чатов перед переустановкой системы
- экспортировать регистрации MCP и настройки
- создать резервную копию локальных скиллов
- выгрузить параметры хранилища перед очисткой кэша
Примеры запросов агенту
- Запусти резервное копирование чатов через
scripts/export-addin-data.sh - Выгрузи данные надстройки в указанную папку через
scripts/export-addin-data.ps1
Как установить export-data
1Через маркетплейс плагинов
/plugin marketplace add anthropics/financial-services/plugin install claude-for-msft-365-install@claude-for-financial-services2Вручную: положить файлы
.claude/commands/export-data.mdВызов — /export-data. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/export-data.mdВызов — /prompts:export-data. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/export-data.prompt.mdВручную: положить файлы
.gemini/commands/export-data.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы об export-data
Как установить export-data в Claude Code?
Выполни последовательно команды /plugin marketplace add anthropics/financial-services, затем /plugin install claude-for-msft-365-install@claude-for-financial-services и .claude/commands/export-data.md.
Что делает export-data?
Создаёт резервную копию истории чатов, памяти, скиллов, настроек и регистраций MCP из локального хранилища браузера перед пересборкой машины.
Что нужно для работы export-data?
Для запуска требуются скрипты scripts/export-addin-data.sh на macOS или scripts/export-addin-data.ps1 на Windows, читающие данные из локального хранилища.
Исходный текст
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