Borrowing it
Nothing to install: this file belongs to yasuhiro-y/figma-plugin-by-vibe-coding. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/yasuhiro-y/figma-plugin-by-vibe-coding/main/.cursorrulesgit clone --depth 1 https://github.com/yasuhiro-y/figma-plugin-by-vibe-codingWrote 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.
[](https://agentmods.dev/rules/yasuhiro-y/figma-plugin-by-vibe-coding/cursorrules)<a href="https://agentmods.dev/rules/yasuhiro-y/figma-plugin-by-vibe-coding/cursorrules"><img src="https://agentmods.dev/badge/rules/yasuhiro-y/figma-plugin-by-vibe-coding/cursorrules/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.
<a href="https://agentmods.dev/rules/yasuhiro-y/figma-plugin-by-vibe-coding/cursorrules"><img src="https://agentmods.dev/badge/rules/yasuhiro-y/figma-plugin-by-vibe-coding/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.04469 | $0.04469 |
| Opus 5.5 | $0.01788 | $0.01788 |
| Sonnet 5.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 2mo 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.
- 2mo 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 8mo ago), licensed MIT. It adds 4,469 tokens to every session, about $0.0179 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-31.
cursorrules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cursorrulesyasuhiro-y/figma-plugin-by-vibe-coding | Cursor rule | 4 | 8mo ago | MIT | A | 4,469 | Cursor |
| generalKhan/wonder-blocks | Cursor rule | 163 | yesterday | MIT | A | 5,323 | Cursor |
| react-chakra-ui-cursorrules-prompt-filePatrickJS/awesome-cursorrules | Cursor rule | 41k | 5mo ago | CC0-1.0 | A | 248 | Cursor |
| react-styled-components-cursorrules-prompt-filePatrickJS/awesome-cursorrules | Cursor rule | 41k | 5mo ago | CC0-1.0 | A | 243 | Cursor |
| react-chakra-ui---folder-structureholtwood/awesome-cursorrules-zh | Cursor rule | 241 | 18d ago | MIT | A | 0 | Cursor |
| ant-designsanjeed5/awesome-cursor-rules-mdc | Cursor rule | 3.6k | 5mo ago | CC0-1.0 | A | 2,222 | Cursor |
| 815-reactflow-diagramsd-padmanabhan/agent-engineering-handbook | Cursor rule | 20 | yesterday | MIT | A | 38 | Cursor |