react-native-convert

react-native-convert is a skill for Claude Code, Codex from HuolalaTech/huolala-figma-mcp. It costs 63 tokens per session (2,130 once invoked), scanned A, original, Apache-2.0.

A conversion guide for turning HTML or Figma designs into React Native code for mobile apps. It covers the code files, styles, names, interactive states, and repeated content.

In plain words
What is it for?
Use it to create React Native screens from HTML or Figma designs, organize files and StyleSheet styles, add interactions, and render repeated items.
Why use it?
It helps preserve the design’s layout and exact style values when moving from web-based designs to React Native. It also reduces missed styles and unclear component names.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create React Native screens from HTML or Figma designs, organize files and StyleSheet styles, add interactions, and render repeated items.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/huolalatech/huolala-figma-mcp/reactnative-convert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HuolalaTech/huolala-figma-mcp --skill reactnative-convert
Clone the repo
git clone --depth 1 https://github.com/HuolalaTech/huolala-figma-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-native-convert

README.md
[![agentmods](https://agentmods.dev/badge/skills/huolalatech/huolala-figma-mcp/reactnative-convert.svg)](https://agentmods.dev/skills/huolalatech/huolala-figma-mcp/reactnative-convert)
Your own site
<a href="https://agentmods.dev/skills/huolalatech/huolala-figma-mcp/reactnative-convert"><img src="https://agentmods.dev/badge/skills/huolalatech/huolala-figma-mcp/reactnative-convert.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,130 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.02130
Opus 5 $0.00032 $0.01065
Sonnet 5 $0.00013 $0.00426
Haiku 4.5 $0.00006 $0.00213

Measured 8d ago against content hash 42a5d4906712, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

react-native-convert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

assets/skills/ReactNative-convert/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

React Native 代码转换

1. 代码文件结构生成

文件结构要求

  • 如果用户要求了文件结构,以用户要求的为准
  • 如果没有要求,则使用默认结构:App.tsxstyles.ts

2. 样式处理和语义化命名

样式处理规则

  • 使用 StyleSheet.create() 定义样式
  • 不支持多 class 组合,需要合并样式对象:style={[styles.driverName, styles.driverName7055b1]}
  • 样式属性名使用驼峰命名:backgroundColorfontSizemarginTop
  • 所有数值属性必须精确匹配原始值(包括小数)

步骤

  1. 提取行内样式:遍历所有元素,提取 style 属性
  2. 语义化命名
    • 文本组件:根据文本内容(navTitledriverName
    • 容器组件:根据功能(navBardriverCard
    • 图片组件:根据用途(backIcondriverAvatar
    • 禁止:container{ID}comp{ID} 格式
  3. 提取公共样式
    • 找出相同语义化名称的组件
    • 分类:公共样式(字体、颜色、边框非位置) + 单独样式(布局、尺寸、间距、定位)
    • 合并样式对象:style={[styles.driverName, styles.driverName7055b1]}
  4. 精确样式匹配
    • 所有数值属性:width、height、margin、padding、fontSize、lineHeight 等必须精确匹配原始值(包括小数)
    • 定位属性:position、top、left、right、bottom 必须精确匹配
    • 颜色值:rgba 颜色值必须完全一致
    • 验证方法:转换完成后,对比每个元素的样式属性,确保所有值完全一致
  5. 样式完整性验证(⚠️ 强制要求):
    • 必须验证:对于每个元素,公共样式 + 单独样式 = 原始行内样式的完整集合
    • 验证方法
      1. 提取原始行内样式的所有属性(包括 flexbox 属性:flexDirection、justifyContent、alignItems、display 等)
      2. 检查公共样式中是否包含所有非位置相关属性
      3. 检查单独样式中是否包含所有位置、尺寸、间距相关属性
      4. 确保两个样式对象合并后,所有属性都完整且值精确匹配
    • 常见遗漏属性:flexDirection、justifyContent、alignItems、alignSelf、flexWrap、columnGap 等 flexbox 属性
    • 验证失败处理:必须修复后重新验证,不能跳过

要求

  • ⚠️ 强制要求:公共样式 + 单独样式 = 完整样式(不能丢失任何属性,包括所有 flexbox 属性)
  • ⚠️ 强制要求:所有样式属性值必须精确匹配原始值
  • ⚠️ 强制要求:必须使用组件(View、Text、Image 等),转换为组件结构,不需要保持 HTML 结构,但需要保持视觉层级和逻辑关系
  • ⚠️ 强制要求:样式必须使用 StyleSheet,不能使用 CSS
  • 图片路径使用 require() 导入

3. 识别交互组件并实现状态切换

选中态组件识别

  • 查找相同结构的容器(Tab 项、筛选选项)
  • 检查样式差异:背景色、边框、文本颜色
  • 添加状态样式:filterTabActivefilterTabInactive

按钮组件识别

  • 检查是否包含可点击内容(文本或图标)
  • 检查是否有视觉反馈样式(背景色、边框、圆角)
  • 添加点击效果样式:.clicked.pressed

交互逻辑实现

  • 使用 onPress 事件:onPress={handlePress}
  • 在组件中定义处理函数
  • 通过 setState 更新状态,切换样式

4. 循环渲染支持

循环组件识别规则(必须满足所有条件):

  • 组件结构完全相同:类型、数量、层级完全一致
  • 样式基本相同:公共样式相同,单独样式差异 ≤ 3 个属性
  • 在 HTML 中连续出现:重复结构在 HTML 中连续出现或属于同一父组件

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 149 lines · 63 tokens per session scan A 42a5d4906712

Subscribe to this mod's changes

react-native-convert is a skill published in the GitHub repository HuolalaTech/huolala-figma-mcp (78 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 63 tokens to every session and 2,130 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

expo-native-ui

Framework (OSS). Build beautiful, native-feeling Expo screens. Covers Apple HIG styling, semantic colors, native controls, SF Symbols, media, animations, visual effects, gradients, storage, and responsive layout. For routing and navigation, use the expo-router skill.

expo/skills · 58 tokens

expo-web-to-native

Framework (OSS). Migrate an existing web React app to a native iOS/Android app with Expo. Use when the user wants to turn a website into a mobile app, port a Next.js/Vite/CRA React codebase to React Native, reuse web code on native incrementally, or asks how web idioms (the DOM, CSS, React Router, localStorage…

expo/skills · 111 tokens

truesheet-usage

Consumer-side guide for integrating @lodev09/react-native-true-sheet into a React Native app. Use this skill whenever the user wants to add, configure, control, or debug a bottom sheet using TrueSheet — including ref-based sheets, named global sheets, web support with TrueSheetProvider/useTrueSheet, React Navigation…

lodev09/react-native-true-sheet · 169 tokens

building-ui

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

Intelligent-Internet/ii-agent · 30 tokens

use-dom

Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.

Intelligent-Internet/ii-agent · 32 tokens

assess-react-native-migration

Assesses whether and how an existing mobile product should migrate to React Native. Use when auditing one or more product repositories for migration readiness, including products whose iOS, Android, and other clients live in separate directories or repositories; choosing brownfield, greenfield, or a checkpoint-based…

callstackincubator/agent-skills · 104 tokens