port-react-native-slice
Skill18 starsChanged 2 months agoApache-2.0View on GitHub
Port one explicitly approved React Native or Expo feature slice into a declared SwiftUI target while preserving its parity contract.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- create-fusion-deliverablesSkill
- edit-fusion-designSkill
- handoff-fusion-engineeringSkill
- inspect-fusion-designSkill
- prepare-fusion-manufacturingSkill
- reconcile-fusion-dataSkill
- run-fusion-cloud-recipesSkill
- setup-autodesk-fusionSkill
- analyze-log-signalsSkill
- inspect-infrastructure-healthSkill
- investigate-application-performanceSkill
- monitor-iot-edgeSkill
- review-business-kpisSkill
- setup-grafana-observabilitySkill
- audit-ios-readinessSkill
- plan-react-native-portSkill
- verify-swiftui-paritySkill
- audit-review-eval-validitySkill
- benchmark-review-configsSkill
- normalize-review-runsSkill
- recommend-review-reference-architectureSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Stop without edits if source scope, target module, backend contract, licensing, parity expectations, or file ownership is ambiguous.
- Distinctive: line 24
Do not write into the React Native source, plugin package, repository root, sibling modules, home directory, or unrelated paths.
- Distinctive: line 25
Do not overwrite unrelated Swift files.
- Distinctive: line 26
Do not install Xcode, XcodeGen, Simulator runtimes, packages, or accept Apple licenses.
- Distinctive: line 27
Do not copy source, assets, submodules, private links, credentials, generated artifacts, or customer data.
- Very specific: line 28
Before editing, run the bundled scripts/native-port.mjs authorize-write guardrail when available.
- Very specific: line 33
Put validation, state transitions, parsing, deterministic serialization, and business rules in pure Swift types or modules with no SwiftUI …
- Distinctive: line 34
Keep SwiftUI views thin: render domain state, emit intents, and delegate platform work to narrow adapters.
- Distinctive: line 35
Keep UIKit or other Apple framework bridges isolated at the edge, such as sharing, permissions, or lifecycle adapters.
- Distinctive: line 38
Add deterministic checks for each material domain invariant and stable synthetic fixtures for the approved path.
- Distinctive: line 39
Add accessibility semantics and stable identifiers called for by the contract.
- Distinctive: line 56
Do not describe the slice as complete when a required contract behavior has no evidence.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Port a React Native Slice
Implement one approved vertical slice from an existing parity contract. Reimplement behavior deliberately; do not perform generic JSX-to-Swift translation.
Safety contract
Before writing, require:
- one explicitly approved feature slice and its current parity contract;
- one explicit target directory and target module;
- an approved backend contract and licensing/provenance decision;
- permission to change the named files or create named files inside the target directory.
Stop without edits if source scope, target module, backend contract, licensing, parity expectations, or file ownership is ambiguous. A broad request such as “port the app” is not approval for multiple slices.
Write boundary
- Resolve the declared target directory before editing and keep every source, test, fixture, cache, and generated output write inside it or an explicitly approved disposable verification directory.
- Do not write into the React Native source, plugin package, repository root, sibling modules, home directory, or unrelated paths.
- Do not overwrite unrelated Swift files. Inspect a candidate file first; if it contains unrelated behavior or ownership is unclear, stop and propose a narrower patch or a new file within the target.
- Do not install Xcode, XcodeGen, Simulator runtimes, packages, or accept Apple licenses.
- Do not copy source, assets, submodules, private links, credentials, generated artifacts, or customer data. Use original or properly licensed assets and synthetic fixture data.
- Before editing, run the bundled
scripts/native-port.mjs authorize-writeguardrail when available. It performs no writes and must authorize every approved relative file; a refusal is a stop condition.
Implementation shape
- Map each approved contract behavior to a small Swift implementation unit.
- Put validation, state transitions, parsing, deterministic serialization, and business rules in pure Swift types or modules with no
SwiftUIorUIKitimport. - Keep SwiftUI views thin: render domain state, emit intents, and delegate platform work to narrow adapters.
- Keep UIKit or other Apple framework bridges isolated at the edge, such as sharing, permissions, or lifecycle adapters.
- Preserve the approved backend request/response, authentication, caching, persistence, error, and offline behavior. Never invent an endpoint, schema, credential flow, or side effect.
- Implement approved native adaptations only when the contract explains their behavioral equivalence or intentional difference.
- Add deterministic checks for each material domain invariant and stable synthetic fixtures for the approved path. Prefer fixed clocks, seeded randomness, stable IDs, and explicit locale/time-zone inputs.
- Add accessibility semantics and stable identifiers called for by the contract.
Verification during the port
Run the smallest deterministic checks that do not require new installations. If an available Xcode/Simulator/XCUITest gate is requested, keep its derived data under the allowed boundary. If a prerequisite is missing, report the exact blocked gate; do not install, download, accept a license, or claim it passed.
Completion report
Report:
- files changed, all relative to the explicit target directory;
- contract behaviors implemented, adapted, deferred, or blocked;
- pure-Swift domain boundaries and platform adapters;
- deterministic checks run and their results;
- platform gates run, skipped, failed, or blocked;
- remaining parity, accessibility, licensing, backend, and release risks.
Do not describe the slice as complete when a required contract behavior has no evidence.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

