Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
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.
[](https://agentmods.dev/rules/tianmuji/figma-restoration-tools/figma-restoration-rules)<a href="https://agentmods.dev/rules/tianmuji/figma-restoration-tools/figma-restoration-rules"><img src="https://agentmods.dev/badge/rules/tianmuji/figma-restoration-tools/figma-restoration-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.
<a href="https://agentmods.dev/rules/tianmuji/figma-restoration-tools/figma-restoration-rules"><img src="https://agentmods.dev/badge/rules/tianmuji/figma-restoration-tools/figma-restoration-rules.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.06043 | $0.06043 |
| Opus 5 | $0.03021 | $0.03021 |
| Sonnet 5 | $0.01209 | $0.01209 |
| Haiku 4.5 | $0.00604 | $0.00604 |
Grade A, and why
figma-restoration-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 10d 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 — 393 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🔄 持续生效规则:Figma组件还原流程
工作目录范围
你始终在 figma-restoration-mcp-vue-tools目录下的文件工作
Figma组件还原流程规则
概述
当用户要求还原Figma组件并提供Figma链接时,严格按照以下7步流程执行。
⭐ 核心优势提示: 你是Claude AI,具备强大的图像元素识别能力。在Figma组件还原流程中,专注利用你的视觉识别能力来:
- 直接识别expected.png中的视觉元素: 无需依赖文件读取,直接观察和识别图片中的所有可见元素
- 智能过滤冗余元素: 基于视觉验证,准确判断原始Figma JSON中的哪些元素在图片中真正可见、哪些是冗余的
- 确定真实元素层级: 通过观察图片中的视觉层级关系,优化JSON中可能不合理的嵌套结构
- 视觉元素精确映射: 将JSON中的技术描述与图片中的实际视觉效果进行准确对应
重要说明:
- 图片对比工作由专门的对比工具完成,Claude专注于元素识别和结构优化
- 原始Figma JSON只能保证视觉呈现正确,但无法保证元素层级合理性和去除冗余元素
- Claude的价值在于基于视觉真实性优化JSON结构,确保最终实现更精确、更简洁
流程步骤
步骤1: 获取Figma数据
- 使用工具获取Figma JSON数据
- 参数设置:
fileKey: 从Figma链接中提取nodeId: 从Figma链接中提取- ⭐ savePath: 必须使用绝对路径
/Users/yujie_wu/Documents/study/11111/figma-restoration-mcp-vue-tools/src/figma-data
- 🆕 文件命名规范: 工具会自动保存JSON到指定目录,文件名包含node-id便于快速查找
- 格式:
figma-{fileKey}-{nodeId}-{timestamp}.json - 示例:
figma-Mbz0mgLIVbz46bxPwBFnSl-4211-72472-2025-07-24T03-22-23-609Z.json
- 格式:
步骤2: 下载预期截图获取视觉目标
⭐ 首先获取视觉标准 - 在分析JSON之前先获取实际视觉效果:
- 使用
mcp_figma-context_download_figma_images下载原始组件节点的PNG截图 - 参数设置:
fileKey: 与步骤1相同的fileKeynodeId: 与步骤1相同的nodeIdlocalPath: 必须使用绝对路径到results目录/Users/yujie_wu/Documents/study/11111/figma-restoration-mcp-vue-tools/src/components/{ComponentName}/resultsfileName: 必须命名为 "expected.png"pngScale: 3 (高分辨率)
⭐ 重要:3倍图理解与尺寸设置
- 图片缩放关系: expected.png和actual.png都是3倍分辨率图片
- CSS尺寸计算: 实际CSS尺寸 = 图片显示尺寸 ÷ 3
- 尺寸来源优先级:
- layout-analysis.json (1倍设计尺寸) - 主要依据 ✅
- Figma JSON boundingBox (1倍设计尺寸) - 验证依据
- 图片观察 (视觉识别) - 辅助判断,不用于数值设置
- 图片用途明确:
- expected.png: 视觉目标参考、元素识别、结构分析
- diff.png: 像素差异可视化(橙色/红色 = 差异区域,非设计颜色)
- ⭐ 关键经验: 参考
/src/restoration-tips/截图对比-3倍图缩放与样式尺寸设置.md
步骤3: 结合expected.png和原始figma.json分析得到layout-analysis
⭐ 视觉驱动的智能分析 - 结合视觉目标和技术数据进行分析:
第一步:视觉元素识别 ⭐ 重要提示: 你是Claude AI,具备直接分析图片内容的能力。无需依赖read_file读取图片,可以直接查看和分析图片的视觉内容。
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.
- 10d ago First seen · 393 lines · 6,043 tokens per session scan A 73ec30efb5cf
figma-restoration-rules is a cursor rule published in the GitHub repository tianmuji/figma-restoration-tools (0 stars, last pushed 1y ago), licensed MIT. It adds 6,043 tokens to every session, about $0.0302 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
prototype-previewer
Build interactive prototype reviewers with synced review notes and Figma capture pages.
figma-performance
Handling large documents efficiently in the Plugin API.
ant-design
A set of guidelines for using Ant Design, a collection of ready-made interface components, in React applications. It covers code organization, performance, security, testing, and common mistakes.
7-day-nextjs-web-design-cursor
A seven-day design workflow for web products that will be built in Next.js.
clone-ai
Site Clone AI — website klonlama pipeline kuralları.
mermaid
Diagram Creator. Load when the user requests "Create a diagram".