360 Secure SkillHub
360 安全技能中心

create-react-native-library

该技能指导使用 create-react-native-library 生成独立 React Native 库,或在现有应用中添加本地 Turbo Module/原生视图;涵盖脚手架参数、依赖安装、示例应用与后续实现文档。未包含具体原生业务代码的完整实现。

callstackincubator
热度 0.00
最近更新 2026-10-18 16:49:23
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:代码生成 / API 集成 / 工作流 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add callstackincubator/agent-skills/create-react-native-library
Metadata
name
create-react-native-library
description
Scaffolds React Native libraries with create-react-native-library for standalone libraries or local native modules and views. Use when creating or working on React Native libraries or adding native functionality in an existing app.
license
MIT

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

File Description
scaffold-library.md Scaffold a new library and default to the Expo example
local-library.md Add a local library to an existing app with autolinking

Problem -> Skill Mapping

Problem Start With
Need a new library scaffold scaffold-library
Need to add a local native library to an app local-library