Skip to content
Back to skills

Figma2cocos

ASecurity

在用户提供CSS样式且包含 width / height / left / top 4个属性时使用figma2cocos技能

  • 225 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 4, 2026
tools

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add NeverSight/skills_feed --skill figma2cocos --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Figma2cocos?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Figma2cocos
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-figma2cocos/badge)](https://www.skillsdirectory.com/skills/neversight-figma2cocos)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: figma2cocos
description: 在用户提供CSS样式且包含 width / height / left / top 4个属性时使用figma2cocos技能
---

# 背景知识
figma中设计分辨率是w1080 h2340
figma中坐标都是以左上角为0,0
cocos中是以屏幕中心为0,0

一个例子
用户输入css 其实是某个figma节点的属性
width: 68;
height: 68;
top: 438px;
left: 968px;

这个节点在cocos中的计算是
x = left - 1080/2 + 68/2
y = 2340/2 - top - 68/2

# 按以下步骤完成任务
1.进行计算
x = 968 - 1080/2 + 68/2 = 968 - 540 + 34 = 462
y = 2340/2 - 438 - 68/2 = 1170 - 438 - 34 = 698

2.再次重算核对结果

3.给用户返回计算出的x和y的值

4.如果包含 font-size 属性,给用户返回加上 字体大小是xx

注意:其余属性忽视

Files in this skill

  • SKILL.md808 B
  • description_ar.txt212 B
  • description_cn.txt115 B
  • description_de.txt145 B
  • description_en.txt99 B
  • description_es.txt146 B
  • description_fr.txt146 B
  • description_it.txt148 B
  • description_ja.txt167 B
  • description_ko.txt163 B
  • description_ru.txt236 B
  • description_tw.txt118 B
  • stats.json68 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.