cursorrules

A set of development rules for building Framer plugins with React, TypeScript, Vite, and Tailwind CSS. Framer is a tool for designing and publishing websites, and a plugin adds custom features to it.

In plain words
What is it for?
Use it when developing or running a Framer plugin starter project, including its UI, styles, local server, and Framer API integration.
Why use it?
It keeps the project’s framework, styling setup, development server, and Framer integration configured consistently. It also records requirements such as HTTPS and a specific development port.

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/julesvcode/framer-plugin-starter-kit/cursorrules
Clone the repo
git clone --depth 1 https://github.com/julesvcode/framer-plugin-starter-kit

Made for: Cursor.

Per session 2,693 This file is loaded in full into every session.
When invoked 2,693 The same file — it is already loaded in full.
Security scan D 2 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 $0.02693 $0.02693
Opus 5 $0.01347 $0.01347
Sonnet 5 $0.00539 $0.00539
Haiku 4.5 $0.00269 $0.00269

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

Security

Grade D, and why

cursorrules scanned grade D with 2 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

const response = await fetch('https://your-api.com/check-license', { method: 'POST',

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Clear Vite cache if issues: `rm -rf node_modules/.vite`
.cursorrules · 378 lines

How it starts

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

Framer Plugin Development Rules

Project Overview

This is a Framer plugin starter kit using React, TypeScript, Vite, and Tailwind CSS.

Tech Stack

  • Framework: React 18 with TypeScript
  • Build Tool: Vite 6
  • Styling: Tailwind CSS v3
  • Plugin SDK: framer-plugin v3
  • Dev Server: HTTPS via vite-plugin-mkcert (required for Framer)

Important Configuration Notes

PostCSS & Tailwind Setup

  • Use postcss.config.js and tailwind.config.js with ES module syntax (export default)
  • These work with "type": "module" in package.json
  • Always import CSS at the main entry point (src/main.tsx), not in components
  • Port 5173 must be available - kill any conflicting processes before starting dev server

Development Server

  • Run: npm run dev
  • Server MUST run on port 5173 (default Vite port) with HTTPS
  • If port is in use, kill the process: lsof -ti:5173 | xargs kill -9
  • Clear Vite cache if issues: rm -rf node_modules/.vite

Framer Plugin API

Core API (framer object)

UI Configuration
import { framer } from "framer-plugin"

// Show plugin UI (call this at the top level, not in a component)
framer.showUI({
    position: "top right" | "top left" | "bottom right" | "bottom left" | "center",
    width: number,
    height: number,
    resizable?: boolean,
    minWidth?: number,
    minHeight?: number,
    maxWidth?: number,
    maxHeight?: number,
})

// Hide the plugin UI
framer.hideUI()
Selection Management
import { CanvasNode } from "framer-plugin"

// Subscribe to selection changes (returns cleanup function)
const unsubscribe = framer.subscribeToSelection((selection: CanvasNode[]) => {
    console.log("Selection changed:", selection)
})

// Get current selection once
const selection = await framer.getSelection()
Canvas Manipulation
// Add SVG to canvas
await framer.addSVG({
    svg: string,           // SVG markup
    name?: string,         // Layer name in Framer
    x?: number,            // Position
    y?: number,
    width?: number,        // Dimensions
    height?: number,
    fill?: string,         // Override fill color
})

// Add image to canvas
await framer.addImage({
    image: string | Uint8Array,  // Data URL or binary data
    name?: string,
    x?: number,
    y?: number,
    width?: number,
    height?: number,
})

// Add component instance
await framer.addComponentInstance({
    url: string,           // Component URL
    name?: string,
    attributes?: Record<string, any>,
    x?: number,
    y?: number,
})

// Clone nodes
await framer.cloneNode(node: CanvasNode)

Read the full file on GitHub · 378 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 · 378 lines · 2,693 tokens per session scan D ddbe42a078bb

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository julesvcode/framer-plugin-starter-kit (9 stars, last pushed 10mo ago), licensed MIT. It adds 2,693 tokens to every session, about $0.0135 per session on Opus 5. A static security scan graded it D with 2 findings (sends data to an external url, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.