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/madebyaris/poinf-of-salesWrote 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/madebyaris/poinf-of-sales/frontend-react)<a href="https://agentmods.dev/rules/madebyaris/poinf-of-sales/frontend-react"><img src="https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/frontend-react/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/madebyaris/poinf-of-sales/frontend-react"><img src="https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/frontend-react.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.00000 | $0.07040 |
| Opus 5 | $0.00000 | $0.03520 |
| Sonnet 5 | $0.00000 | $0.01408 |
| Haiku 4.5 | $0.00000 | $0.00704 |
Grade A, and why
frontend-react 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 11d 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 — 1,040 lines — stays where its author put it; the contents beside it link to each section on GitHub.
⚛️ React Component Patterns & Best Practices
🏗️ Component Architecture
shadcn/ui Base Components Pattern
// Follow the established shadcn/ui pattern from components/ui/
import * as React from 'react'
import { cn } from '@/lib/utils'
import { cva, type VariantProps } from 'class-variance-authority'
// ✅ CORRECT: Use cva for variant-based styling
const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md font-medium transition-colors",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
outline: "border border-input bg-background hover:bg-accent",
ghost: "hover:bg-accent hover:text-accent-foreground",
},
size: {
default: "h-10 px-4 py-2",
sm: "h-9 px-3",
lg: "h-11 px-8",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)
interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean
}
// ✅ CORRECT: Always use forwardRef for reusable components
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
return (
<button
ref={ref}
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
)
}
)
Button.displayName = "Button"
Business Component Pattern
// POS-specific business components
import { useState, useCallback } from 'react'
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { Button } from '@/components/ui/button'
import { Badge } from '@/components/ui/badge'
import apiClient from '@/api/client'
import type { Product, CartItem } from '@/types'
interface ProductCardProps {
product: Product
onSelect: (product: Product) => void
isSelected?: boolean
isInCart?: boolean
cartQuantity?: number
className?: string
}
// ✅ CORRECT: Typed component with proper props interface
export const ProductCard: React.FC<ProductCardProps> = ({
product,
onSelect,
isSelected = false,
isInCart = false,
cartQuantity = 0,
className
}) => {
// ✅ CORRECT: Use useCallback for event handlers
const handleSelect = useCallback(() => {
onSelect(product)
}, [product, onSelect])
// ✅ CORRECT: Early returns for loading/error states
if (!product.is_available) {
return (
<Card className={cn("opacity-50", className)}>
<CardContent className="p-4 text-center">
<p className="text-muted-foreground">Unavailable</p>
</CardContent>
</Card>
)
}
return (
<Card
className={cn(
"cursor-pointer transition-all hover:shadow-md",
isSelected && "ring-2 ring-primary",
className
)}
onClick={handleSelect}
>
<CardHeader className="pb-2">
<div className="flex items-center justify-between">
<CardTitle className="text-lg">{product.name}</CardTitle>
{isInCart && (
<Badge variant="secondary">{cartQuantity}</Badge>
)}
</div>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground mb-2">
{product.description}
</p>
<p className="text-xl font-bold">${product.price.toFixed(2)}</p>
</CardContent>
</Card>
)
}
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.
- 11d ago First seen · 1,040 lines · 7,040 tokens per session scan A 6767b2269f4c
frontend-react is a cursor rule published in the GitHub repository madebyaris/poinf-of-sales (142 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 7,040 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-30.
Other cursor rules, from other repositories
nextjs-react-tailwind-cursorrules-prompt-file
Cursor rules for Next.js development with React and Tailwind CSS integration.
react-components-creation-cursorrules-prompt-file
Cursor rules for React component creation and development.
react-chakra-ui-cursorrules-prompt-file
Cursor rules for React development with Chakra UI integration.
react-styled-components-cursorrules-prompt-file
Cursor rules for React development with Styled Components integration.
chakra-ui-best-practices
A set of rules for building React interfaces with Chakra UI, a component library for styled and accessible user interfaces. It covers themes, responsive layouts, accessibility, performance, and reusable components.
react-chakra-ui---folder-structure
A standard folder layout for React and Chakra UI projects, including separate locations for components, pages, themes, hooks, utilities, and assets. It also defines how Chakra UI theme files are grouped.