JavaScript Game Tools
Use this skill for web tooling, dashboards, Firebase web clients, Node scripts,
Cloud Functions, editor utilities, and TypeScript refactors around the game.
First Read
Inspect:
package.json- lockfile (
package-lock.json,pnpm-lock.yaml,yarn.lock, orbun.lockb) tsconfig.jsonvite.config.*,next.config.*, or other build configsrc/functions/if Firebase Functions are involved.env.exampleand config docs, but never print secrets
Core Rules
- Prefer TypeScript for production tooling.
- Use the existing package manager and module style.
- Use Firebase modular Web SDK in browser code.
- Use Firebase Admin SDK only in trusted server code.
- For Firebase Functions game APIs in this workspace, prefer JavaScript Gen2
Functions with Express.js route registration unless the target project already
uses another explicit pattern.
- Keep environment-specific config outside source.
- Validate input at boundaries with the project's existing schema library if
present; otherwise choose a small, explicit validator only when needed.
- Do not introduce a framework or state library for a small script.
- Add tests for data transforms, rules-sensitive code, and Cloud Functions.
Workflow
- Identify whether the target is browser, Node, Cloud Functions, or static tooling.
- Read existing scripts and package conventions.
- Make the smallest compatible change.
- Run available checks: typecheck, lint, unit tests, build.
- If checks cannot run, explain the missing dependency or command.
Reference Loading
- JavaScript/TypeScript patterns:
references/javascript-patterns.md - Firebase web/client boundaries: use
firebase-game-backend