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/thanhdeptr/k8s_ai_assistant_mcp/reactvite-rulesgit clone --depth 1 https://github.com/Thanhdeptr/K8s_AI_Assistant_MCPWhat 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.00797 | $0.00797 |
| Opus 5 | $0.00398 | $0.00398 |
| Sonnet 5 | $0.00159 | $0.00159 |
| Haiku 4.5 | $0.00080 | $0.00080 |
Grade A, and why
reactvite-rules 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 2d 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.
This is a copy
95% identical to react — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
Overview
- Framework: React + Vite
- Routing: React Router DOM
- API Layer: Supabase JavaScript Client (docs)
- Styling: Tailwind CSS as primary, CSS Modules only for custom overrides
Directory Structure
src/ ├── components/ │ ├── layout/ # Shared layout components │ ├── pages/ # Feature-based pages │ │ ├── home/ # Home page │ │ ├── user/ # User management │ │ └── [feature]/ # Additional modules ├── services/ # API services for each module │ ├── user.ts # User API services │ └── [feature].ts # Feature-specific APIs ├── assets/ # Static assets (images, fonts, icons) ├── styles/ # Global and scoped CSS │ ├── globals.css # Global Tailwind config │ ├── [page].module.css # Page-specific custom styles ├── App.tsx # Root App component ├── main.tsx # Vite entry point └── env.d.ts # Type definitions for env variables
Naming Conventions
- Components: PascalCase → UserDetail.tsx
- Service files: camelCase → userApi.ts
- CSS Modules: kebab-case → user-detail.module.css
- Directories: lowercase → user, product
- Hooks: start with use → useUserData.ts
Feature Implementation Workflow
Add a New Module
- Create a new folder under src/components/pages/[feature]/
- Add API service in src/services/[feature].ts
- Add custom CSS in src/styles/[feature].module.css (if needed)
Add a New Page to Existing Module
- Add component file: src/components/pages/[module]/[page].tsx
- Add optional CSS: src/styles/[module]-[page].module.css
- Add route in App.tsx
Add Shared Component
- Place in src/components/common/ with reusable logic
Add New API
- Extend the existing service file for the module
- Return typed responses and handle errors gracefully
Styling Guidelines
- Tailwind First: Use utility classes for 90% of styling
- Scoped Styles: Use CSS Modules only when Tailwind cannot cover edge cases
- Avoid Global Overrides: Keep globals.css minimal
- Responsive Design: Mobile-first using Tailwind breakpoints
Page Template
`tsx import { useState, useEffect } from 'react' import { getUserData } from '@/services/user'
export function UserListPage() { const [users, setUsers] = useState([]) const [isLoading, setIsLoading] = useState(true)
useEffect(() => { fetchData() }, [])
async function fetchData() { try { const data = await getUserData() setUsers(data) } catch (error) { console.error('Failed to fetch users:', error) } finally { setIsLoading(false) } }
if (isLoading) return Loading...
return (
User List
{users.map(user => ( {user.name}
))}
) } `
Service API Example
`ts import { supabase } from '@/lib/supabase' import type { User } from '@/types/user'
export async function getUserData(): Promise { const { data, error } = await supabase.from('users').select('*') if (error) throw new Error(Supabase Error: ${error.message}) return data || [] } `
Database Interaction
- Use supabase-js client strictly per official docs
- All services return typed results and handle errors upfront
Tools Used
- Supabase: For database queries
- Playwright: For browser automation and previews
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.
- 2d ago First seen · 154 lines · 797 tokens per session scan A 40ec43f84bba
reactvite-rules is a cursor rule published in the GitHub repository Thanhdeptr/K8s_AI_Assistant_MCP (0 stars, last pushed 11mo ago), licensed MIT. It adds 797 tokens to every session, about $0.0040 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to react, differing in 3 lines, and is treated as a copy.
Other cursor rules, from other repositories
react-vite-web
Cursor rule "react-vite-web" from WellApp-ai/Well, covering web rules (react + vite), routing, component structure, state management and api integration.
frontend-patterns
React/TypeScript patterns for src/ code.
new-component
Workflow for creating new React components.
frontend-architecture
Vite + React SPA architecture - directory layout, providers, bundle splitting. Tailwind styling in tailwind.mdc.
performance-optimization-rule
Rules to optimize performance of React and TypeScript components.
nextjs
Next.js 16 App Router Standards & Constraints.