frontend_rules

frontend_rules is a cursor rule for Cursor from gaebalai/Cursor-DEF-A-Rule. It costs 896 tokens per session, scanned A, original, MIT.

A frontend development guide for TypeScript, React, Vue, Next.js, Nuxt.js, CSS, accessibility, state management, testing, and performance.

In plain words
What is it for?
Use it when designing components, choosing state-management patterns, optimizing page performance, styling interfaces, supporting keyboard users, or planning frontend tests.
Why use it?
It helps keep frontend code organized, reusable, responsive, accessible, and efficient.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when designing components, choosing state-management patterns, optimizing page performance, styling interfaces, supporting keyboard users, or planning frontend tests.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/gaebalai/cursor-def-a-rule/frontend_rules
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/gaebalai/Cursor-DEF-A-Rule

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_rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/gaebalai/cursor-def-a-rule/frontend_rules/github.svg)](https://agentmods.dev/rules/gaebalai/cursor-def-a-rule/frontend_rules)
Your own site
<a href="https://agentmods.dev/rules/gaebalai/cursor-def-a-rule/frontend_rules"><img src="https://agentmods.dev/badge/rules/gaebalai/cursor-def-a-rule/frontend_rules/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_rules

Your own site · 80×15
<a href="https://agentmods.dev/rules/gaebalai/cursor-def-a-rule/frontend_rules"><img src="https://agentmods.dev/badge/rules/gaebalai/cursor-def-a-rule/frontend_rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 896 This file is loaded in full into every session.
When invoked 896 The same file — it is already loaded in full.
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.00896 $0.00896
Opus 5.5 $0.00358 $0.00358
Sonnet 5.5 $0.00179 $0.00179
Haiku 4.5 $0.00090 $0.00090

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

Security

Grade A, and why

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

rules/defa/frontend_rules.mdc · 84 lines

What it actually says

MIT License - https://opensource.org/licenses/MIT

[FRONTEND] 프런트엔드 개발 가이드 라인

기술 스택(우선순위 포함)

  1. TypeScript - 형 안전성 중시, ES6+ 구문 사용
  2. Nuxt.js/Next.js - JAMstack 구성, SSR/SSG 대응
  3. React/Vue.js - 컴포넌트 기반 개발
  4. CSS - PostCSS, CSS Grid/Flexbox, Tailwind CSS

컴포넌트 설계 원칙

  • 단일 책임: 한 구성 요소는 하나의 책임만
  • 재사용성: 범용적이고 재사용 가능한 설계
  • Props형 정의: 엄격한 형 정의에 의한 안전성 확보
  • 상태 관리: 적절한 상태 관리 패턴 선택

성능 최적화

  • Core Web Vitals: LCP, FID, CLS 최적화
  • 번들 크기: 불필요한 종속성 제거
  • 이미지 최적화: WebP 형식, 지연 로드
  • 코드 분할: 동적 가져오기로 분할

반응형 접근성

  • Mobile First: 모바일 기기를 최우선으로 설계
  • 브레이크포인트: 표준 브레이크포인트 사용
  • 액세서빌러티: ARIA 속성, 키보드 네비게이션
  • ** 시맨틱 HTML ** : 적절한 HTML 요소 사용

상태 관리 패턴

  • React: Context API, Redux Toolkit, Zustand
  • Vue: Pinia, Vuex
  • Nuxt: useState, useAsyncData

스타일링 정책

  • CSS Modules: 범위가 있는 스타일링
  • Tailwind CSS: 유틸리티 우선
  • CSS-in-JS: styled-components, emotion
  • 디자인 시스템: 일관된 디자인

테스트 전략

  • 단위 테스트: Jest, Vitest
  • 컴포넌트 테스트: Testing Library
  • E2E 테스트: Playwright, Cypress
  • 비주얼 테스트: Storybook

개발 도구 및 설정

  • ESLint: 코드 품질 자동 확인
  • Prettier: 코드 포맷 통일
  • Husky: Git hooks에 의한 품질 보증
  • Vite: 빠른 개발 서버

구현 패턴

  • 사용자 정의 후크: 로직 재사용
  • HOC: 고차원 컴포넌트 기능 추가
  • Render Props: 유연한 구성 요소 설계
  • Compound Components: 관련 구성 요소 그룹화

오류 처리

  • Error Boundaries: React 오류 경계
  • 전역 오류: 전체 응용 프로그램 오류 처리
  • 사용자 친화성: 이해하기 쉬운 오류 메시지
  • 로그 수집: 오류 정보의 적절한 수집

SEO 메타 데이터

  • 메타태그: 적절한 제목, 설명 설정
  • 구조화 데이터: JSON-LD로 구조화
  • OGP: SNS에서 공유 최적화
  • 사이트맵: 검색엔진 최적화

보안

  • XSS 대책: 적절한 위생화
  • CSRF 대책: 토큰 기반 인증
  • CSP: Content Security Policy 설정
  • HTTPS: 항상 SSL/TLS 암호화

배포 CI/CD

  • Vercel/Netlify: 자동 배포
  • GitHub Actions: CI/CD 파이프라인
  • 환경 변수: 적절한 환경 설정 관리
  • 성능 모니터링: 지속적인 모니터링
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 · 84 lines · 896 tokens per session scan A f159429818ad

Subscribe to this mod's changes

frontend_rules is a cursor rule published in the GitHub repository gaebalai/Cursor-DEF-A-Rule (12 stars, last pushed 1y ago), licensed MIT. It adds 896 tokens to every session, about $0.0036 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-08-30.

Related

frontend_rules compared with cursor rules from other repositories

frontend_rules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
frontend_rulesgaebalai/Cursor-DEF-A-RuleCursor rule121y agoMITA896Cursor
ponytailDietrichGebert/ponytailCursor rule202k9d agoMITA604Cursor
angular-20angular/angularCursor rule102ktodayMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
shared-plane-packagesprisma/ormCursor rule48ktodayApache-2.0A0Cursor