Agent skill

Vtj Component Model

by hexianWeb in hexianWeb/Third-Person-MC

Creates 3D components using the Experience singleton pattern.

MITAuto-check passedGame Development

Install Vtj Component Model

skills CLI
$ npx skills add hexianWeb/Third-Person-MC --skill vtj-component-model -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hexianWeb/Third-Person-MC vtj-component-model --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hexianWeb/Third-Person-MC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent/skills/vtj-component-model .claude/skills/vtj-component-model && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vtj-component-model
GitHub stars
194
Token cost
~1.5k tokens
SKILL.md length
196 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Creates 3D components using the Experience singleton pattern.

  • Building new classes in src/js/
  • SKILL.md covers Overview, When to Use, Component Template and Dependency Extraction Rules, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Implementing lifecycle methods

What it does

Vtj Component Model is an agent skill from hexianWeb/Third-Person-MC. Creates 3D components using the Experience singleton pattern. Use when building new classes in src/js/, implementing lifecycle methods, or managing Three.js objects.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development, covering 3D graphics and WebGL. It works with Three.js. The repository describes itself as: Three.js web version Minecraft in browser. The licence is MIT.

When your agent uses it

  • Building new classes in src/js/
  • Implementing lifecycle methods
  • Managing Three.js objects

Example prompts

  • “Use the vtj-component-model skill to create 3D components using the Experience singleton pattern”
  • “/vtj-component-model”

What it can do on your machine

Read from SKILL.md and the folder at commit 490203c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vtj Component Model loads about 1.5k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 196 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hexianWeb/Third-Person-MC at commit 490203c, republished under its MIT licence (© hexianWeb). 196 words, ~1,481 tokens.

Download SKILL.mdSave it as .claude/skills/vtj-component-model/SKILL.md (or your agent's skills folder).
name
vtj-component-model
description
Creates 3D components using the Experience singleton pattern. Use when building new classes in src/js/, implementing lifecycle methods, or managing Three.js objects.

vite-threejs 3D Component Model

Overview

All 3D components in this project follow a class-based singleton pattern. Components access shared resources through the Experience singleton and implement standardized lifecycle methods.

Core principle: Extract only what you need, implement all required lifecycle methods, always clean up resources.

When to Use

  • Creating any new class in src/js/
  • Building 3D objects, managers, controllers, or utilities that interact with the scene
  • Wrapping Three.js functionality in reusable components

Component Template

javascript
import Experience from '@/js/experience.js'
import emitter from '@/js/utils/event-bus.js'
import * as THREE from 'three'

export default class YourComponent {
  constructor(options = {}) {
    // 1. 获取 Experience 单例
    this.experience = new Experience()

    // 2. 按需提取依赖(仅取所需,避免冗余)
    this.scene = this.experience.scene
    this.resources = this.experience.resources
    this.debug = this.experience.debug

    // 3. 组件参数
    this.params = {
      enabled: options.enabled ?? true,
      // ... 其他参数
    }

    // 4. 组件状态
    this.mesh = null

    // 5. 初始化
    this._init()

    // 6. 调试面板(必须在 debug.active 条件下调用)
    if (this.debug.active) {
      this.debugInit()
    }
  }

  _init() {
    // 创建 3D 对象并添加到场景
    this.mesh = new THREE.Mesh(/* ... */)
    this.scene.add(this.mesh)
  }

  debugInit() {
    // 调试面板 - 详见 vtj-debug-panel skill
  }

  update() {
    // 每帧更新逻辑
    // 时间通过 this.experience.time 访问,不通过参数传递
  }

  resize() {
    // 窗口尺寸变化时调用
  }

  destroy() {
    // 清理资源 - 涉及 Object3D 的组件必须实现
    if (this.mesh) {
      this.scene.remove(this.mesh)
      this.mesh.geometry?.dispose()
      this.mesh.material?.dispose()
      this.mesh = null
    }
  }
}

Dependency Extraction Rules

只提取组件实际需要的依赖:

组件类型典型依赖
渲染对象scene, resources
交互组件scene, camera.instance, iMouse
动画组件scene, time
调试组件debug
UI 相关sizes, canvas
javascript
// ✅ GOOD: 只取所需
this.scene = this.experience.scene
this.resources = this.experience.resources

// ❌ BAD: 提取全部
this.scene = this.experience.scene
this.camera = this.experience.camera
this.renderer = this.experience.renderer
this.time = this.experience.time
this.sizes = this.experience.sizes
this.iMouse = this.experience.iMouse
this.debug = this.experience.debug
// ... 大部分根本用不到

Lifecycle Methods

方法必需条件调用方
debugInit()有可调参数构造函数,if (debug.active)
update()有逐帧逻辑父组件的 update()
resize()响应尺寸变化父组件的 resize()
destroy()涉及 Object3D父组件的 destroy()
destroy() 是强制要求

任何涉及 Object3D 的组件必须实现 destroy() 方法。

javascript
destroy() {
  // 1. 移除事件监听
  emitter.off('some:event', this._handler)

  // 2. 从场景移除对象
  if (this.mesh) {
    this.scene.remove(this.mesh)
  }

  // 3. 销毁几何体
  this.mesh?.geometry?.dispose()

  // 4. 销毁材质
  if (this.mesh?.material) {
    if (Array.isArray(this.mesh.material)) {
      this.mesh.material.forEach(m => m.dispose())
    } else {
      this.mesh.material.dispose()
    }
  }

  // 5. 销毁纹理(如果组件自己创建的)
  this.texture?.dispose()

  // 6. 销毁子组件
  this.childComponent?.destroy()

  // 7. 清空引用
  this.mesh = null
}

Debug Access Pattern

统一使用以下方式访问调试系统:

javascript
// 在构造函数中
this.debug = this.experience.debug

// 检查是否激活
if (this.debug.active) {
  this.debugInit()
}

// 在 debugInit() 中创建面板
debugInit() {
  this.debugFolder = this.debug.ui.addFolder({
    title: 'Component Name',
    expanded: false,
  })

  this.debugFolder.addBinding(this.params, 'someValue', {
    label: '参数名称',
    min: 0,
    max: 1,
  })
}

注意:

  • 方法名统一使用 debugInit()(不是 debugInit 或 setDebug)
  • 通过 this.debug.ui 访问 Tweakpane 实例
  • 通过 this.debug.active 判断是否启用

Common Mistakes

❌ 缺少 destroy() 方法
javascript
// BAD: 组件创建了 mesh 但没有 destroy
class BadComponent {
  constructor() {
    this.mesh = new THREE.Mesh(...)
    this.scene.add(this.mesh)
  }
  // 没有 destroy() → 内存泄漏
}
❌ 调试方法命名不一致
javascript
// BAD: 使用其他命名
debuggerInit() { }      // ❌
setDebug() { }       // ❌

// GOOD: 统一命名
debugInit() { }   // ✅
❌ 直接访问 debug.ui 而非 debug
javascript
// BAD: 直接提取 ui
this.debug = this.experience.debug.ui // ❌

// GOOD: 提取 debug 对象
this.debug = this.experience.debug // ✅
// 然后通过 this.debug.ui 访问面板
❌ 事件监听未清理
javascript
// BAD: 绑定事件但没清理
constructor() {
  emitter.on('game:event', this.handler.bind(this))
}
// 没有在 destroy() 中 emitter.off()

// GOOD: 保存引用并清理
constructor() {
  this._boundHandler = this.handler.bind(this)
  emitter.on('game:event', this._boundHandler)
}
destroy() {
  emitter.off('game:event', this._boundHandler)
}
❌ 通过 update() 参数传递时间
javascript
// BAD: 通过参数传递
update(deltaTime) {
  this.mesh.rotation.y += deltaTime
}

// GOOD: 通过 Experience 访问
update() {
  const delta = this.experience.time.delta
  this.mesh.rotation.y += delta * 0.001
}

Special Case: Independent Scene

如需创建独立于主场景的 3D 视图(如 UI 预览),不使用 Experience 单例:

javascript
// 参考 src/js/components/skin-preview-scene.js
class IndependentScene {
  constructor(canvas) {
    // 创建独立的 scene/camera/renderer
    this.scene = new THREE.Scene()
    this.camera = new THREE.PerspectiveCamera(...)
    this.renderer = new THREE.WebGLRenderer({ canvas })
  }
}

这是唯一允许不使用 Experience 单例的情况。

Quick Reference

规则要求
单例访问this.experience = new Experience()
依赖提取只取所需
调试方法debugInit()(统一命名)
调试访问this.debug = this.experience.debug
时间访问this.experience.time(不通过参数)
destroy涉及 Object3D 必须实现
事件清理destroy() 中 emitter.off()

© hexianWeb, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agent/skills/vtj-component-model of hexianWeb/Third-Person-MC.

Open the folder on GitHubat commit 490203c

Compare with similar skills

Vtj Component Model next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vtj Component Model compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vtj Component Model this skillhexianWeb/Third-Person-MC194—~1.5kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k1 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.4k—~2.2kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0
Threejs World Generationcalesthio/OpenMontage65k—~2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 1 repo~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.4k GitHub stars~2.2k tokensUpdated 10 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Threejs World Generation

    calesthio/OpenMontage

    Build deterministic, editable, free-viewpoint Three.js worlds from text or structured briefs.

    65k GitHub stars~2k tokensUpdated 4 days ago
    Game DevelopmentAuto-check passed
  • 3Dviz Pro Max Scene Builder

    viettranx/3dviz-pro-max

    Guides building an expressive 3D scene in Three.js or Blender by reasoning through intent, object construction and scientific grounding before using a catalog of recipes and kits.

    675 GitHub stars~2.8k tokensUpdated 27 days ago
    Game DevelopmentAuto-check passed

More from hexianWeb/Third-Person-MC

All 12 skills in this repo
  • Vtj Debug Panel

    hexianWeb/Third-Person-MC

    Configures Tweakpane debug panels for 3D components. An agent skill from hexianWeb/Third-Person-MC.

    194 GitHub stars~638 tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Camera System

    hexianWeb/Third-Person-MC

    Configures third-person camera systems with collision avoidance.

    194 GitHub stars~1.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Input System

    hexianWeb/Third-Person-MC

    Handles mouse, keyboard, and touch input via the IMouse and InputManager systems.

    194 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Performance

    hexianWeb/Third-Person-MC

    Optimizes Three.js rendering performance. An agent skill from hexianWeb/Third-Person-MC.

    194 GitHub stars~802 tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Raycasting System

    hexianWeb/Third-Person-MC

    Implements ray picking and collision detection. An agent skill from hexianWeb/Third-Person-MC.

    194 GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Resource Management

    hexianWeb/Third-Person-MC

    Loads and manages 3D assets via the Resources system. An agent skill from hexianWeb/Third-Person-MC.

    194 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Vtj Component Model

What does Vtj Component Model do?

Creates 3D components using the Experience singleton pattern. Vtj Component Model is an agent skill from hexianWeb/Third-Person-MC. Creates 3D components using the Experience singleton pattern.

When should I use Vtj Component Model?

Vtj Component Model fits situations like: building new classes in src/js/; implementing lifecycle methods; managing Three.js objects.

How do I install Vtj Component Model in Claude Code?

Run `npx skills add hexianWeb/Third-Person-MC --skill vtj-component-model -a claude-code`. Or copy the skill folder (.agent/skills/vtj-component-model in hexianWeb/Third-Person-MC) into .claude/skills/vtj-component-model in your project. Claude Code loads it when a task matches its description.

How do I install Vtj Component Model in Codex?

Run `npx skills add hexianWeb/Third-Person-MC --skill vtj-component-model -a codex`. Or copy the skill folder (.agent/skills/vtj-component-model in hexianWeb/Third-Person-MC) into .agents/skills/vtj-component-model in your project. Codex loads it when a task matches its description.

Can I use Vtj Component Model in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hexianWeb/Third-Person-MC --skill vtj-component-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vtj-component-model, .gemini/skills/vtj-component-model, .github/skills/vtj-component-model and .opencode/skills/vtj-component-model in your project.

What does Vtj Component Model need to run?

SKILL.md names no scripts, command-line tools or credentials: Vtj Component Model is instructions for the agent only.

Does Vtj Component Model access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Vtj Component Model safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vtj Component Model use?

Vtj Component Model is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vtj Component Model use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Vtj Component Model?

Skills that share tags, products or a category with Vtj Component Model: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.4k stars) and Threejs Gameplay Systems (valkor-ai/loom, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vtj Component Model?

hexianWeb (a GitHub user) maintains it in hexianWeb/Third-Person-MC, which has 194 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on July 27, 2026.

Source: hexianWeb/Third-Person-MC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.