cross-platform-component-reuse

cross-platform-component-reuse is a cursor rule for Cursor from jaycewalzer1/SilverKey-Inc.. It costs 0 tokens per session (1,190 once invoked), scanned A, original, MIT.

A set of rules for sharing components between web and mobile applications so they look and behave the same.

In plain words
What is it for?
Use it when designing or changing shared web and mobile interface components.
Why use it?
It reduces differences between platforms and limits duplicated component work.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { Box, Text, Button, Input } from "../../ui/primitives";.

Good fit Use it when designing or changing shared web and mobile interface components.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jaycewalzer1/SilverKey-Inc.
agentmods
npx agentmods add rules/jaycewalzer1/silverkey-inc./cross-platform-component-reuse

Made for: Cursor.

Wrote 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.

agentmods badge for cross-platform-component-reuse

README.md
[![agentmods](https://agentmods.dev/badge/rules/jaycewalzer1/silverkey-inc./cross-platform-component-reuse/github.svg)](https://agentmods.dev/rules/jaycewalzer1/silverkey-inc./cross-platform-component-reuse)
Your own site
<a href="https://agentmods.dev/rules/jaycewalzer1/silverkey-inc./cross-platform-component-reuse"><img src="https://agentmods.dev/badge/rules/jaycewalzer1/silverkey-inc./cross-platform-component-reuse/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.

agentmods 80×15 button for cross-platform-component-reuse

Your own site · 80×15
<a href="https://agentmods.dev/rules/jaycewalzer1/silverkey-inc./cross-platform-component-reuse"><img src="https://agentmods.dev/badge/rules/jaycewalzer1/silverkey-inc./cross-platform-component-reuse.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,190 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01190
Opus 5.5 $0.00000 $0.00476
Sonnet 5.5 $0.00000 $0.00238
Haiku 4.5 $0.00000 $0.00119

Measured 3mo ago against content hash fe3a244168e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cross-platform-component-reuse 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 3mo 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.

.cursor/rules/shared/cross-platform-component-reuse.mdc · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cross-Platform Component Reuse Strategy

Fundamental Principle

Web and mobile MUST look and function identically with maximum component reuse unless explicitly told otherwise.

This is an essential architectural principle that must be considered in every implementation decision. The goal is visual and functional parity between platforms with shared components as the default.

Default Strategy: Shared Components

File Extension Priority

  1. Default (.tsx/.ts): Always create shared components first

    • Use .tsx for React components that work on both platforms
    • Use .ts for business logic, hooks, and utilities
    • This should be 90%+ of all components
  2. Platform-specific only when necessary:

    • .web.tsx - Only when using web-only APIs (DOM, react-router-dom, etc.)
    • .native.tsx - Only when using React Native-specific APIs
    • Must be justified and documented

Component Design Principles

// ✅ CORRECT: Shared component (default approach)
// packages/features/dashboard/components/ClientCard.tsx
export function ClientCard({ client }: ClientCardProps) {
  return (
    <Box padding="md" borderRadius="md" backgroundColor="white">
      <Title size="sm">{client.name}</Title>
      <BodyText size="xs" muted>{client.email}</BodyText>
      <Button variant="primary" onPress={handleContact}>
        Contact
      </Button>
    </Box>
  );
}

// ❌ WRONG: Creating separate implementations without justification
// packages/features/dashboard/components/ClientCard.web.tsx
// packages/features/dashboard/components/ClientCard.native.tsx

When Platform-Specific Implementation is Required

Only create platform-specific versions when:

  1. Web-only dependencies: Uses react-dom, window, document, HTMLElement
  2. Native-only dependencies: Uses React Native-specific APIs, native modules
  3. Fundamentally different UX: Desktop vs mobile interaction patterns
  4. Performance requirements: Platform-specific optimizations explicitly requested

Read the full file on GitHub · 172 lines

Changes

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.

  1. 3mo ago First seen · 172 lines · 0 tokens per session scan A fe3a244168e8

Subscribe to this mod's changes

cross-platform-component-reuse is a cursor rule published in the GitHub repository jaycewalzer1/SilverKey-Inc. (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,190 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.

Related

cross-platform-component-reuse compared with cursor rules from other repositories

cross-platform-component-reuse next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cross-platform-component-reusejaycewalzer1/SilverKey-Inc.Cursor rule21mo agoMITA0Cursor
gradlesanjeed5/awesome-cursor-rules-mdcCursor rule3.6k8d agoCC0-1.0A1,896Cursor
cursorruleskortix-ai/sunaCursor rule21k2d agononeA4,277Cursor
nativescriptPatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A711Cursor
project-structureHeeGyeong/ComposeSampleCursor rule11todayMITA0Cursor
ios-ui-development-focusbeettlle/pi-spineCursor rule3todayMITA0Cursor
android-viewmodelbaijum/ukulele-companionCursor rule1426d agoMITA0Cursor