html5-game-editor: Skill for Cursor

.cursor/skills/create-game-component/SKILL.md

create-game-component is a skill for Cursor from andvolodko/html5-game-editor. It costs 57 tokens per session (1,708 once invoked), scanned A, original, MIT.

A guide for creating reusable game script components: small pieces of code that add behavior to game objects. It uses a class-based behavior and registers that behavior with the game component system.

In plain words
What is it for?
Use it when adding behaviors such as loading a scene, changing scenes, responding to events, or adding a component that appears in the editor's Add Component list.
Why use it?
It keeps game behavior in the expected locations and format, so components can be reused, inspected, and kept separate from saved scene data.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is andvolodko/html5-game-editor's own configuration. It tells Cursor how to work on html5-game-editor itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything html5-game-editor configures →

Reuse

Borrowing it

Nothing to install: this file belongs to andvolodko/html5-game-editor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/andvolodko/html5-game-editor/master/.cursor/skills/create-game-component/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/andvolodko/html5-game-editor

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for create-game-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/andvolodko/html5-game-editor/create-game-component/github.svg)](https://agentmods.dev/skills/andvolodko/html5-game-editor/create-game-component)
Your own site
<a href="https://agentmods.dev/skills/andvolodko/html5-game-editor/create-game-component"><img src="https://agentmods.dev/badge/skills/andvolodko/html5-game-editor/create-game-component/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for create-game-component

Your own site · 80×15
<a href="https://agentmods.dev/skills/andvolodko/html5-game-editor/create-game-component"><img src="https://agentmods.dev/badge/skills/andvolodko/html5-game-editor/create-game-component.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,708 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01708
Opus 5.5 $0.00023 $0.00683
Sonnet 5.5 $0.00011 $0.00342
Haiku 4.5 $0.00006 $0.00171

Measured 2mo ago against content hash 446e536892b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-game-component scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/create-game-component/SKILL.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create Game Component (OOP)

Prefer an OOP behaviour class that implements ScriptInstance, then wrap it with defineComponent({ create: (ctx) => new MyBehaviour(ctx) }).

This skill is only Script components (type: "Script"). Scene node types → .cursor/skills/add-node-type/SKILL.md. Runtime services / GameRuntime / audio host (not a new defineComponent) → .cursor/skills/implement-runtime-feature/SKILL.md. New game package → .cursor/skills/create-game/SKILL.md.

Do not put large logic in a bare create closure. Do not store class instances in scene JSON.

Placement

Kind Path id prefix
Game-specific games/<name>/src/components/<kebab>.ts <game>.PascalName (e.g. editor-features-demo.LoadingScene)
Shared reusable packages/game-components/src/shared/<kebab>.ts shared.PascalName

Shared components must stay runtime-safe: no React, Pixi, Three, or editor-core.

OOP pattern (required)

import {
  defineComponent,
  type ComponentDefinition,
  type ComponentRegistry,
  type ScriptCreateContext,
  type ScriptInstance,
} from "@game-editor/game-components";

type Props = {
  speed: number;
  enabled: boolean;
};

function readProps(raw: Readonly<Record<string, unknown>>): Props {
  return {
    speed: typeof raw.speed === "number" ? raw.speed : 1,
    enabled: typeof raw.enabled === "boolean" ? raw.enabled : true,
  };
}

/** Live instance — one per Script component on a node. */
export class SpinControllerBehaviour implements ScriptInstance {
  private speed = 1;
  private enabled = true;
  private unsubscribers: Array<() => void> = [];

  constructor(private readonly ctx: ScriptCreateContext) {
    this.applyProperties(ctx.properties);
  }

  start(): void {
    this.bind();
  }

  onPropertiesChanged(
    properties: Readonly<Record<string, unknown>>,
  ): void {
    this.applyProperties(properties);
  }

  update(dt: number): void {
    if (!this.enabled || dt <= 0) {
      return;
    }
    this.ctx.transform.rotation += this.speed * dt;
  }

  destroy(): void {
    this.unbind();
  }

  private applyProperties(raw: Readonly<Record<string, unknown>>): void {
    const props = readProps(raw);
    this.speed = props.speed;
    this.enabled = props.enabled;
  }

  private bind(): void {
    this.unbind();
    const { bus } = this.ctx.services;
    this.unsubscribers.push(
      bus.on("game.tick", () => {
        if (!this.enabled) return;
        // use ctx.nodeId, ctx.transform, ctx.transform3D, ctx.animations, services
      }),
    );
  }

  private unbind(): void {
    for (const off of this.unsubscribers) off();
    this.unsubscribers = [];
  }
}

const PROPERTIES: ComponentDefinition["properties"] = {
  speed: { kind: "number", default: 1, min: 0, step: 0.1 },
  enabled: { kind: "boolean", default: true },
};

export const spinControllerComponent = defineComponent({
  id: "example.SpinController",
  displayName: "Spin Controller",
  category: "UI",
  categoryOrder: 20,
  order: 10,
  allowMultiple: false,
  properties: PROPERTIES,
  create: (ctx) => new SpinControllerBehaviour(ctx),
});

/** Re-attach create after metadata-only catalog load. */
export function installSpinControllerRuntime(registry: ComponentRegistry): void {
  registry.attachRuntime(spinControllerComponent.id, spinControllerComponent.create);
}

Read the full file on GitHub · 190 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 190 lines · 57 tokens per session scan A 446e536892b5

Subscribe to this mod's changes

create-game-component is a skill published in the GitHub repository andvolodko/html5-game-editor (14 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 1,708 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

create-game-component compared with skills from other repositories

create-game-component next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
create-game-componentandvolodko/html5-game-editorSkill141mo agoMITA57Cursor
self-evolvetettethu/VibeGameSkill36724d agoApache-2.0A50Claude Code, Codex
artist-self-evolvetettethu/VibeGameSkill36724d agoApache-2.0A62Claude Code, Codex
vibegame-buildtettethu/VibeGameSkill36724d agoApache-2.0A42Claude Code, Codex
vibegame-starttettethu/VibeGameSkill36724d agoApache-2.0A61Claude Code, Codex
vibegame-edittettethu/VibeGameSkill36724d agoApache-2.0A57Claude Code, Codex
hearth-feelechoo19/hearthSkill441mo agoMITA97Claude Code