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.

SKILL.md

≈49 tokens for metadata: the name and description. ≈499 when used: this file. ≈6.3k more on demand in 8 files.

Description uses 2.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈195 characters, or 2.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Cocos AIR project setup

Stop once you can answer the task. Do not read another same-topic reference for the same question.

Scope: Package imports, HTML shells, TypeScript declarations and identifiable build variants.

Environment: use package imports in apps; source paths require an AIR checkout. See context.

Quick Start

For complete setup and teardown, read Quick Start.

Siblings: direct dependencies; reuse loaded skills.

Triggers

  • Install cocosair.js in a bundler app
  • Wire a static page importmap and canvas
  • Select a custom canvas or startup pixel ratio
  • Find main-entry experimental HTML texture helpers
  • Resolve TypeScript 4.9 or 5+ declarations
  • Choose AIR_FEATURES and separate variant output
  • Identify which build command owns an artifact

Exact API and symptom mappings: triggers.

Contracts

Use cocosair.js in bundler apps; cocosair is the repository importmap alias. Pass any selected canvas to createAirApp; repeated main calls share startup admission. Keep variant outputs separate from default builds.

Read references/contracts.md only when the task needs exact option rules, limits, error behavior or source annotations. Prefer the topic references below for a narrower question.

Common Mistakes

  • [HIGH] Installed apps import cocosair.js, not the cocosair alias.
  • [HIGH] src/index.ts alone does not define the package surface.
  • [MEDIUM] Bootstrap/html-source package subpaths were removed.
  • [MEDIUM] A variant build is a distinct candidate.

Read relevant wrong/right examples before implementation.

Reference map

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