Third-Person-MC: Skill for Claude Code

.agent/skills/vtj-raycasting-system/SKILL.md

vtj-raycasting-system is a skill for Claude Code, Codex from hexianWeb/Third-Person-MC. It costs 29 tokens per session (2,478 once invoked), scanned A, original, MIT.

A raycasting and collision-detection system for Three.js scenes. Raycasting sends an invisible line from the camera through the pointer to find objects it intersects.

In plain words
What is it for?
Use it for click or hover picking, target locking, collision checks, and interactions such as mining or placing blocks.
Why use it?
It provides a consistent way to turn mouse input into object selection or interaction and reports results through events.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is hexianWeb/Third-Person-MC's own configuration. It tells Claude Code and Codex how to work on Third-Person-MC 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 Third-Person-MC configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hexianWeb/Third-Person-MC. 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/hexianWeb/Third-Person-MC/main/.agent/skills/vtj-raycasting-system/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/hexianWeb/Third-Person-MC

Made for: Claude Code, Codex.

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 vtj-raycasting-system

README.md
[![agentmods](https://agentmods.dev/badge/skills/hexianweb/third-person-mc/vtj-raycasting-system/github.svg)](https://agentmods.dev/skills/hexianweb/third-person-mc/vtj-raycasting-system)
Your own site
<a href="https://agentmods.dev/skills/hexianweb/third-person-mc/vtj-raycasting-system"><img src="https://agentmods.dev/badge/skills/hexianweb/third-person-mc/vtj-raycasting-system/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 vtj-raycasting-system

Your own site · 80×15
<a href="https://agentmods.dev/skills/hexianweb/third-person-mc/vtj-raycasting-system"><img src="https://agentmods.dev/badge/skills/hexianweb/third-person-mc/vtj-raycasting-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,478 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00029 $0.02478
Opus 5.5 $0.00012 $0.00991
Sonnet 5.5 $0.00006 $0.00496
Haiku 4.5 $0.00003 $0.00248

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

Security

Grade A, and why

vtj-raycasting-system 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.

.agent/skills/vtj-raycasting-system/SKILL.md · 374 lines

How it starts

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

vite-threejs Raycasting System

Overview

本项目的射线系统主要用于 方块交互(挖掘、放置)和 目标选择。

核心原则:始终使用 iMouse.normalizedMouse 获取 NDC 坐标,射线检测结果通过 mitt 事件通知。

When to Use

  • 实现点击拾取功能
  • 检测鼠标悬停对象
  • 实现方块交互(挖掘、放置)
  • 添加目标锁定功能

基础 Raycaster 模式

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

export default class ObjectPicker {
  constructor() {
    this.experience = new Experience()
    this.scene = this.experience.scene
    this.camera = this.experience.camera.instance
    this.iMouse = this.experience.iMouse
    
    this.raycaster = new THREE.Raycaster()
    this.intersects = []
    
    // 配置
    this.params = {
      enabled: true,
      maxDistance: 100,
    }
    
    // 绑定事件
    this._handleClick = this._handleClick.bind(this)
    emitter.on('input:mouse_down', this._handleClick)
  }
  
  _handleClick({ button }) {
    if (button !== 0 || !this.params.enabled) return
    
    // 使用 IMouse 的 normalizedMouse(MANDATORY)
    const ndc = this.iMouse.normalizedMouse
    this.raycaster.setFromCamera(ndc, this.camera)
    
    // 检测交叉
    this.intersects = this.raycaster.intersectObjects(
      this.scene.children,
      true  // recursive
    )
    
    if (this.intersects.length > 0) {
      const hit = this.intersects[0]
      emitter.emit('game:object-picked', {
        object: hit.object,
        point: hit.point,
        distance: hit.distance,
      })
    }
  }
  
  destroy() {
    emitter.off('input:mouse_down', this._handleClick)
  }
}

屏幕中心射线(第一人称准星)

const CENTER_SCREEN = new THREE.Vector2(0, 0)

update() {
  // 第一人称:从屏幕中心发射
  this.raycaster.setFromCamera(CENTER_SCREEN, this.camera)
  
  // 或者第三人称:从鼠标位置发射
  // this.raycaster.setFromCamera(this.iMouse.normalizedMouse, this.camera)
  
  const intersects = this.raycaster.intersectObjects(this.targets, true)
  // ...
}

方块交互模式

本项目的 BlockRaycaster 实现了体素方块的射线检测:

// src/js/interaction/block-raycaster.js
export default class BlockRaycaster {
  constructor() {
    this.experience = new Experience()
    this.camera = this.experience.camera.instance
    this.iMouse = this.experience.iMouse
    
    this.raycaster = new THREE.Raycaster()
    this.raycaster.far = 8  // 最大交互距离
    
    this.params = {
      useMouse: false,  // false = 屏幕中心, true = 鼠标位置
    }
    
    this.result = {
      hit: false,
      blockPos: null,
      faceNormal: null,
      adjacentPos: null,  // 放置方块的位置
    }
  }
  
  update(terrainMeshes) {
    // 选择射线原点
    const ndc = this.params.useMouse
      ? this.iMouse.normalizedMouse
      : new THREE.Vector2(0, 0)
    
    this.raycaster.setFromCamera(ndc, this.camera)
    
    const intersects = this.raycaster.intersectObjects(terrainMeshes, false)
    
    if (intersects.length > 0) {
      const hit = intersects[0]
      
      // 计算方块坐标(向下取整到格子中心)
      const blockX = Math.floor(hit.point.x - hit.face.normal.x * 0.5)
      const blockY = Math.floor(hit.point.y - hit.face.normal.y * 0.5)
      const blockZ = Math.floor(hit.point.z - hit.face.normal.z * 0.5)
      
      // 计算相邻方块位置(放置用)
      const adjacentX = blockX + Math.round(hit.face.normal.x)
      const adjacentY = blockY + Math.round(hit.face.normal.y)
      const adjacentZ = blockZ + Math.round(hit.face.normal.z)
      
      this.result = {
        hit: true,
        blockPos: new THREE.Vector3(blockX, blockY, blockZ),
        faceNormal: hit.face.normal.clone(),
        adjacentPos: new THREE.Vector3(adjacentX, adjacentY, adjacentZ),
        distance: hit.distance,
      }
    } else {
      this.result.hit = false
    }
    
    return this.result
  }
}

Read the full file on GitHub · 374 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 · 374 lines · 29 tokens per session scan A 75b1dd1fc8c4

Subscribe to this mod's changes

vtj-raycasting-system is a skill published in the GitHub repository hexianWeb/Third-Person-MC (197 stars, last pushed 3mo ago), licensed MIT. It adds 29 tokens to every session and 2,478 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

super-claudio-brothers

Generate a unique themed Super Claudio Brothers platformer. Creates a custom level, colour palette, enemy look, and Claudio costume. Every run produces a different game.

alexconner-79/super-claudio-brothers · 40 tokens

events-system

Use this skill when working with the Phaser 4 event system. Covers EventEmitter, scene events, game events, custom events, and event-driven communication. Triggers on: events, on, emit, EventEmitter, scene events, listeners.

phaserjs/phaser · 52 tokens

game-object-components

Use this skill when working with Phaser 4 game object components and the mixin system. Covers Transform, Alpha, Tint, Origin, Depth, Flip, Mask, GetBounds, Lighting, and other shared component behaviors. Triggers on: component, mixin, transform, mask, bounds, lighting.

phaserjs/phaser · 65 tokens

geometry-and-math

Use this skill when using Phaser 4 math and geometry utilities. Covers vectors, rectangles, circles, triangles, polygons, random number generation, angles, distance, interpolation, and snapping. Triggers on: Vector2, Rectangle, Circle, math, distance, angle, random, lerp.

phaserjs/phaser · 64 tokens

particles

Use this skill when creating particle effects in Phaser 4. Covers ParticleEmitter, emission zones, death zones, particle properties, textures, gravity wells, and particle movement. Triggers on: particles, emitter, particle effect, explosion, fire, smoke.

phaserjs/phaser · 53 tokens

physics-arcade

Use this skill when using Arcade Physics in Phaser 4. Covers enabling physics, velocity, acceleration, gravity, collisions, overlap, world bounds, physics groups, static bodies, and collision categories. Triggers on: physics, arcade, velocity, gravity, collide, overlap, bounce, physics body.

phaserjs/phaser · 65 tokens