# Data export and restore

> Data export and restore is an open-source agent skill for developer tools. Gives React Native apps versioned, checksummed backups with safe all-or-nothing restore. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/zakariaf/ReactNative-Skills/tree/main/skills/data-export-and-restore
- **Repository:** https://github.com/zakariaf/reactnative-skills
- **GitHub stars:** 16
- **License:** MIT
- **Skill name:** data-export-and-restore
- **Collection:** https://github.com/zakariaf/ReactNative-Skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill builds a backup feature for a React Native app. Backups are versioned, checksummed files of the user's data tables that only the app can restore. A restore checks the whole file before writing anything, saves a private copy of the current data as a safety net, and then replaces every table inside a single transaction, so it either completes or changes nothing.

The skill also covers CSV export. Every CSV goes through one guarded encoder that protects against spreadsheet formula injection and broken rows, and machine-readable formats hold canonical values only. Files are written atomically through a temp file and a move, and export, file picking and restore run only from a user's press. Protected data such as entitlements, diagnostics and secrets is kept out of backups by design.

It expects an app whose database layer already exists with migrations and a typed Result module, and it depends on the Expo file system, sharing and document picker modules. It includes TypeScript templates, frozen backup fixtures, round-trip tests and a Node checker script that verifies the setup.

## When your agent uses it

> Builds data export and restore - a versioned, checksummed backup file, all-or-nothing restore, safe CSV. Use when adding backup, restore, import, export or CSV files. Not for the database (persistence-and-migrations).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs JavaScript and TypeScript scripts](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/data-export-and-restore)
- [No network calls found in its scripts](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/data-export-and-restore)
- [License: MIT](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/data-export-and-restore)

## Features

- **Versioned backup envelope:** Each backup file carries format, versions, UTC export time and a SHA-256 payload checksum ahead of its data.
- **Whole-file validation before restore:** A picked file passes size, format, checksum and per-row schema checks before any data is written.
- **All-or-nothing restore:** Restore shows a preview, saves a safety copy, then replaces all backed-up tables in one transaction.
- **Upgrade chain for old backups:** Older backup versions are upgraded through pure steps that a parity test ties to the database migrations.
- **Guarded CSV export:** CSV cells are protected against formula injection and quoted per RFC 4180, with UTF-8 BOM for spreadsheets.
- **Atomic file publishing:** Exports are written to a temp file and moved into place, with free space checked first.

## Good for

- Add a backup and restore screen to my React Native app
- Export my tasks to a CSV file that opens cleanly in a spreadsheet
- Let users restore from a backup file without losing their current data
- Check that old backup files still restore after a schema change

## Install

### Claude Code

This skill ships in the `react-native` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add zakariaf/ReactNative-Skills
/plugin install react-native@react-native-skills
```

Or copy only this skill to `~/.claude/skills/data-export-and-restore`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/data-export-and-restore &&
cp -R "$tmp/skills/data-export-and-restore" ~/.claude/skills/data-export-and-restore &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/data-export-and-restore` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/data-export-and-restore` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/data-export-and-restore &&
cp -R "$tmp/skills/data-export-and-restore" ~/.agents/skills/data-export-and-restore &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/data-export-and-restore` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/data-export-and-restore` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/data-export-and-restore &&
cp -R "$tmp/skills/data-export-and-restore" ~/.cursor/skills/data-export-and-restore &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/data-export-and-restore` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/zakariaf/ReactNative-Skills.git --path skills/data-export-and-restore
```

Or copy the folder to `~/.gemini/skills/data-export-and-restore` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/data-export-and-restore`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/data-export-and-restore &&
cp -R "$tmp/skills/data-export-and-restore" ~/.copilot/skills/data-export-and-restore &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/data-export-and-restore` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git
```

Then copy `ReactNative-Skills/skills/data-export-and-restore` into your agent's skills folder as `data-export-and-restore`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Data export and restore can be used?

It expects an app database layer from persistence-and-migrations and the Result module from error-handling-typed-results, plus the expo-file-system, expo-sharing and expo-document-picker packages.

### Can a CSV file be restored?

No. CSV and reports are export-only, and restore accepts only the backup envelope; a CSV fails with a not-a-backup reason.

### What happens to the current data during a restore?

The current data is written to a private safety copy first, and the app offers it back as an undo. If the copy cannot be made, the restore does not run.

### Are entitlements or secrets included in backups?

No. Entitlements, diagnostics and secrets are excluded from both backup and restore, and each excluded table must list its reason.

### How do I install Data export and restore in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/data-export-and-restore to use it in all your projects, or to .claude/skills/data-export-and-restore in one project. Or install the react-native plugin, which includes it: /plugin marketplace add zakariaf/ReactNative-Skills, then /plugin install react-native@react-native-skills.

### Does Data export and restore run scripts?

Yes. It runs JavaScript and TypeScript scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Data export and restore?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Data export and restore?

The closest alternatives to Data export and restore are Game session host, Auth and secure storage, Crash reporting and observability, Expo prebuild and config plugins and Debug menu and test hooks.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Game session host](https://ai-powered.com/skills/game-session-host): Game session host is an open-source agent skill for developer tools.
- [Auth and secure storage](https://ai-powered.com/skills/auth-and-secure-storage): Auth and secure storage is an open-source agent skill for developer tools.
- [Crash reporting and observability](https://ai-powered.com/skills/crash-reporting-and-observability): Crash reporting and observability is an open-source agent skill for developer tools.
- [Expo prebuild and config plugins](https://ai-powered.com/skills/expo-prebuild-and-config-plugins): Expo prebuild and config plugins is an open-source agent skill for developer tools.
- [Debug menu and test hooks](https://ai-powered.com/skills/debug-menu-and-test-hooks): Debug menu and test hooks is an open-source agent skill for developer tools.
- [App startup and bootstrap](https://ai-powered.com/skills/app-startup-and-bootstrap): App startup and bootstrap is an open-source agent skill for developer tools.
- [Background tasks](https://ai-powered.com/skills/background-tasks): Background tasks is an open-source agent skill for developer tools.
- [Expo project bootstrap](https://ai-powered.com/skills/expo-project-bootstrap): Expo project bootstrap is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/data-export-and-restore
