# App variants and environment

> App variants and environment is an open-source agent skill for developer tools. Sets up dev, preview and production app variants with safe environment and secret handling. 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/app-variants-and-environment
- **Repository:** https://github.com/zakariaf/reactnative-skills
- **GitHub stars:** 16
- **License:** MIT
- **Skill name:** app-variants-and-environment
- **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 wires one Expo app into three build variants, development, preview and production, selected through APP_VARIANT. Each variant gets its own bundle identifier, app name, icon files and URL scheme so it installs beside the others without overwriting the store app. It also provides a single resolver for the variant, a Metro cache key tied to public environment values, and an EAS build profile layout where each profile names its variant and environment consistently.

The workflow covers merging the templates into an existing app config, generating badged development and preview icons, routing every public environment read through one typed reader in src/config, and moving paid or LLM API calls behind server routes so their keys never ship in the bundle. It also explains which values must stay out of git and which EAS variables to create, leaving any change to live EAS variables for the developer to approve.

The skill runs three checkers: one that evaluates the config per variant, one that scans source and files for leaked secrets and misplaced reads, and one that inspects exported bundles for test-only code. It expects an Expo project with a JavaScript or TypeScript codebase, and uses the Expo CLI and EAS CLI.

## When your agent uses it

> Wires APP_VARIANT builds: per-variant ids, names, icons, schemes, EXPO_PUBLIC_* as public, secrets in EAS/CI, test code out of store bundles. Use when adding a variant, env var, .env or secret. Not for signing (eas-build-and-submit).

## 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/app-variants-and-environment)
- [No network calls found in its scripts](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/app-variants-and-environment)
- [License: MIT](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/app-variants-and-environment)

## Features

- **Variant resolver:** Chooses development, preview or production from one function and rejects unknown or mismatched names.
- **Per-variant app identity:** Gives each variant its own bundle id, package name, display name, icons and URL scheme.
- **Public environment rules:** Treats every EXPO_PUBLIC value as public and keeps secrets in EAS or CI and server routes.
- **Test code stripping:** Uses literal comparisons at require calls so test-only modules are left out of store bundles.
- **Metro cache keying:** Keys the Metro cache version on public environment values so variants never reuse each other's bundles.
- **Checker scripts:** Runs checks on config, source, eas.json, .gitignore and exported bundles and reports pass or fail lines.

## Good for

- Add a development and preview build beside the production app
- Move an OpenAI API call behind an Expo Router API route
- Add a new public environment variable with a typed reader
- Verify that test-only screens are absent from the production bundle
- Set up EAS build profiles that match each app variant

## 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/app-variants-and-environment`:

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

For one project only, put the folder in `.claude/skills/app-variants-and-environment` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/app-variants-and-environment` 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/app-variants-and-environment &&
cp -R "$tmp/skills/app-variants-and-environment" ~/.agents/skills/app-variants-and-environment &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/app-variants-and-environment` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/app-variants-and-environment` 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/app-variants-and-environment &&
cp -R "$tmp/skills/app-variants-and-environment" ~/.cursor/skills/app-variants-and-environment &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/app-variants-and-environment` 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/app-variants-and-environment
```

Or copy the folder to `~/.gemini/skills/app-variants-and-environment` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/app-variants-and-environment`:

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

For one project only, put the folder in `.github/skills/app-variants-and-environment` 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/app-variants-and-environment` into your agent's skills folder as `app-variants-and-environment`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does App variants and environment trigger?

It is meant for adding a build variant, an environment variable, a .env file or a secret to the app. Code signing is handled by a separate skill, eas-build-and-submit.

### Which clients does App variants and environment work with?

It is a plain SKILL.md folder that follows the shared agent skills format, so it applies to all listed AI coding clients.

### Does App variants and environment store secrets in the app?

No. The skill states that EXPO_PUBLIC values are public and that secrets belong in EAS or CI variables or in API routes that read process.env on the server.

### What does the skill need to run?

It expects an Expo app and uses the Expo CLI and EAS CLI, with checker scripts written in JavaScript and TypeScript.

### How do I install App variants and environment in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/app-variants-and-environment to use it in all your projects, or to .claude/skills/app-variants-and-environment 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 App variants and environment 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 App variants and environment?

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 App variants and environment?

The closest alternatives to App variants and environment are Expo prebuild and config plugins, Eas build and submit, Expo overview, Expo overview and Expo project bootstrap.

## Where this comes from

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

## Alternatives

- [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.
- [Eas build and submit](https://ai-powered.com/skills/eas-build-and-submit): Eas build and submit is an open-source agent skill for developer tools.
- [Expo overview](https://ai-powered.com/skills/expo-overview-scaledockhq): Expo overview is an open-source agent skill for developer tools.
- [Expo overview](https://ai-powered.com/skills/expo-overview): Expo overview 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.
- [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.
- [Expo dev client](https://ai-powered.com/skills/expo-dev-client-scaledockhq): Expo dev client is an open-source agent skill for developer tools.
- [Architecture and boundaries](https://ai-powered.com/skills/architecture-and-boundaries): Architecture and boundaries is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/app-variants-and-environment
