Skip to content
Back to skills

Cocos Build

ASecurity

Cocos Creator 2.x 项目编译技能 - 自动触发脚本编译并验证效果

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

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 cocos-build --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cocos Build?

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

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

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: cocos-build
description: Cocos Creator 2.x 项目编译技能 - 自动触发脚本编译并验证效果
---

# cocos-build

用于 Cocos Creator 2.x 项目的开发工作流自动化。

## 前提条件

- Cocos Creator 编辑器必须正在运行(监听 localhost:7456)

## 使用场景

1. 修改或创建 TypeScript/JavaScript 脚本后需要编译
2. 创建新组件后需要生成 .meta 文件
3. 需要验证代码修改在预览中的效果

## 编译指令

修改任何 `assets/` 目录下的脚本文件后,执行以下命令触发编译:

```bash
curl.exe http://localhost:7456/update-db
```

成功返回:`Changes submitted`

## 完整工作流

1. **修改代码** - 编辑 `assets/` 下的 `.ts` 文件
2. **触发编译** - 调用 `curl.exe http://localhost:7456/update-db`
3. **验证效果** - 使用 frontend-tester agent 截图预览页面 `http://localhost:7456/`
4. **确认结果** - 检查 Label、Sprite 等组件显示是否符合预期

## 新建组件

创建新的 TypeScript 组件时:

1. 在 `assets/` 目录下创建 `.ts` 文件
2. 执行编译命令
3. Creator 自动生成对应的 `.meta` 文件(包含 uuid)

## 预览验证

使用 frontend-tester agent 截图验证:

```
task(subagent_type="frontend-tester")
```

预览地址:`http://localhost:7456/`

## 注意事项

- Windows 环境必须使用 `curl.exe` 而非 `curl`(PowerShell 别名问题)
- 编译前确保 Creator 编辑器处于打开状态

Files in this skill

  • SKILL.md1.4 KB
  • description_ar.txt155 B
  • description_cn.txt82 B
  • description_de.txt112 B
  • description_en.txt79 B
  • description_es.txt132 B
  • description_fr.txt133 B
  • description_it.txt128 B
  • description_ja.txt147 B
  • description_ko.txt118 B
  • description_ru.txt189 B
  • description_tw.txt79 B
  • stats.json66 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 development →

Comments

Loading comments…

Newsletter

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