mcpField
C
create-react-native-library

create-react-native-library

github.com/callstackincubatorDevelopment1.7k4.5k installsUpdated 3w ago
Repository

About create-react-native-library

A skill for developers creating standalone or app-local React Native libraries with create-react-native-library. It directs users to the appropriate scaffolding or local-library guidance before implementation.

Key features

  1. 01Scaffold standalone React Native libraries
  2. 02Add local libraries to existing apps
  3. 03Support native modules and UI components
  4. 04Choose between publishing and local workflows

Use cases

  1. 01Starting a library intended for npm publication
  2. 02Exposing native functionality within an app
  3. 03Wrapping a native SDK for React Native
  4. 04Adding an autolinked local library

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/callstackincubator/agent-skills --skill create-react-native-library

After installing, type/create-react-native-libraryin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
local-library.md
scaffold-library.md

Details

From the project README

Create React Native Library

Overview

Use this skill to scaffold a standalone React Native library or a local library inside an existing app, then continue with the correct implementation docs.

Examples:

  • JS-only library that may use other React Native libraries
  • Native modules that expose native functionality to JavaScript
  • Native UI components that render native views in React Native

Choose one flow first:

When to Apply

Use this skill when:

  • Creating or working on a React Native library with create-react-native-library
  • Creating a native module or view in an existing app
  • Wrapping native SDKs and exposing them to React Native

Quick Reference

# Inspect current options before scaffolding
npx create-react-native-library@latest --help

# Scaffold a library with turbo modules and the Expo example app
npx create-react-native-library@latest awesome-library \
  --no-interactive \
  --yes \
  --description "A brief description of the library" \
  --type turbo-module \
  --languages kotlin-objc \
  --example expo

# Scaffold a local Turbo Module inside an existing app
cd MyApp
npx create-react-native-library@latest awesome-library \
  --local \
  --no-interactive \
  --yes \
  --description "A brief description of the library" \
  --type turbo-module \
  --languages kotlin-objc

References

FileDescription
scaffold-library.mdScaffold a new library and default to the Expo example
local-library.mdAdd a local library to an existing app with autolinking

Problem -> Skill Mapping

ProblemStart With
Need a new library scaffoldscaffold-library
Need to add a local native library to an applocal-library

Comments

Markdown supported