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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00028 $0.00854
Sonnet 5 $0.00011 $0.00342
Haiku 4.5 $0.00006 $0.00171

Measured 6d ago against content hash 446e536892b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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. 6d 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 (6 stars, last pushed 11d ago), licensed MIT. It adds 57 tokens to every session and 1,708 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

self-evolve

Capture reusable patterns from a finished project and lift them into framework-level priors (contracts, modules, skeletons) that future projects inherit. Run only when the user explicitly requests self-evolution; the orchestrator executes the workflow.

tettethu/VibeGame · 50 tokens

artist-self-evolve

Distill stable art-generation patterns from a completed project, so future projects produce comparable assets without re-discovering the prompts. Lead-dispatched only — orchestrator invokes this skill from its self-evolve flow with a game-slug message; do not self-trigger.

tettethu/VibeGame · 62 tokens

vibegame-build

Run VibeGame's standard end-to-end game development workflow with reviewer gates. Use when the user wants to create a game from zero or evolve an existing game across multiple stages.

tettethu/VibeGame · 42 tokens

vibegame-start

Resume a VibeGame orchestrator session after vibegame start. Use at the beginning of a Claude or Codex session to inspect team runtime state, repair missing persistent members, load goal and GDD context, inspect tasks, and ask the user what to do next.

tettethu/VibeGame · 61 tokens

design-npc

Use when the user wants to design an enemy, NPC, boss, companion, civilian, or wave-spawned mob's behavior. Walks perception, personality knobs, intent layer, action state machine, telegraphs, defeat handling, and group emergence — outputs a state-machine GDScript stub plus the recommended node tree. Trigger on…

SummerEngine/summer-engine-agent · 101 tokens

headless-scripting

Use when a Summer project needs an operation no MCP tool exposes, such as baking a navmesh, generating collision shapes, authoring an Animation, building a TileSet, re-importing assets after file changes, or preparing a supported local export. Runs a GDScript file against Summer Engine from the shell. Also use when a…

SummerEngine/summer-engine-agent · 92 tokens