implement-native-component
Implement or change native components, TurboModules, native services, codegen specs, or native-backed platform wrappers (Swift, Objective-C, C++/WinRT, podspecs, Windows projects). Also supplies the native overlay checklist for v0, v1, and agentic work. Not for Storybook toolchain failures.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1.4k
- Forks
- 179
01 前言 Front Matter
- name
- implement-native-component
- license
- MIT
- description
- Implement or change native components, TurboModules, native services, codegen specs, or native-backed platform wrappers (Swift, Objective-C, C++/WinRT, podspecs, Windows projects). Also supplies the native overlay checklist for v0, v1, and agentic work. Not for Storybook toolchain failures.
03 SKILL.md 正文
Implement native components and modules
Use this skill directly for native work, or as an overlay when a v0, v1, or agentic change touches a native boundary. The native components and modules reference defines ownership and qualification rules (R-NATIVE-001 through R-NATIVE-003).
Workflow
- Classify the work:
- native kind: view component, TurboModule, or native service;
- target platforms and renderers: macOS Paper or Fabric, React Native Windows Fabric, Win32 host-provided views, iOS, or Android;
- the JavaScript wrapper's generation and public compatibility, using the classification guide;
- native registration names and entrypoints that must not change.
- Choose ownership. New modern native code belongs in native-core (R-NATIVE-001); maintain existing native wrappers, such as experimental packages, where they live. For native-core work, start from its package instructions and read the relevant native-core references; for a wrapper in another package, read that package's sources and documentation instead.
- Load only the platform references the work needs:
- React Native Windows Fabric views: Windows Fabric;
- any iOS or macOS Swift, Objective-C, header, podspec, or bridge-manager change: Apple native authoring and Office integration (R-APPLE-001 through R-APPLE-007), plus native-core's native layout and Swift interoperability notes for native-core work;
- focus targets or native focus visuals: common focus authoring and its platform file;
- accessibility actions: framework-base accessibility reference;
- the JavaScript wrapper: the agentic skill, v0 recipe, or v1 recipe.
- Implement with the TypeScript specification, codegen configuration, native props, events, commands, and registration kept consistent. Preserve public APIs and registration names (R-NATIVE-002) and keep fork imports in platform files (R-REPO-002).
- Validate the affected boundary with declared scripts (R-VALID-001), running focused package tests while iterating
(R-VALID-004): package build, test, and lint; native-core
yarn codegen:windows --checkwhen Windows specs change andyarn test:apple-integrationwhen its macOS native code changes; native builds through the owning app, such asyarn storybook build --macosor--windowsfromapps/storybook; and runtime evidence through Storybook smoke orwdiostory tests. macOS Storybook commands default to Fabric: add--papertoprep,build,run, orsmokefor Paper, and rerunprepwhen switching renderers. Desktop Storybook does not build iOS: validate iOS-only changes through the owning iOS host, such as FluentTester's iOS app inapps/fluent-tester. Apple changes also need the module and bridging-header checks in R-APPLE-007. Run Pod operations only as the permissions reference allows. - Report each platform and renderer as passed, failed, skipped, not run, or unsupported, with reasons (R-NATIVE-003).
- Finish with
yarn clean-lage-cacheand thenyarn lage buildci(R-VALID-003).
Storybook application or toolchain failures that are not caused by the native change belong to the Storybook skill.
Native overlay checklist
Use this checklist for implementation and review:
- TypeScript specification, native props, events, and commands agree; generated code was regenerated by its declared command rather than edited by hand.
- Registration names, autolinking, and entrypoints are unchanged unless requested; consuming apps depend directly on native-core.
- Native view lookup and UI mutation run on the platform's UI thread.
- iOS and macOS changes follow the Apple and Office rules:
qualified
<React/...>headers, guarded Swiftimport React, no generated Swift header in anRCT_EXTERN_MODULEfile, generated-type-free Paper bridges, main-queue dispatch, and strict warnings (R-APPLE-001 through R-APPLE-006). Module and bridging-header validation ran, or the unrun mode is reported (R-APPLE-007). - Native resources, observers, and pending work are released on unmount, cancellation, or failure.
- Each export works on every host its entrypoint promises; platform-only APIs use the narrowest entrypoint.
- Podspecs, Windows projects, and package
filesinclude every new native source. - Accessibility actions and focus targets are qualified by invoking the native action or target, not by JavaScript events alone.
- Evidence states which platforms and renderers ran; JavaScript-only results are not native qualification (R-NATIVE-003).
04 同仓库更多 Skills
review-component
Review component code or changes of any generation (v0, v1, agentic, primitive, or native-backed) without editing files. Classifies each changed surface, applies the matching checklists and native overlay, and reports evidence-backed findings with validation status.
maintain-v0-v1-component
Fix or maintain existing v0 (foundation-compose) or v1 (framework compose/compressible) components, including their platform variants. Classifies the generation first and loads only its recipe. Not for new components, agentic components, read-only reviews, or native-only changes.
maintain-desktop-testing
Change, review, or plan source changes to desktop-driver, desktop-test, storybook-desktop, or storybook-desktop-runtime, including native helpers. Applies package invariants, documentation, native and consumer validation, and changesets.
fix-security-issues
Audit and remediate dependency security advisories while respecting package age policy, removing unused vulnerable capabilities, deduplicating Yarn resolutions, and validating affected tooling.
desktop-testing
Configure, run, or troubleshoot native desktop tests using desktop-test, desktop-driver, and storybook-desktop, including app targets and suites, helpers, permissions, WDIO suites, Storybook story tests and smoke runs, reports, and CI. Not for package source changes or the Storybook app build toolchain.
agentic-storybook-development
Develop, bundle, build, or troubleshoot the agentic-components Storybook app in apps/storybook on macOS, Windows, or Win32, including app catalog configuration, Metro, CocoaPods, native projects, and renderer builds. Not for configuring or running desktop tests or changing desktop package source.