frontend

frontend is a cursor rule for Cursor from mckaywrigley/o1-pro-template-system. It costs 9 tokens per session (871 once invoked), scanned A, original, MIT.

A set of rules for building the user-facing part of a Next.js web application. It covers the chosen interface tools, component organization, data fetching, loading states, and naming.

In plain words
What is it for?
Use it when creating or changing pages, layouts, shared components, route-specific components, icons, or frontend data flows.
Why use it?
It prevents frontend code from being scattered or structured inconsistently. It also separates server-side data fetching from browser-side interaction where required.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating or changing pages, layouts, shared components, route-specific components, icons, or frontend data flows.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mckaywrigley/o1-pro-template-system/frontend
Install

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.

Clone the repo
git clone --depth 1 https://github.com/mckaywrigley/o1-pro-template-system

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 frontend

README.md
[![agentmods](https://agentmods.dev/badge/rules/mckaywrigley/o1-pro-template-system/frontend/github.svg)](https://agentmods.dev/rules/mckaywrigley/o1-pro-template-system/frontend)
Your own site
<a href="https://agentmods.dev/rules/mckaywrigley/o1-pro-template-system/frontend"><img src="https://agentmods.dev/badge/rules/mckaywrigley/o1-pro-template-system/frontend/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 frontend

Your own site · 80×15
<a href="https://agentmods.dev/rules/mckaywrigley/o1-pro-template-system/frontend"><img src="https://agentmods.dev/badge/rules/mckaywrigley/o1-pro-template-system/frontend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 871 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.00009 $0.00871
Opus 5.5 $0.00004 $0.00348
Sonnet 5.5 $0.00002 $0.00174
Haiku 4.5 $0.00001 $0.00087

Measured yesterday against content hash 7ad259dba28d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

.cursor/rules/frontend.mdc · 140 lines

How it starts

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

Frontend Rules

Follow these rules when working on the frontend.

It uses Next.js, Tailwind, Shadcn, and Framer Motion.

General Rules

  • Use lucide-react for icons
  • useSidebar must be used within a SidebarProvider

Components

  • Use divs instead of other html tags unless otherwise specified
  • Separate the main parts of a component's html with an extra blank line for visual spacing
  • Always tag a component with either use server or use client at the top, including layouts and pages

Organization

  • All components be named using kebab case like example-component.tsx unless otherwise specified
  • Put components in /_components in the route if one-off components
  • Put components in /components from the root if shared components

Data Fetching

  • Fetch data in server components and pass the data down as props to client components.
  • Use server actions from /actions to mutate data.

Server Components

  • Use "use server" at the top of the file.
  • Implement Suspense for asynchronous data fetching to show loading states while data is being fetched.
  • If no asynchronous logic is required for a given server component, you do not need to wrap the component in <Suspense>. You can simply return the final UI directly since there is no async boundary needed.
  • If asynchronous fetching is required, you can use a <Suspense> boundary and a fallback to indicate a loading state while data is loading.
  • Server components cannot be imported into client components. If you want to use a server component in a client component, you must pass the as props using the "children" prop
  • params in server pages should be awaited such as const { courseId } = await params where the type is params: Promise<{ courseId: string }>

Example of a server layout:

"use server"

export default async function ExampleServerLayout({
  children
}: {
  children: React.ReactNode
}) {
  return children
}

Example of a server page (with async logic):

"use server"

import { Suspense } from "react"
import { SomeAction } from "@/actions/some-actions"
import SomeComponent from "./_components/some-component"
import SomeSkeleton from "./_components/some-skeleton"

export default async function ExampleServerPage() {
  return (
    <Suspense fallback={<SomeSkeleton className="some-class" />}>
      <SomeComponentFetcher />
    </Suspense>
  )
}

async function SomeComponentFetcher() {
  const { data } = await SomeAction()
  return <SomeComponent className="some-class" initialData={data || []} />
}

Read the full file on GitHub · 140 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. yesterday First seen · 140 lines · 9 tokens per session scan A 7ad259dba28d

Subscribe to this mod's changes

frontend is a cursor rule published in the GitHub repository mckaywrigley/o1-pro-template-system (142 stars, last pushed 1y ago), licensed MIT. It adds 9 tokens to every session and 871 once invoked, about $0.0000 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-10-14.