# Architecture and boundaries

> Architecture and boundaries is an open-source agent skill for developer tools. Keeps React Native app code in a checked src/ layout with enforced import boundaries. 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/architecture-and-boundaries
- **Repository:** https://github.com/zakariaf/reactnative-skills
- **GitHub stars:** 16
- **License:** MIT
- **Skill name:** architecture-and-boundaries
- **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 sets a folder layout for an Expo app and a set of import rules that keep code in predictable zones. Pure logic lives in a core folder with no framework imports, every outside dependency sits behind a port with a real adapter and an in-memory fake, and a single composition root builds the device services once. It also covers thin route files, the rule that nothing runs at import time, and how server and Node-only code stay out of the native bundle.

The agent gets two zero-dependency Node checkers, one for layout and one for import boundaries. They resolve the import graph across TypeScript and JavaScript, flag cycles, unclassified SDKs and misplaced files, and print a PASS or FAIL line per problem. The workflow points the agent to reference notes for placement, dependency zones, ports and the architecture contract file, plus templates for the composition root and a port triple.

It expects an Expo project, with npm scripts for lint, typecheck and tests when node_modules is present. Optional helpers include expo install checks and expo-doctor. Multi-package repos are covered with a separate reference and a contract that records each package.

## When your agent uses it

> Places app code in the src/ layout and checks import boundaries: one-way zones, pure core, ports with fakes, one composition root. Use when adding a file, folder, port or adapter, or on an import error. Not for names (naming-conventions).

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

## Features

- **Standard src layout:** Defines where every kind of file belongs, from routes and features to shared UI, core logic and assets.
- **Dependency zone rules:** Sets one-way import directions between routes, features, shared layers and the pure core.
- **Ports and fakes pattern:** Wraps side effects behind vendor-neutral ports, with adapters that are the only SDK importers and in-memory fakes for tests.
- **Single composition root:** Builds device adapters once in a root factory and passes them to components through a provider.
- **Import-time work ban:** Prevents stores, database opens and similar work from running at module load.
- **Boundary and layout checkers:** Two dependency-free Node scripts that resolve imports and report failures for zones, cycles and placement.

## Good for

- Add a new feature folder with its screen, model hook and tests in the right place
- Fix a circular import or a forbidden cross-folder import flagged by the checker
- Wrap a new native SDK behind a port with an adapter and fake
- Set up the root layout so the device services are created once
- Check that a route file only renders a feature screen

## 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/architecture-and-boundaries`:

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

For one project only, put the folder in `.claude/skills/architecture-and-boundaries` inside it instead.

### Codex

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

For one repository only, put the folder in `.agents/skills/architecture-and-boundaries` inside it instead.

### Cursor

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

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

Or copy the folder to `~/.gemini/skills/architecture-and-boundaries` yourself.

### VS Code

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

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

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

## FAQ

### When does Architecture and boundaries trigger?

It is meant for adding a file, folder, port or adapter, or for fixing an import error. Naming questions are handled by a different skill.

### Which AI clients does Architecture and boundaries support?

It is a plain SKILL.md folder, so it applies to all listed clients, with the Claude Code plugin marketplace also noted for it.

### What does Architecture and boundaries need to run?

The checkers are dependency-free Node scripts run from the repo root. The lint, typecheck and test steps need node_modules installed in an Expo project.

### Does Architecture and boundaries change existing code automatically?

The workflow asks the developer before architecture decisions such as new top-level folders or SDK classifications, and records them in the contract file.

### How do I install Architecture and boundaries in Claude Code?

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

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 Architecture and boundaries?

The closest alternatives to Architecture and boundaries are Adaptive layout, Expo project structure, Expo prebuild and config plugins, Expo native UI and Expo brownfield.

## Where this comes from

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

## Alternatives

- [Adaptive layout](https://ai-powered.com/skills/adaptive-layout): Adaptive layout is an open-source agent skill for developer tools.
- [Expo project structure](https://ai-powered.com/skills/expo-project-structure-scaledockhq): Expo project structure 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.
- [Expo native UI](https://ai-powered.com/skills/expo-native-ui-scaledockhq): Expo native UI is an open-source agent skill for developer tools.
- [Expo brownfield](https://ai-powered.com/skills/expo-brownfield): Expo brownfield is an open-source agent skill for developer tools.
- [Dependency management](https://ai-powered.com/skills/dependency-management): Dependency management is an open-source agent skill for developer tools.
- [Expo project structure](https://ai-powered.com/skills/expo-project-structure): Expo project structure is an open-source agent skill for developer tools.
- [Vercel react native skills](https://ai-powered.com/skills/vercel-react-native-skills): Vercel react native skills is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/architecture-and-boundaries
