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.
npx agentmods add rules/kuraydev/react-native-typescript-library-starter/library-conventionsgit clone --depth 1 https://github.com/kuraydev/react-native-typescript-library-starterWhat 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 | $0.01034 | $0.01034 |
| Opus 5 | $0.00517 | $0.00517 |
| Sonnet 5 | $0.00207 | $0.00207 |
| Haiku 4.5 | $0.00103 | $0.00103 |
Grade A, and why
library-conventions 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 yesterday.
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 — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Library Conventions
Component Structure
Every component lives in its own folder under src/components/:
src/components/MyComponent/
├── MyComponent.tsx # Implementation
├── MyComponent.types.ts # Props interface
└── index.ts # Barrel: re-exports default + named + types
Props Interface Pattern
// MyComponent.types.ts
import type { StyleProp, ViewStyle } from "react-native";
/**
* Props for the {@link MyComponent} component.
*/
export interface MyComponentProps {
/** Required title — always document every prop with TSDoc. */
title: string;
/** Optional. Always mark optional props with `?`. */
style?: StyleProp<ViewStyle>;
/** @defaultValue false */
enabled?: boolean;
}
Component Implementation Pattern
// MyComponent.tsx
import React from "react";
import { StyleSheet, View } from "react-native";
import type { MyComponentProps } from "./MyComponent.types";
/**
* TSDoc summary line.
*
* @example
* ```tsx
* <MyComponent title="Hello" />
* ```
*/
const MyComponent: React.FC<MyComponentProps> = ({
title,
style,
enabled = false,
testID = "my-component",
}) => {
return (
<View style={[styles.container, style]} testID={testID}>
{/* implementation */}
</View>
);
};
const styles = StyleSheet.create({
container: {},
});
export default MyComponent;
Barrel Pattern
// index.ts
export { default } from "./MyComponent";
export { default as MyComponent } from "./MyComponent";
export type { MyComponentProps } from "./MyComponent.types";
Hook Pattern
// src/hooks/useMyHook.ts
export interface UseMyHookOptions {
/** TSDoc every option. */
initialValue?: number;
}
export interface UseMyHookReturn {
/** TSDoc every returned value. */
value: number;
setValue: (v: number) => void;
}
/**
* @example
* const { value, setValue } = useMyHook({ initialValue: 0 });
*/
export function useMyHook(options: UseMyHookOptions = {}): UseMyHookReturn {
// implementation
}
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.
- yesterday First seen · 169 lines · 1,034 tokens per session scan A deb626912533
library-conventions is a cursor rule published in the GitHub repository kuraydev/react-native-typescript-library-starter (65 stars, last pushed 16d ago), licensed MIT. It adds 1,034 tokens to every session, about $0.0052 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.
Other cursor rules, from other repositories
app_feature_first_architecture
Feature-first architecture is a design pattern that organizes code by business features rather than technical layers. This approach promotes better maintainability, scalability, and team collaboration by keeping related functionality together and reducing coupling between different parts of the application.
coding-guidelines
React Native Expo SDK 54 project with TypeScript, Expo Router v6, Redux Toolkit, and modern development practices.
app_rules
This document outlines the essential rules and guidelines for developing with the MobileLauncher LT boilerplate. Follow these rules to maintain consistency, scalability, and code quality across the project.
design
Design system, accessibility standards, and industry-specific styling guidelines.
services
Service layer architecture, API patterns, and data management with TanStack Query.
components
Component development patterns and composition rules.