260-frontend

260-frontend is a cursor rule for coding agents from d-padmanabhan/agent-engineering-handbook. It costs 45 tokens per session (2,410 once invoked), scanned A, original, MIT.

A set of frontend rules that apply across browser frameworks and static-site tools. It covers rendering choices, state management, accessibility, performance targets, testing, and dependency security.

In plain words
What is it for?
Designing or reviewing browser applications and static sites, choosing between approaches such as server rendering and static generation, setting performance and accessibility expectations, and planning tests.
Why use it?
It gives teams shared baseline decisions for frontend work instead of leaving important architecture and quality choices to individual features.

Cursor rule

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.

agentmods
npx agentmods add rules/d-padmanabhan/agent-engineering-handbook/260-frontend
Clone the repo
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/260-frontend.svg)](https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/260-frontend)
Your own site
<a href="https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/260-frontend"><img src="https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/260-frontend.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00045 $0.02410
Opus 5 $0.00023 $0.01205
Sonnet 5 $0.00009 $0.00482
Haiku 4.5 $0.00005 $0.00241

Measured 5d ago against content hash bb940e0c698a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

260-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 5d 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.

rules/260-frontend.mdc · 162 lines

How it starts

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

Frontend Architecture - Cross-cutting Non-Negotiables

Audience: engineers designing, reviewing, or operating browser-facing applications and static sites - regardless of framework (React, Vue, Svelte, Solid, Astro, Next, Nuxt, Gatsby, Hugo, Eleventy, SvelteKit, Remix).

Scope: the choices that apply the same way across frameworks. For framework-specific advice (React Server Components, Vue Composition API, Hugo partials, etc.), defer to the framework's docs and to 999-local-overrides.mdc in each consumer repo. This rule is the cross-cutting layer; the skill frontend-engineering is the depth.

[!IMPORTANT] Frontend rules in this repo are intentionally framework-agnostic. Adding React/Vue/Hugo encyclopedia content here would be shallow guidance authored from docs, not earned from production reviews. Pin framework-specific guidance in 999-local-overrides.mdc per repo.


Non-negotiables

NN1. Rendering choice is made before code lands

SPA / SSG / SSR / ISR / hybrid is an architecture decision, not a default. Document it in an ADR or the README before the first feature commit.

Pattern When Trade-off
SSG (static site generation) Content changes less than daily; SEO matters; no per-user state Cheapest hosting (CDN-only); rebuild on every change
SSR (per-request) Per-user content; SEO matters; freshness matters Server cost; slower TTFB than SSG if not cached
SPA (client-side render) Internal tools; authenticated apps; no SEO need Worst TTFB / FCP; bad on slow networks; richest interactivity
ISR (incremental SSG) Mostly-static with occasional updates SSG cost + on-demand re-render budget
Hybrid (RSC, islands, partial hydration) Mix of above per route Most complex; biggest payoff at scale

NN2. Bundle budget per route is enforced in CI

Every PR runs against a budget. PRs that breach are blocked until either the budget is raised (with justification in the PR description) or the code is trimmed. Raising the budget silently is the same anti-pattern as suppressing a test.

Read the full file on GitHub · 162 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. 5d ago First seen · 162 lines · 45 tokens per session scan A bb940e0c698a

Subscribe to this mod's changes

260-frontend is a cursor rule published in the GitHub repository d-padmanabhan/agent-engineering-handbook (16 stars, last pushed 5d ago), licensed MIT. It adds 45 tokens to every session and 2,410 once invoked, about $0.0002 per session on Opus 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.