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/moclam1905/CocktailRecipesWrote 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/moclam1905/cocktailrecipes/compose_ui_guideline)<a href="https://agentmods.dev/rules/moclam1905/cocktailrecipes/compose_ui_guideline"><img src="https://agentmods.dev/badge/rules/moclam1905/cocktailrecipes/compose_ui_guideline.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.00663 |
| Opus 5 | $0.00000 | $0.00331 |
| Sonnet 5 | $0.00000 | $0.00133 |
| Haiku 4.5 | $0.00000 | $0.00066 |
Grade A, and why
compose_ui_guideline 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 — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Compose UI Guideline– Android Kotlin Jetpack Compose
1. Naming Conventions
- Stateless vs Stateful
- Stateless:
@Composable fun ItemCard(item: Item, onClick: () -> Unit)– displays the passed-in data without holding state. - Stateful: append
WithState()or define inside aDefaultsclass (based on API guideline).
- Stateless:
- Screens: end with
Screen(e.g.,HomeScreen,DetailScreen). - Section/Container: use suffix
SectionorContainerfor layout-only groupings. - Callback parameters should always be placed last (per Kotlin coding style).
2. Function Signature
@Composable
fun FancyButton(
text: String,
modifier: Modifier = Modifier,
enabled: Boolean = true,
onClick: () -> Unit,
)
modifiershould come first after data-state params to enable readable chaining.- Avoid nullable parameters that mean “off” – provide meaningful default values instead.
3. Stable State & Recomposition
- Composables must be idempotent – same input produces same UI.
- Inputs should be immutable or marked with
@Stable. If passingMutableState, wrap withremember { mutableStateOf(...) }. - Use
rememberSaveablefor states that need to survive configuration changes.
4. Modifier Order
- Layout (
fillMaxWidth,size) - Appearance (
background,border) - Interaction (
clickable,pointerInput) - Animation (
graphicsLayer,animate...)
Follows Google’s recommended modifier ordering to prevent hit-box bugs.
5. Accessibility
- Always assign
contentDescriptionto images. - Use
semantics {}to override roles when needed. - Use
mergeDescendants = trueto combine children if too verbose for screen readers.
6. Preview & Theming
- Every public composable must have at least one
@Previewin the same file with default theme. - Use
MaterialTheme.colorSchemeandMaterialTheme.typographyfor design tokens. - Avoid hard-coded
dp/spvalues – preferdimensionResourcefor design specs.
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 · 70 lines · 663 tokens per session scan A b0e218bfc564
compose_ui_guideline is a cursor rule published in the GitHub repository moclam1905/CocktailRecipes (1 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 663 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
compose-performance
Compose performance: stability annotations (@Stable, @Immutable), strong-skipping in Kotlin 2.x, key-based recomposition, derivedStateOf, remember{} keys, deferred reads, Compose previews + Paparazzi for screenshot tests.
expo
Expo/React Native: native modules, navigation, platform-specific code.
react-native
A set of rules for building mobile apps with TypeScript, React Native, Expo, and mobile interface components. React Native lets developers create native mobile apps with React, while Expo provides supporting tools.
android-project
Core behavior rules for AI agents working on this Android project.
android-project-bootstrap
Walks a developer through bootstrapping a BRAND-NEW Android project for agentic CLI delivery — creating the Firebase project, registering the Android app, setting up App Distribution, creating the Google Play Console listing, wiring API access, and installing the Gradle plugins. Use when the user says they're starting…
ios-project-bootstrap
Walks a developer through bootstrapping a BRAND-NEW iOS project for agentic CLI delivery — Apple Developer Program enrollment, App Store Connect listing, provisioning profiles, Fastlane setup from scratch, Firebase App Distribution, TestFlight + App Store first upload. Use when the user says they're starting a new iOS…