unistyles
Skill0 starsChanged 3 months agoMITView on GitHub
Style React Native components with react-native-unistyles (StyleSheet.create, theme tokens, variants, breakpoints, runtime). Use whenever writing or editing styles in this codebase, or when asked about Unistyles APIs, theming, or migration behavior.
In this repository19 other files it gives its agents.
- add-featureSkill
- bootsplashSkill
- build-uiSkill
- commit-changesSkill
- domain-modelSkill
- gitmojiSkill
- grill-planSkill
- implement-ticketSkill
- ios-widgetSkill
- iphone-duoSkill
- maintain-skillsSkill
- side-insetsSkill
- ticket-shapingSkill
- truesheet-usageSkill
- upgrade-react-nativeSkill
- validate-changeSkill
- verifySkill
- write-testsSkill
- xcode-cloudSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 8
Before writing a single style, read the project's actual theme setup — token names differ between projects and inventing one is the most …
- Very specific: line 21
Always import { StyleSheet } from 'react-native-unistyles'.
- Very specific: line 22
Write styles as const styles = StyleSheet.create(theme => ({ ...
- Distinctive: line 55
Only fetch the remote docs (below) if the local copy seems stale for a question about a very recent release.
≈ “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
Ground yourself in this repo first
Before writing a single style, read the project's actual theme setup — token names differ between projects and inventing one is the most common failure here.
- Find the theme config (conventionally
src/theme/): the tokens file, theAppTheme/AppThemestypes, the module augmentation +configureAppThemes()call, and the color palettes. Read the token names off it; never guess them. - Find the shared UI primitives (conventionally
src/theme/ui/). Feature screens import primitives from that barrel, not from internal files. - Open one existing styled component and copy its shape — that is the house pattern, whatever this skill says.
House rules
- Always
import { StyleSheet } from 'react-native-unistyles';— never fromreact-native. - Write styles as
const styles = StyleSheet.create(theme => ({ ... }))and pull tokens offtheme(colors, typography, spacing, radii, shadows, z-index). No color literals in feature UI. - Static layout belongs in
StyleSheet.create; only reach for prop-derived inline styles when a value truly depends on runtime data (e.g. a measured height). Never use single-element style arrays. - Colocate a
styles.tsnext to the component when the stylesheet gets long enough to bury the JSX.
Local reference (use this before fetching anything)
references/unistyles.md is the full Unistyles 3.0 docs (llms-full.txt), already saved locally —
grep it instead of using WebFetch. Section index:
| Topic | Grep for |
| Config (themes/breakpoints/settings) | ^# Configuration |
| Getting started | ^# Getting started |
| How Unistyles works (compiler, no re-renders) | ^# How Unistyles works |
| Migration from v2 | ^# Migration guide |
| Testing | ^# Testing |
| Theming (create/switch themes, scoped theme) | ^# Theming, ^# Scoped Theme |
| Breakpoints / Media queries | ^# Breakpoints, ^# Media Queries |
| Variants / Compound Variants | ^# Variants, ^# Compound Variants |
StyleSheet API | ^# StyleSheet |
useUnistyles hook | ^# useUnistyles |
Unistyles Runtime (UnistylesRuntime, setters) | ^# Unistyles Runtime, ^## Setters |
| Dynamic functions | ^# Dynamic Functions |
| Merging styles | ^# Merging styles |
| Reanimated integration | ^# Reanimated |
| Web-only features / SSR / Expo Router | ^# Web only features, ^# SSR, ^# Expo Router |
withUnistyles (wrapping 3rd-party components) | ^# withUnistyles |
| FAQ / troubleshooting | ^# FAQ, ^## Troubleshooting |
Example: grep -n -A 40 '^# Variants' references/unistyles.md
Only fetch the remote docs (below) if the local copy seems stale for a question about a very recent release.
Documentation Sets (fallback, remote)
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.

