Index of every page on this site: llms.txt
All skills
oahc09 avatar

/cocosair

@ed38648
by oahc09oahc09/cocosairjs3 stars
2
Run it yourself

Route AIR tasks by subsystem or visual symptom; choose direct dependencies and check capabilities.

  • 10 files
  • 72.8 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/oahc09/cocosairjs/cocosair

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescommon-mistakes.md

≈618 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Router mistake archive

These original wrong/right examples are preserved from the source snapshot, including its historical canvas-import warning. That warning conflicts with the current main-entry admission rule: importing main before canvas creation is supported. For current setup, follow application and environment. The archive is not new runtime evidence.

Common Mistakes

[HIGH] Importing the main entry before the canvas exists

Wrong:

<script type="module">
  const { createAirApp } = await import('cocosair.js'); // #GameCanvas not in DOM yet
</script>

Correct:

<canvas id="GameCanvas"></canvas>
<script type="module">
  import { createAirApp } from 'cocosair.js';
  const app = await createAirApp({ canvas: '#GameCanvas' });
  const cc = await import('cocosair.js');
</script>

Pages adapted from Creator or other engines add the canvas from script; the screen adapter initializes during main-entry import, so startup fails before any app code runs.

[HIGH] Assuming the Creator asset pipeline exists

Wrong:

assetManager.loadAny({ bundle: 'resources', path: 'models/robot' });

Correct:

import { Scene, Node } from 'cocosair.js';
// Build the scene in code with the original classes - there is no resources bundle to load from.
const scene = new Scene('Main');
scene.addChild(new Node('Robot')); // Scene extends Node: attach children to it directly
// Load models through the documented glTF path; route every other asset through cocosair-assets.

AIR ships no Creator Editor or .scene/Prefab/resources bundle pipeline; a Creator-parity load fails on the missing bundle instead of falling back.

[MEDIUM] Treating a docs mention as a usable capability

Wrong:

// "the repo has pose-graph notes, so I can ship pose-graph animation" - assume reachability from a mention.
import { MarionetteController } from 'cocosair.js'; // absent from the default entry: marionette is not in the default feature set

Correct:

// Answer from a layer you state yourself - this is not an engine export:
type CapabilityLayer = 'source-export' | 'bundle-reachable' | 'browser-verified';
// Then cite that entry's .d.ts and current evidence; the pose graph is neither.

Docs enumerate the engine surface; bundle reachability and browser verification are separate candidates, and conflating them produces demos that cannot run.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at ed38648. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
layer
router
All 1 allowed tools
Read Bash
Other metadata
compatibility
Cocos AIR source checkout or installed cocosair.js package. Browser rendering requires WebGL 2; source tooling requires Node.js >=18. Use the host-provided tools and user-authorized workspace.
when_to_use
[
  "which skill owns this AIR task",
  "choose only the dependencies needed for this step",
  "adapt Creator knowledge to code-first AIR",
  "distinguish source exports from proven browser capabilities"
]
owns
[
  "skill-routing",
  "primary-owner",
  "direct-dependencies",
  "code-first",
  "capability-layers"
]
not_for
[
  "startup errors -> cocosair-application",
  "material property failures -> cocosair-materials-effects"
]
metadata
{
  "author": "oahc09@gmail.com",
  "version": "1.0.0",
  "last-updated": "2026-10-13",
  "description_zh": "为 Cocos AIR 任务选择主技能和直接依赖,并遵循原生 API、启动时序与能力证据分层。用于开始 AIR 开发、定位能力归属或选择技能。"
}

README badge

README badge for oahc09/cocosairjs/cocosair