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.
npx agentmods add rules/yasuhiro-y/figma-plugin-by-vibe-coding/cursorrulesgit clone --depth 1 https://github.com/yasuhiro-y/figma-plugin-by-vibe-codingWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.04469 | $0.04469 |
| Opus 5 | $0.02235 | $0.02235 |
| Sonnet 5 | $0.00894 | $0.00894 |
| Haiku 4.5 | $0.00447 | $0.00447 |
Grade A, and why
cursorrules 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 681 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Figma Plugin Vibe Coding Rules
You are an expert Figma Plugin Developer with deep knowledge of TypeScript, Vite, React, shadcn/ui, and Biome. You specialize in creating high-quality, maintainable plugins that integrate seamlessly with Figma's design ecosystem.
Architecture Guidelines
Figma Plugin Dual-Process Model
Figma plugins run in two separate processes:
- Main Thread (Plugin Code) - Sandboxed JavaScript environment with access to Figma API
- UI Thread (iframe) - Standard browser environment for React components
CRITICAL: These processes are completely isolated and can only communicate via postMessage.
Directory Structure
Follow this strict feature-based organization:
src/
├── plugin/ # Main thread code - Figma API interactions only
│ └── main.ts
├── ui/ # UI thread code - React components and styles
│ ├── components/ # Reusable UI components
│ ├── hooks/ # Custom React hooks
│ └── main.tsx # UI entry point
└── common/ # Shared code - types, constants, messaging contracts
├── types.ts # Type definitions
├── messages.ts # Communication contracts
└── constants.ts # Shared constants
Rules:
- NEVER import Figma API types (@figma/plugin-typings) in
src/ui/ - NEVER import React or DOM APIs in
src/plugin/ - ALL communication contracts MUST be defined in
src/common/ - Use feature-based organization within components
TypeScript Best Practices
Explicit Typing
- ALL function parameters MUST have explicit type annotations
- ALL function return types MUST be explicitly declared
- ALL variables receiving values from external sources MUST be typed
- Use
unknowninstead ofany, then narrow the type
// ✅ Good
function processNode(node: SceneNode): NodeData {
return { id: node.id, name: node.name };
}
// ❌ Bad
function processNode(node) {
return { id: node.id, name: node.name };
}
Error Handling
Use Result pattern for operations that can fail:
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.
- 2d ago First seen · 681 lines · 4,469 tokens per session scan A acc4ec73bd5f
cursorrules is a cursor rule published in the GitHub repository yasuhiro-y/figma-plugin-by-vibe-coding (4 stars, last pushed 5mo ago), licensed MIT. It adds 4,469 tokens to every session, about $0.0223 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-31.
Other cursor rules, from other repositories
cypress-e2e-testing-cursorrules-prompt-file
Cursor rules for Cypress development with E2E testing.
vasu-playwright-utils
../../templates/cursor-rules/vasu-playwright-utils.mdc.
vla-registry
Multi-model GUI/VL registry — browser wllama grounding (ShowUI-2B is default + E2E gate).
dev-browser
Fallback browser automation with persistent Chrome state. Use only when Browser Use is unavailable or blocked.
node-dependencies
Enforce Node.js versioning and package management best practices.
security-standards
Cursor rule "security-standards" from wjgogogo/cursor-rules, covering 安全规范, 核心原则 [p0], 输入验证, xss 防护 and csrf 防护.