| name | cocos-creator |
| description | Cocos Creator 3.8.6+ project inspection, scene and prefab editing, node and component mutation, asset and reference-image management, scene-view control, animation editing, UI composition, validation, and preview or build orchestration. Use when Codex needs to work inside a Cocos Creator project, inspect or modify active scenes, update nodes or components, manage prefabs or assets, author animations, validate scene structure, or turn editor requests into safe project changes. |
Cocos Creator
Overview
Use this skill to turn Cocos Creator requests into editor-safe project work. Prefer a live editor bridge for scenes, prefabs, animations, scene view, preview, and build work. When only project files are available, keep edits narrow and validation-heavy.
Quick Start
- Detect the operating surface.
- Prefer a live Cocos Creator editor bridge when
Editor.Message.request, extension messages, or an equivalent automation layer is available.
- Fall back to direct project-file edits only when no live editor surface exists.
- Load only the domain reference you need.
- Inspect before mutating.
- Read the current scene, hierarchy, target nodes, target components, target prefabs, and relevant asset URLs or UUIDs first.
- Mutate the smallest possible scope.
- Change one scene, node, component, prefab, animation clip, or preview/build setting at a time.
- Re-validate immediately.
- Re-query hierarchy, component state, dirty state, preview state, validation output, or logs after the mutation.
Operating Rules
- Keep this skill focused on editor operations, project content, validation, and debugging. Exclude commercial gates, identity flows, transport setup, and host-control surfaces.
- Prefer UUIDs, asset URLs, scene paths, node paths, and component type names over human labels when both are available.
- Prefer editor-driven scene and prefab changes over manual text edits when the editor is running.
- Prefer read or query actions before write actions, and write actions before build or preview actions.
- Use save, snapshot, undo, or soft-reload style operations only when they reduce risk or are explicitly required.
- Treat capture, validation, and query actions as the preferred read surfaces before large scene or prefab changes.
- Treat animation editing as a special mode: require the Animation panel to be open and query the active clip context before mutating keys, curves, or events.
- Re-run focused validation after every scene mutation, prefab mutation, or build or preview action.
- Read references/working-rules.md for detailed execution heuristics.
Capability Menu
1. Project and editor state
Use this when you need project metadata, editor info, project settings, builder readiness, preview control, preferences, or project logs.
2. Scene lifecycle
Use this when you need to get the current scene, list scenes, open a scene, create or save a scene, close a scene, or inspect scene hierarchy.
3. Scene execution and state
Use this when you need snapshots, undo boundaries, scene reloads, script or component execution, scene dirty or readiness checks, or scene validation.
4. Node and component edits
Use this when you need to locate nodes, create, duplicate, move, or delete nodes, read or change node properties, add or remove components, inspect assignable properties, mount or remove scripts, or verify component state after an edit.
5. Prefab and asset workflows
Use this when you need prefab creation, instantiation, edit-mode entry or exit, apply or revert flows, asset queries, asset imports, or dependency inspection.
6. Scene view and reference images
Use this when you need camera focus, alignment, 2D or 3D mode changes, gizmo or icon visibility, scene-view resets, or reference-image overlays for UI or layout work.
7. Animation editing
Use this when you need clip creation, playback control, keyframe edits, curve changes, event edits, clip presets, or direct batch animation writes. Require a live editor and an active Animation panel before normal write operations.
8. Composite, template, capture, and validation workflows
Use this when you need high-level UI composition helpers, template application, scene or node snapshots for AI context, layout validation, hierarchy validation, or broken-reference checks.
Workflow
Establish context
- Detect whether the editor is live.
- Identify project root, active scene, target assets, and target nodes or components.
- Identify whether the task is low-level mutation, prefab-modal work, animation editing, or a higher-level composite or template operation.
- Load the narrowest matching reference before acting.
Choose the safest mutation surface
- Use editor message or request flows for live scene, prefab, animation, scene-view, preview, and build actions.
- Use direct file edits only for source files, config files, or serialized assets that are safer to edit offline.
- Use capture or query operations before applying composite or template helpers that may touch multiple nodes.
- Avoid mixing unrelated scene edits, prefab edits, animation edits, and build actions in a single step.
Execute and verify
- Apply one bounded change.
- Re-query the modified scene, node, component, prefab, asset, or animation clip immediately.
- Run layout, hierarchy, or reference validation after high-level UI generation or template application.
- If verification fails, revert through editor-safe means when possible or continue debugging before making more edits.
Close the loop
- Save only the files or scenes that were intentionally changed.
- Report what changed, how it was verified, and any editor-only actions that still require a human if the environment lacks a live editor bridge.
Reference Map
- references/project-editor.md: project metadata, settings, preview, build, logs, preferences
- references/scene-hierarchy.md: scene lifecycle, hierarchy, undo, execution, recovery
- references/nodes-components.md: node lifecycle, component mutation, script mounting, click events
- references/prefabs-assets.md: prefab lifecycle, asset database workflows, dependency inspection
- references/view-layout.md: scene view, camera tools, overlays, coordinate context
- references/animation.md: clip editing, keys, curves, events, presets, direct-file batch writes
- references/generation-validation.md: builder engine, composites, templates, capture, validation
- references/working-rules.md: safety heuristics and sequencing rules