cursorrules

Project rules for a design project, written in Korean, that restrict how Figma data is accessed and which design-system components are used.

In plain words
What is it for?
They require Figma information to be obtained through MCP resources and require React or Vue components to use the specified design-system packages instead of Tailwind CSS or plain HTML and CSS.
Why use it?
They prevent the coding assistant from using disallowed Figma access methods or styling approaches.

Cursor rule for Cursor

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/opti-kjh/palette/cursorrules
Clone the repo
git clone --depth 1 https://github.com/Opti-kjh/palette

Made for: Cursor.

Per session 1,979 This file is loaded in full into every session.
When invoked 1,979 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin 92% copy Near-identical to another mod 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 $0.01979 $0.01979
Opus 5 $0.00989 $0.00989
Sonnet 5 $0.00396 $0.00396
Haiku 4.5 $0.00198 $0.00198

Measured yesterday against content hash 5b7bc1c32ff7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

axios.get('https://api.figma.com/...')
Origin

This is a copy

92% identical to palette — 291 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.

.cursorrules · 217 lines

How it starts

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

Palette 프로젝트 - 절대 규칙 (MANDATORY RULES)

🚨 위반 시 즉시 작업 중단 규칙

이 규칙을 위반하는 경우 즉시 작업을 중단하고 사용자에게 알려야 합니다.

규칙 1: Figma 접근은 오직 MCP를 통해서만 (ABSOLUTE)

강제 사항:

  • Figma 정보를 가져와야 하는 모든 상황에서 반드시 list_mcp_resources 또는 fetch_mcp_resource 도구를 사용
  • 그 외의 어떤 방법도 절대 허용하지 않음

절대 금지 (NEVER):

// ❌ 절대 금지 - Figma API 직접 호출
fetch('https://api.figma.com/...')
axios.get('https://api.figma.com/...')

// ❌ 절대 금지 - Figma 플러그인 직접 실행
figma.currentPage.selection

// ❌ 절대 금지 - 사용자에게 수동 추출 요청
"Figma에서 코드를 복사해서 붙여넣어 주세요"

반드시 사용 (MUST USE):

// ✅ 올바른 방법 - MCP 리소스 목록 확인
list_mcp_resources({ server: "figma" })

// ✅ 올바른 방법 - MCP로 Figma 데이터 가져오기
fetch_mcp_resource({ 
  server: "figma", 
  uri: "figma://file/{fileKey}/node/{nodeId}" 
})

규칙 2: 산출물은 오직 디자인 시스템으로만 (ABSOLUTE)

강제 사항:

  • React/Vue 컴포넌트 생성 시 반드시 @dealicious/design-system-react 또는 @dealicious/design-system 사용
  • Tailwind CSS, 일반 HTML/CSS는 절대 사용 금지

절대 금지 (NEVER):

// ❌ 절대 금지 - Tailwind CSS 사용
<div className="bg-white p-4 rounded-lg shadow-md">
  <button className="bg-blue-500 text-white px-4 py-2">클릭</button>
</div>

// ❌ 절대 금지 - 일반 HTML 태그만 사용
<div style={{ backgroundColor: '#fff', padding: '16px' }}>
  <button style={{ backgroundColor: '#3b82f6', color: '#fff' }}>클릭</button>
</div>

// ❌ 절대 금지 - MUI, Ant Design 등 다른 UI 라이브러리
import { Button } from '@mui/material';
import { Button } from 'antd';

반드시 사용 (MUST USE):

// ✅ 올바른 방법 - 디자인 시스템 컴포넌트
import { Button } from '@dealicious/design-system-react/src/components/ssm-button';
import { Text } from '@dealicious/design-system-react/src/components/ssm-text';

<div style={{ padding: '16px' }}>
  <Button variant="primary">클릭</Button>
</div>

📋 필수 작업 플로우 (MANDATORY WORKFLOW)

Figma를 React/Vue로 변환하는 요청을 받으면 반드시 이 순서대로 진행:

Step 1: Figma MCP로 리소스 확인 (REQUIRED)

// 1단계: 사용 가능한 Figma 리소스 확인
list_mcp_resources({ server: "figma" })

이 단계를 건너뛰면 안 됩니다!

Read the full file on GitHub · 217 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 · 217 lines · 1,979 tokens per session scan A 5b7bc1c32ff7

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository Opti-kjh/palette (1 stars, last pushed 7mo ago), licensed MIT. It adds 1,979 tokens to every session, about $0.0099 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 92% identical to palette, differing in 291 lines, and is treated as a copy.