← 返回 Skills 市场
liuyihunter

COCOS CLI Game Development

作者 liuyihunter · GitHub ↗ · v0.0.3 · MIT-0
cross-platform ⚠ suspicious
202
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install cocos-cli-game-dev
功能描述
Create, build, and modify Cocos game projects. Use this skill when the user asks to start a new Cocos game (2D/3D) or make changes to an existing one. It enf...
使用说明 (SKILL.md)

Cocos Game Development

Overview

This skill defines the standard operating procedure for creating and developing games using the Cocos engine. It strictly enforces the use of the Cocos CLI and the Cocos MCP (Model Context Protocol) server for game logic and scene modifications.

Execution Steps

1. Environment Verification

  • Action: Run cocos --help using the exec tool.
  • Goal: Confirm that the Cocos CLI is successfully installed and accessible in the current environment.

2. Project Creation & Templating

  • Action: Ask the user for the desired project name and whether the game should be 2D or 3D (if not provided).
  • Execution:
    • First, run cocos create --help to identify the correct flags for templates.
    • Run cocos create \x3Cproject_name> \x3Ctemplate_flags> to generate the project structure.

3. Start MCP Server

  • Action: Change the working directory to the newly created project folder.
  • Execution: Run cocos start-mcp-server using the exec tool.
  • Important: Because this is a long-running server, you MUST use background: true in your exec tool call.

4. Tool Discovery & Registration

  • Action: The MCP server needs to be connected to OpenClaw.
  • Execution: Once the MCP server is running, automatically connect/register it and immediately check the available tools exposed by it to understand the capabilities without waiting for user approval.

5. Game Production (Strict Rule & Anti-Hallucination)

  • CRITICAL CONSTRAINT: When building the game (creating scenes, adding nodes, modifying properties, adding components), you MUST ONLY use the tools provided by the Cocos MCP server.
  • Do not use standard file editing (edit/write) to manually hack scene files (.scene, .prefab, etc.) or engine configurations unless the MCP server lacks a specific capability and the user explicitly authorizes a manual override.
  • Anti-Hallucination: Before modifying any scene or node, always read the tool's parameter schema. Never invent UUIDs. Always use query tools (e.g., getting the scene tree) to retrieve exact UUIDs and node hierarchies before executing modification commands.

6. Build and Test

  • Action: Once the user confirms the game features are complete, package the game for testing.
  • Execution: Run the build command targeting the web platform (e.g., cocos build --platform web-mobile). Use cocos build --help to confirm the exact parameter syntax before building.

Troubleshooting & Error Logging

  • Port Conflicts: If cocos start-mcp-server fails, check if the port is already in use and try specifying an alternative port (e.g., --port).
  • Continuous Improvement: If a command, build process, or MCP tool fails unexpectedly, you must log the error to the project's .learnings/ERRORS.md file. Include the command, the exact error output, and any context. This helps the agent learn and avoid repeating the mistake.
安全使用建议
This skill mostly does what it says (create/build Cocos projects) but has two red flags you should consider before enabling it: 1) The skill's metadata does not list the Cocos CLI as a required binary even though the instructions rely on it—confirm your environment has the CLI installed. 2) The instructions tell the agent to automatically register/connect the local MCP server with OpenClaw and enumerate its tools without asking the user. That grants the agent autonomous network/registration behavior and could expose open ports or surface tools you did not intend to expose. Before installing, ask the publisher to (a) correct the declared requirements, (b) remove or change the automatic registration step so the agent requests explicit user approval before connecting or probing the MCP server, and (c) document what network endpoints and permissions the MCP integration uses. If you proceed, only enable this skill in trusted environments and monitor any long-running background processes and open ports the skill launches.
功能分析
Type: OpenClaw Skill Name: cocos-cli-game-dev Version: 0.0.3 The skill bundle provides a legitimate workflow for Cocos game development using the Cocos CLI and an MCP server. It includes standard procedures for environment verification, project creation, and building for web platforms. No indicators of malicious intent, data exfiltration, or unauthorized system access were found in SKILL.md or _meta.json.
能力评估
Purpose & Capability
The SKILL.md clearly requires the Cocos CLI (runs `cocos --help`, `cocos create`, `cocos start-mcp-server`), but the registry metadata lists no required binaries—this mismatch is inconsistent. Otherwise the requested operations (create/build via Cocos CLI and a project-local MCP server) are coherent with the skill's stated purpose.
Instruction Scope
Most runtime steps stay within project creation, starting a local MCP server, and using MCP-provided tools. However, the instructions explicitly require automatically connecting/registering the MCP server with OpenClaw and immediately enumerating exposed tools 'without waiting for user approval' — that is scope-creep and grants the agent broad, autonomous probing and potential registration behavior not justified by a simple CLI helper. It also mandates running a long-running background server process (background: true), which has operational and security implications (open ports, long-lived processes).
Install Mechanism
This is an instruction-only skill with no install spec or downloaded artifacts, which is a low-risk install footprint. Nothing will be written to disk by an installer step beyond what the Cocos CLI and user commands do.
Credentials
The skill declares no required environment variables or credentials, yet it instructs automated registration of an MCP server with OpenClaw (implying integration with agent tooling and possibly network endpoints). Also metadata omits the obvious dependency on the Cocos CLI binary. The absence of declared credentials or network access details while requiring automatic tool discovery is disproportionate and unclear.
Persistence & Privilege
always: false (good) and agent autonomous invocation is normal, but the SKILL.md's direction to auto-connect/register the MCP server and immediately probe its tools 'without waiting for user approval' effectively elevates the skill's runtime privileges and autonomy. This behavior should require explicit user consent before performing network registration or discovery.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cocos-cli-game-dev
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cocos-cli-game-dev 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.3
- Added a prerequisites section specifying that the Cocos CLI binary must be installed and available in the system PATH. - Clarified the process for MCP server registration: now, the agent should automatically connect/register the MCP server and immediately check available tools, without waiting for user approval. - Minor cleanup and streamlining of the templating and error logging steps. - Removed mention of copying standard assets from the skill’s `assets/` directory during project creation.
v0.0.2
Version 0.0.2 - Project creation step now allows copying standard assets from the skill’s assets directory (if present) to new projects. - Enforces use of background execution for `cocos start-mcp-server` to prevent terminal blocking. - Adds instructions for MCP server registration with OpenClaw and tool discovery process. - Introduces strict anti-hallucination rules: never invent UUIDs and always read parameter schemas before scene modification. - New troubleshooting section: handle port conflicts, error logging to `.learnings/ERRORS.md`, and consult domain-specific reference docs for advanced scenarios.
v0.0.1
Initial release of the Cocos Game Development skill: - Enforces Cocos CLI and MCP server as the only approved tools for project creation and game logic/scene editing. - Guides users through environment verification and project creation, with a choice between 2D and 3D templates. - Details procedure for starting the MCP server and connecting to it for tool discovery. - Strictly requires that all game modifications are performed only through MCP-exposed tools. - Provides standardized steps for building and testing games for the web platform.
元数据
Slug cocos-cli-game-dev
版本 0.0.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

COCOS CLI Game Development 是什么?

Create, build, and modify Cocos game projects. Use this skill when the user asks to start a new Cocos game (2D/3D) or make changes to an existing one. It enf... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 202 次。

如何安装 COCOS CLI Game Development?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cocos-cli-game-dev」即可一键安装,无需额外配置。

COCOS CLI Game Development 是免费的吗?

是的,COCOS CLI Game Development 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

COCOS CLI Game Development 支持哪些平台?

COCOS CLI Game Development 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 COCOS CLI Game Development?

由 liuyihunter(@liuyihunter)开发并维护,当前版本 v0.0.3。

💬 留言讨论