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.
git clone --depth 1 https://github.com/maccman/ai-expo-starter-templateWrote 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.
[](https://agentmods.dev/rules/maccman/ai-expo-starter-template/modern-flexbox)<a href="https://agentmods.dev/rules/maccman/ai-expo-starter-template/modern-flexbox"><img src="https://agentmods.dev/badge/rules/maccman/ai-expo-starter-template/modern-flexbox.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00577 |
| Opus 5 | $0.00000 | $0.00289 |
| Sonnet 5 | $0.00000 | $0.00115 |
| Haiku 4.5 | $0.00000 | $0.00058 |
Grade A, and why
modern-flexbox 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.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Modern React Native Flexbox & Spacing
Always Use Modern Flexbox Features
Gap Property (Preferred)
- Use
gapfor consistent spacing between flex children instead of manual margins - Automatically handles spacing regardless of conditional rendering
- Single source of truth for spacing values
// ✅ GOOD: Use gap for automatic spacing
const styles = StyleSheet.create({
container: {
gap: 16, // Consistent 16px between all children
paddingBottom: 20,
},
})
// ❌ AVOID: Manual margins on individual items
const styles = StyleSheet.create({
item: {
marginTop: 16, // Hard to maintain, doesn't adapt
},
})
Flexbox Layout Patterns
Container Spacing
// ✅ GOOD: Parent controls spacing
;<View style={styles.contentSections}>
{showDescription && <DescriptionSection />}
{showAmenities && <AmenitiesSection />}
{showScoring && <ScoringSection />}
</View>
const styles = StyleSheet.create({
contentSections: {
gap: 24, // Automatic spacing between sections
},
})
Component Interface Design
// ✅ GOOD: Components don't manage their own top spacing
const SectionComponent = () => (
<View style={styles.section}>
{/* Content without top margin/padding */}
</View>
)
// ❌ AVOID: Components with built-in top spacing
const SectionComponent = () => (
<View style={[styles.section, { marginTop: 20 }]}>
{/* Tightly coupled spacing */}
</View>
)
Modern React Native Features to Prefer
Layout
- Use
gapinstead of manual margins between flex children - Use
rowGapandcolumnGapfor fine-grained control - Prefer
justifyContentandalignItemsover absolute positioning
Responsive Design
- Use
Dimensions.get('window')sparingly; prefer flexbox ratios - Use percentage widths with flexbox for responsive layouts
- Leverage
flex: 1for equal distribution
Best Practices
- Single Responsibility: Parent containers handle spacing, children handle content
- Adaptability: Layouts should work with conditional rendering
- Maintainability: Spacing controlled in one place, easy to adjust globally
- Clean Interfaces: Components shouldn't assume their positioning context
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.
- 8d ago First seen · 99 lines · 577 tokens per session scan A aa49153fc54a
modern-flexbox is a cursor rule published in the GitHub repository maccman/ai-expo-starter-template (4 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 577 tokens. 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-31.
Other cursor rules, from other repositories
css-styling
CSS architecture, tokens, and styling rules for this Docusaurus site. Apply when creating or modifying components, styles, layouts, or any UI-facing code.
codex-premium-website-skills
Apply Codex Skills standards to frontend, website, motion, accessibility, QA, agent reasoning, and handoff work.
shadcn-tailwind-guide
A guide to building new components with shadcn/ui and Tailwind CSS, a utility-based system for styling interfaces.
ui-components
USE WHEN: Building UI components, structuring layouts, and applying styles using Tailwind CSS.
css-render-blocking-diagnosis
Cursor rule "css-render-blocking-diagnosis" from adobecom/da-express-milo, covering css render-blocking diagnosis & resolution, critical learning from 98 pagespeed achievement, primary diagnostic protocol, step 1: css blocking symptom recognition and step 2: css loading sequence audit.
performance
Frontend performance optimization rules. Apply when optimizing UI or bundle.