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

/cocosair-project-setup

@ed38648
by oahc09oahc09/cocosairjs3 stars
2
Run it yourself

Set up npm imports, package entries, importmap, TypeScript and variant builds. Use for cocosair.js installation, unresolved-import errors, page shells or build artifacts.

  • 9 files
  • 27.7 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/oahc09/cocosairjs/cocosair-project-setup

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

referencescontext.md

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

Working context

Use package imports and shipped docs for an application; use source paths and repository commands only in a confirmed AIR checkout. A copied host skill is not a runtime installation.

Read the shared environment rules when locating these roots. If sibling resources are unavailable, use the installed canonical chapter and disclose the limitation. Tool declarations identify workflow capabilities; they do not authorize installation, writes, publication or any action outside the user and host scope.

Related skills

  • cocosair - routing and shared Code First constraints; reuse it if already loaded.
  • cocosair-graphics-and-dom - owns the cocosair.js texture surface and DOM overlays once the entry is wired.
  • cocosair-verification - which gates consume these build artifacts and how artifact drift is judged.

Original entry guidance

The original entry wording below is an on-demand archive, not a second routing source.

Use the environment rules to locate the checkout or installed package; sibling skills are optional direct dependencies, not a recursive load list.

Install, import and type-consume Cocos AIR correctly: one startup path per page, the canvas bound before engine evaluation, the declarations the compiler can resolve, and a build candidate you can name.

Read references/quick-start.md when constructing the minimal example. It preserves the complete setup and teardown sequence; select the source-checkout or npm-consumer environment first.

Read references/context.md to select the owner of this step and only its directly needed dependencies. Reuse already loaded skills; this is not a recursive load list.

Original mistake navigation

Before implementing the relevant path, read its wrong/right examples in references/common-mistakes.md:

  • [HIGH] Importing 'cocosair' from the installed package
  • [HIGH] Taking the package surface from src/index.ts
  • [MEDIUM] Using removed bootstrap/html-source package subpaths
  • [MEDIUM] Treating a variant build as the default candidate

Original metadata

Description and description_en

The two original fields contained exactly the same value, retained once here.

Set up a Cocos AIR project end to end - install the cocosair.js npm package or build from source, choose among the main entry, cocosair.js and the experimental cocosair.js, write the importmap and the startup-bound canvas page skeleton, resolve TypeScript declarations on TS 4.9 and TS 5+ via the exports types conditions, map npm scripts to build artifacts, and run AIR_FEATURES/AIR_OUT_DIR variant builds without disturbing the default 26-feature candidate. Use when installing or importing cocosair.js, fixing unresolved-import or wrong-entry errors, wiring a page shell or editor types, or deciding which build command produces which file.

Keywords

Cocos AIR, cocosair.js, project, setup

References

  • entries.md - exports map, per-entry symbol surfaces, artifact ownership.
  • feature-flags.md - default 26 units, the 7 unselected declared units, AIR_FEATURES/AIR_OUT_DIR semantics.
  • html-shell.md - page skeleton, importmap shape, startup canvas binding, dev server facts.

Canonical docs

docs/manual/installation.md, build/README.md, docs/reference/web-features.md, docs/manual/typescript-dom-compatibility.md.

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
subsystem
All 1 allowed tools
Read Edit Write 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
[
  "install or import cocosair.js",
  "imports resolve to the wrong entry",
  "TypeScript editor declarations fail",
  "wire a page importmap and canvas",
  "which build command produces this artifact"
]
owns
[
  "package-entries",
  "importmap",
  "typescript",
  "html-shell",
  "feature-flags",
  "build-artifacts"
]
not_for
[
  "createAirApp startup failures -> cocosair-application",
  "live HTML textures or overlays -> cocosair-graphics-and-dom",
  "proving build artifacts -> cocosair-verification"
]
metadata
{
  "author": "oahc09@gmail.com",
  "version": "1.0.0",
  "last-updated": "2026-10-13",
  "description_zh": "安装和配置 Cocos AIR 项目,选择包入口、importmap、TypeScript 声明和变体构建。用于安装导入、页面骨架、类型解析或构建产物问题。"
}

README badge

README badge for oahc09/cocosairjs/cocosair-project-setup