rn-compo-style
编写、重构或审查 React Native 组件样式时使用。适用于处理 style prop、StyleSheet.create、样式数组、动态样式、平台样式差异、组件内联样式坏味道、Text/Image/View 样式组织、布局样式复用和样式可维护性问题;缺少 RN…
Skill by Yemomo511
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/yemomo511-rn-compo-style
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/rn-compo-style
What's inside
- Skill name
rn-compo-style- Description
- 编写、重构或审查 React Native 组件样式时使用。适用于处理 style prop、StyleSheet.create、样式数组、动态样式、平台样式差异、组件内联样式坏味道、Text/Image/View 样式组织、布局样式复用和样式可维护性问题;缺少 RN 版本、目标组件边界或现有样式约定时必须先读取项目事实或询问。
- License
- MIT
- Instructions
- 85 lines in SKILL.md · view on GitHub
Files (4)
- SKILL.md
- dynamic-and-platform-styles.md · references/
- style-basics.md · references/
- stylesheet-patterns.md · references/
SKILL.md (first lines)
## Rn Compo Style
## Overview
为 React Native 组件编写样式时,优先把稳定样式放入 `StyleSheet.create`,组件 JSX 中只引用样式名或少量动态覆盖。只有一次性、极小、确实依赖运行时值的样式才考虑内联对象。
## When To Invoke
- 用户要求新增、调整、重构或审查 RN 组件样式。
- 用户提到 `style`、`StyleSheet.create`、样式数组、布局、颜色、Text/Image/View 样式或平台差异。
- 代码中出现大量 JSX 内联样式,需要改成可维护的样式命名。
## Workflow
1. 读取当前文件和邻近组件,确认 import、样式命名、主题常量和组件拆分方式。
2. 需要 RN Style 基础语义时读取 `references/style-basics.md`。
3. 需要把组件样式落成可维护代码时读取 `references/stylesheet-patterns.md`。
4. 需要处理动态样式、样式数组、平台分支或覆盖关系时读取 `references/dynamic-and-platform-styles.md`。
5. 编码时把 `const styles = StyleSheet.create(...)` 放在组件外;样式名表达用途,不表达具体颜色或数值。
6. JSX 中优先使用 `style={styles.name}` 或 `style={[styles.base, condition && styles.active]}`;避免大段 `style={{...}}`。
7. 验收时检查可读性、平台行为、布局不重排、样式没有覆盖错序,并运行项目已有 lint/type/test 命令。
## Reference Routing
- `references/style-basics.md`:理解 RN 官方 Style 语义、CSS 相似点和已知差异时读取。
- `references/stylesheet-patterns.md`:写 `StyleSheet.create`、命名样式、拆分组件样式和重构内联样式时读取。
- `references/dynamic-and-platform-styles.md`:处理样式数组、动态覆盖、主题、平台差异和 experimental 样式时读取。
## Anti-Patterns
- 在 JSX 中堆大段对象:`style={{width: 201, height: 201, position: 'absolute'}}`。
- 把稳定样式写成函数每次 render 新建对象,却没有动态输入。
- 样式名叫 `blueText`、`bigBox`,导致设计变化后名称失真;应使用 `title`、`imageContainer`、`primaryAction`。
- 复制 Web CSS 思维,直接使用 kebab-case、字符串尺寸、选择器、级联或不受 RN 支持的属性。
- 依赖负 margin、父级外触摸区域等 Web 行为,却没有验证 Android/iOS 差异。
## Good Example
```tsx
import {StyleSheet} from 'react-native';
// JSX usage keeps style props readable:
// style={styles.imageContainer}
// style={styles.glow}
// style={styles.iconContainer}
// style={styles.background}
const styles = StyleSheet.create({
imageContainer: {
justifyContent: 'center',
alignItems: 'center',
},
glow: {
width: 201,
height: 201,
position: 'absolute',
},
iconContainer: {
justifyContent: 'center',
alignItems: 'center',
width: 128,
height: 128,
zIndex: 100,
},
image: {
position: 'absolute',
width: 76,
height: 71,
},
background: {
borderRadius: 40,
experimental_backgroundImage: 'linear-gradient(180deg, #3C9FFE, #0274DF)',
width: 128,
height: 128,
position: 'absolute',
},
backgroundSolidColor: {
...StyleSheet.absoluteFillObject,
backgroundColor: '#208AEF',
zIndex: 1000,
},
});
```From Yemomo511/hybrid-agent-rail, MIT.
More from Yemomo511/hybrid-agent-rail
- 0.512score
create-curated-skill
Yemomo511
Create curated Hybrid Agent Rail Skill folders from an upstream Skill.
SkillCFreshness: C★ 2Claude Code +9 - 0.512score
create-doc
Yemomo511
Create governed documentation files for the Hybrid Agent Rail docs system.
SkillCFreshness: C★ 2Claude Code +9 - 0.509score
hyar-framework-check
Yemomo511
选择跨端框架前使用。适用于用户要求在 KMP、React Native、Flutter、uni-app 之间做技术选型、比较跨端框架、判断小程序/App/Web/桌面/鸿蒙/存量原生 App 适合方案,或需要根据团队技术栈、UI 策略、原生能力和交付约束推荐框架时;信息不足时必须先询问,禁止直接推荐。
SkillCFreshness: C★ 2Claude Code +9 - 0.506score
skill-test
Yemomo511
评测 Skill 的仓库维护型 Skill。用于隔离待测 Skill、运行 coco 测试 Agent、生成结构化证据报告,并给出克制的修改建议;不会直接修改待测 Skill。
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
expo-brownfield
Yemomo511
Integrate Expo and React Native into an existing native iOS or Android app.
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
add-app-clip
Yemomo511
Add an iOS App Clip target to an Expo or React Native app.
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
expo-cicd-workflows
Yemomo511
Helps understand and write EAS workflow YAML files for Expo projects.
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
native-data-fetching
Yemomo511
Use when implementing or debugging any network request, API call, or data fetching.
SkillCFreshness: C★ 2Claude Code +9 - 0.501score
arch-context-collect
Yemomo511
在用户回答任一 Skill 的前置问题后使用。适用于把架构、环境、版本、平台、包管理器、测试目标、UI 策略等前置信息写入项目根目录 .hyar/ARCH_CONTEXT.md,并在后续 Skill 提问前复用这些答案,避免重复询问。
SkillCFreshness: C★ 2Claude Code +9 - 0.499score
expo-module
Yemomo511
Guide for creating and writing Expo native modules and views using the Expo Modules API.
SkillCFreshness: C★ 2Claude Code +9 - 0.499score
eas-update-insights
Yemomo511
Check the health of published EAS Updates: crash rates, install/launch counts, unique users, payload size, and the split between embedded and OTA users per…
SkillCFreshness: C★ 2Claude Code +9 - 0.497score
create-skill
Yemomo511
创建有效 Skill 的指南。当用户想创建新 Skill,或更新现有 Skill,以通过专门知识、工作流或工具集成扩展 Agent 能力时,应使用此 Skill。
SkillCFreshness: C★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 27, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Yemomo511/hybrid-agent-rail
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Yemomo511
- 0.512score
create-curated-skill
Yemomo511
Create curated Hybrid Agent Rail Skill folders from an upstream Skill.
SkillCFreshness: C★ 2Claude Code +9 - 0.512score
create-doc
Yemomo511
Create governed documentation files for the Hybrid Agent Rail docs system.
SkillCFreshness: C★ 2Claude Code +9 - 0.509score
hyar-framework-check
Yemomo511
选择跨端框架前使用。适用于用户要求在 KMP、React Native、Flutter、uni-app 之间做技术选型、比较跨端框架、判断小程序/App/Web/桌面/鸿蒙/存量原生 App 适合方案,或需要根据团队技术栈、UI 策略、原生能力和交付约束推荐框架时;信息不足时必须先询问,禁止直接推荐。
SkillCFreshness: C★ 2Claude Code +9 - 0.506score
skill-test
Yemomo511
评测 Skill 的仓库维护型 Skill。用于隔离待测 Skill、运行 coco 测试 Agent、生成结构化证据报告,并给出克制的修改建议;不会直接修改待测 Skill。
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
expo-brownfield
Yemomo511
Integrate Expo and React Native into an existing native iOS or Android app.
SkillCFreshness: C★ 2Claude Code +9 - 0.502score
add-app-clip
Yemomo511
Add an iOS App Clip target to an Expo or React Native app.
SkillCFreshness: C★ 2Claude Code +9
Cite this page
rn-compo-style skill. Agent Mart. https://agentmart.dev/skills/yemomo511-rn-compo-style (last updated 2026-10-24)