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/kuraydev/react-native-typescript-library-starterWrote 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/kuraydev/react-native-typescript-library-starter/library-conventions)<a href="https://agentmods.dev/rules/kuraydev/react-native-typescript-library-starter/library-conventions"><img src="https://agentmods.dev/badge/rules/kuraydev/react-native-typescript-library-starter/library-conventions/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/kuraydev/react-native-typescript-library-starter/library-conventions"><img src="https://agentmods.dev/badge/rules/kuraydev/react-native-typescript-library-starter/library-conventions.svg" alt="Reviewed on agentmods" width="80" 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.01034 | $0.01034 |
| Opus 5.5 | $0.00414 | $0.00414 |
| Sonnet 5.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 1mo 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 — 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.
- 1mo ago 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 2mo ago), licensed MIT. It adds 1,034 tokens to every session, about $0.0041 per session on Opus 5.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
expo-development
React Native and Expo development guidelines, commands, and patterns.
navigation
A navigation guide for React Navigation V7, a library that controls movement between screens in a React Native app, including adjustments for iOS 26.
react-native-best-practices
React Native performance — route to react-native-best-practices SKILL.md and profiling first.
expo
Expo Router, NativeWind, and mobile conventions.
ai-collaboration
Instructions for AI agent code generation workflow.
api-validation
API route validation — enforces Zod validation on all route handlers and server actions.