Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计提醒

xrift-world裂变世界

Agent Skill

xrift-world 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

674

周安装

27

GitHub Stars

公开资料未说明

下载量

218
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:xrift-world(裂变世界)
来源仓库:https://github.com/webxr-jp/xrift-skills
仓库路径:skills/xrift-world
安装命令:
npx skills add https://github.com/webxr-jp/xrift-skills --skill xrift-world
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/webxr-jp/xrift-skills --skill xrift-world

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或代码变更进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 需确认权限范围和维护状态,注意是否触发联网或文件读写操作。
  • xrift-world 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

XRift World Development Guide

A guide for creating and modifying WebXR worlds for the XRift platform.

References

  • API Reference - Full specification of all hooks, components, and constants in @xrift/world-components
  • Code Templates - Implementation patterns for GLB models, textures, Skybox, interactions, and more
  • Type Definitions - Type definitions for User, PlayerMovement, VRTrackingData, TeleportDestination, WorldInfo, InstanceInfo, ConfirmOptions, Tag, VideoState, LogEntry, PhysicsConfig, CameraConfig, VoiceVolumeOverrideContextValue

Critical Rules (Must Follow)

  1. Always use baseUrl from useXRift() when loading assets
  2. Place asset files in the public/ directory
  3. baseUrl includes a trailing /, so join with ${baseUrl}path (${baseUrl}/path is WRONG)
// Correct
const { baseUrl } = useXRift()
const model = useGLTF(`${baseUrl}robot.glb`)

// Wrong
const model = useGLTF('/robot.glb')           // Absolute path - NG
const model = useGLTF(`${baseUrl}/robot.glb`) // Extra / - NG

Project Overview

  • Purpose: WebXR worlds for the XRift platform
  • Tech Stack: React Three Fiber + Rapier physics engine + Module Federation
  • How It Works: Uploaded to CDN, dynamically loaded by the frontend

Project Structure

xrift-world-template/
├── public/              # Asset files (place directly, no subdirectories needed)
│   ├── model.glb
│   ├── texture.jpg
│   └── skybox.jpg
├── src/
│   ├── components/      # 3D components
│   ├── World.tsx        # Main world component
│   ├── dev.tsx          # Development entry point
│   ├── index.tsx        # Production export
│   └── constants.ts     # Constants
├── .triplex/            # Triplex (3D editor) config
├── xrift.json           # XRift CLI config
├── vite.config.ts       # Build config (Module Federation)
└── package.json

xrift.json Configuration

physics (Physics Settings)

FieldTypeDefaultDescription
gravitynumber9.81Gravity strength (positive value; Earth=9.81, Moon=1.62, Jupiter=24.79)
allowInfiniteJumpbooleantrueWhether to allow infinite jumping
{
  "physics": {
    "gravity": 9.81,
    "allowInfiniteJump": true
  }
}

Examples:

  • Obstacle course world: "allowInfiniteJump": false to add fall risk
  • Low gravity world: "gravity": 1.62 (Moon gravity) for floaty movement
  • High gravity world: "gravity": 24.79 (Jupiter gravity) for heavy movement

camera (Camera Settings)

FieldTypeDescription
nearnumberNear clip distance (hides objects closer than this distance)
farnumberFar clip distance (hides objects farther than this distance)
{
  "camera": {
    "near": 0.1,
    "far": 1000
  }
}

Examples:

  • Vast world: "far": 5000 to render distant objects
  • Precise world: "near": 0.01 for higher near-range rendering precision

outputBufferType (Output Buffer Type)

Specifies the output buffer type for WebGLRenderer. Affects post-processing and HDR rendering precision.

ValueDescription
UnsignedByteType8-bit integer (default, standard rendering)
HalfFloatType16-bit float (HDR and post-processing)
FloatType32-bit float (highest precision, higher GPU cost)
{
  "outputBufferType": "HalfFloatType"
}

permissions (Permission Settings)

Declares permissions required by the world. Declared permissions are shown to users as an approval screen when entering an instance.

FieldTypeDescription
allowedDomainsstring[]External domains the world communicates with
allowedCodeRulesstring[]Code security rules to relax
{
  "permissions": {
    "allowedDomains": ["api.example.com", "cdn.example.com"],
    "allowedCodeRules": ["no-storage-access", "no-network-without-permission"]
  }
}

allowedCodeRules

Rules defined by @xrift/code-security analyzer. By default, unsafe operations are blocked but can be relaxed when required.

CategoryRuleDescription
Dynamic Codeno-evalAllows eval()
Dynamic Codeno-new-functionAllows Function constructor
Dynamic Codeno-string-timeoutAllows setTimeout/setInterval with string args
Dynamic Codeno-javascript-blobAllows JavaScript Blob creation
Obfuscationno-obfuscationAllows obfuscated code patterns
Networkno-network-without-permissionAllows fetch, WebSocket, etc.
Networkno-unauthorized-domainAllows connections outside allowedDomains
Networkno-rtc-connectionAllows WebRTC peer connections
Networkno-external-importAllows external JS module imports
Storageno-storage-accessAllows localStorage/sessionStorage
Storageno-cookie-accessAllows cookie read/write
Storageno-indexeddb-accessAllows IndexedDB access
Storageno-storage-eventAllows storage event listening
DOMno-dangerous-domAllows innerHTML and script injection
Browser APIno-navigator-accessAllows geolocation, camera, mic, clipboard
Globalno-sensitive-api-overrideAllows overriding fetch, etc.
Globalno-global-overrideAllows overriding window, document
Globalno-prototype-pollutionAllows prototype modification

Command Reference

# Development
npm run dev        # Start dev server (http://localhost:5173)
npm run build      # Production build
npm run typecheck  # Type checking

# XRift CLI
xrift login        # Authenticate
xrift create world # Create new world project
xrift upload       # Upload (auto-detect from xrift.json)
xrift whoami       # Check logged-in user
xrift logout       # Log out

Development Environment

Run npm run dev to start the dev server. You can navigate and test the world in first-person view.

ActionKey
Look aroundClick to lock mouse, then move mouse
MoveW / A / S / D
Ascend / DescendE or Space / Q
InteractAim crosshair and click
Release mouse lockESC

Interactable component click behavior can also be tested in the dev environment (the center Raycaster detects the LAYERS.INTERACTABLE layer).

dev.tsx Structure

src/dev.tsx is the development-only entry point. It is not included in the production build.

Note: XRiftProvider is not needed in production (the frontend wraps it automatically).

Dependencies

Required (peerDependencies)

  • react / react-dom ^19.0.0
  • three ^0.182.0
  • @react-three/fiber ^9.3.0
  • @react-three/drei ^10.7.3
  • @react-three/rapier ^2.1.0

XRift-specific

  • @xrift/world-components - XRift hooks and components

Module Federation Shared パッケージ

ホスト(xrift.net)と shared で共有されるパッケージ。ワールドの vite.config.ts で shared に宣言すれば、ワールドチャンクにバンドルされずホストから提供される。

パッケージバージョン要件
react^19.0.0
react-dom^19.0.0
react-dom/client-
react/jsx-runtime^19.0.0
three^0.176.0
three/addons/loaders/GLTFLoader.js-
three/addons/loaders/DRACOLoader.js-
three/addons/loaders/KTX2Loader.js-
@react-three/fiber^9.0.0
@react-three/rapier^2.0.0
@react-three/drei^10.0.0
@react-three/uikit^1.0.0
@pmndrs/uikit^1.0.0
@xrift/world-components^0.1.0

three/addons の注意

  • three/addons バレルを shared にすると Lottie 由来の eval がバンドルに含まれるため、サブパス単位で shared にしている
  • ワールド側でも three/addons/loaders/DRACOLoader.js のようにサブパスで import & shared 宣言する
// vite.config.ts — shared の設定例(xrift-world-template 準拠)
federation({
  name: 'xrift_world_template',
  filename: 'remoteEntry.js',
  exposes: {
    './World': './src/index.tsx',
  },
  shared: {
    react: { singleton: true, requiredVersion: '^19.0.0' },
    'react-dom': { singleton: true, requiredVersion: '^19.0.0' },
    'react-dom/client': { singleton: true },
    'react/jsx-runtime': { singleton: true },
    three: { singleton: true, requiredVersion: '^0.176.0' },
    // three/addons はバレルではなくサブパス単位で宣言する
    'three/addons/loaders/DRACOLoader.js': { singleton: true },
    '@react-three/fiber': { singleton: true, requiredVersion: '^9.3.0' },
    '@react-three/rapier': { singleton: true, requiredVersion: '^2.1.0' },
    '@react-three/drei': { singleton: true, requiredVersion: '^10.7.3' },
    '@xrift/world-components': { singleton: true, requiredVersion: '^0.1.0' },
  },
}),

Troubleshooting

"useXRift must be used within XRiftProvider"

Cause: Not wrapped with XRiftProvider

Solution:

  • Check that src/dev.tsx uses XRiftProvider
  • When using Triplex: check .triplex/provider.tsx

Assets fail to load

Cause: Not using baseUrl, or incorrect path concatenation

Solution:

// Correct
const { baseUrl } = useXRift()
const model = useGLTF(`${baseUrl}robot.glb`)

// Wrong
const model = useGLTF('/robot.glb')
const model = useGLTF(`${baseUrl}/robot.glb`)

Physics not working

Cause: Not wrapped with Physics component, or missing RigidBody

Solution:

<Physics>
  <RigidBody type="fixed">  {/* or "dynamic" */}
    <mesh>...</mesh>
  </RigidBody>
</Physics>

Links

Example Implementations

  • GLB model: src/components/Duck/index.tsx
  • Skybox: src/components/Skybox/index.tsx
  • Animation: src/components/RotatingObject/index.tsx
  • Interaction: src/components/InteractableButton/index.tsx
  • User tracking: src/components/RemoteUserHUDs/index.tsx
  • Teleport: src/components/TeleportPortal/index.tsx
  • Main world: src/World.tsx

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.25%
按下载量换算77

Claude

28.66%
按下载量换算62

Cursor

18.5%
按下载量换算40

Gemini CLI

9.22%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills