AGENT SKILL

threejs-build-code-models

Author procedural Three.js TypeScript or JavaScript models from a text brief and optional authorized references using deterministic ordered review passes. Use when the selected art pipeline is CODE and the runtime model should be source code rather than a downloaded or generated mesh.

适用职业开发工程师
License 许可
MIT
最近更新
2026-11-13
Stars
★ 4
Forks
3

01 前言 Front Matter

name
threejs-build-code-models
engines
[ "THREEJS" ]
description
Author procedural Three.js TypeScript or JavaScript models from a text brief and optional authorized references using deterministic ordered review passes. Use when the selected art pipeline is CODE and the runtime model should be source code rather than a downloaded or generated mesh.

02 资源文件 3

03 SKILL.md 正文

Build Three.js Code Models

Engine activation

Run commands/resolve-engine.sh and commands/resolve-skill.sh threejs-build-code-models before activation, edits or tool launches. Require compatible THREEJS selection. An explicit isolated prototype uses recorded --evidence and validates each --output; CODE producer commands accept --engine-evidence FILE and explicit prototype source paths. Manifests/reports stay in the recorded task. Never switch engines or art pipelines implicitly.

When to use

  • The resolved art pipeline is CODE.
  • A web, frontend, game, or technical-3D task needs a procedural Three.js model authored in source.
  • Optional reference images are authorized for review evidence but must not become runtime dependencies.
  • Route characters, creatures, animated actors, enemies, NPCs, avatars, mounts, and other embodied subjects to threejs-build-code-characters; keep props, environments, and generic procedural models in this skill.

Workflow

  1. Read STYLE.md, resolve CODE with select-art-pipeline, and read .styles/.pipelines/code/PIPELINE.md.
  2. If STYLE.md configures external asset libraries, inspect them first with use-external-asset-library. Copy any authorized template into the repository, but keep it as reference evidence rather than a primary runtime mesh.
  3. Inspect the host's existing Three.js version and documented model interface. Do not add or install Three.js. Use the interface recorded by the code-model manifest when the host has no interface.
  4. Scaffold a manifest below .hephaera/.cache/tasks/ with the text brief, semantic parts, pivots or anchors, deterministic seed, explicit budgets, cleanup ownership, and any authorized reference-image hashes.
  5. Validate the manifest before authoring. Treat references as review inputs only.
  6. Work in order: blockout, structure, form, materials, interaction, then optimization. Query the next unlocked pass before each change.
  7. For each pass, author source, build or typecheck with the host toolchain, and capture deterministic browser evidence. Non-planar models require front, orbit-left, and orbit-right views.
  8. Record exactly one review decision: pass, revise-spec, revise-code, request-input, or stop. Keep evidence hashed and project-confined.
  9. Stop after three attempts on one pass or twelve attempts overall. After all passes, run complete validation and representative browser verification, including budgets and disposal.

Output

  • Host-native Three.js TypeScript or JavaScript source and its factory export.
  • A validated code-model manifest with semantic parts, anchors, budgets, and cleanup ownership.
  • Hashed review evidence for every ordered pass.
  • Typecheck/build and browser evidence for deterministic output, views, budgets, and disposal.

Guardrails

  • Do not download, generate, or load a mesh/model-library asset as the primary implementation.
  • Do not add Three.js to Hephaera or silently install it in a host repository.
  • Do not use a reference image without a recorded rights basis and applicable consent.
  • Do not skip or reorder passes, exceed correction limits, or fabricate evidence.
  • Do not silently switch from CODE when implementation fails.

Commands

  • ./commands/create-code-model-manifest.sh MODEL_ID --brief TEXT --prompt-override [options]
  • ./commands/validate-code-model-manifest.sh [--strict|--complete] MANIFEST.json
  • ./commands/next-code-model-pass.sh [--json] MANIFEST.json
  • ./commands/record-code-model-review.sh MANIFEST.json --pass PASS --decision DECISION --summary TEXT [--evidence VIEW=FILE ...]

04 同仓库更多 Skills

TimothyMeadows
TimothyMeadows/Hephaera

verify-web3-game-lifecycle

Verify a game's selected Web3 asset, wallet, ownership and trading lifecycle with contract properties, canonical recovery, actual target evidence and separate release readiness.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

verify-onchain-game-assets

Verify exact on-chain game collection ownership and quantities at canonical blocks, reconcile inventory events, and design honest match admission. Use for ERC721/ERC1155 inventory, reorg recovery, reservations, or transfer-during-match rules.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

plan-web3-game-assets

Define an opt-in Ethereum, Base or Immutable game-asset lifecycle, including token identity, supply, rights, custody, game eligibility and chain-specific dependencies.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

integrate-game-wallets

Integrate explicit player-wallet connection, scoped SIWE authentication, authority invalidation and reviewed target-specific handoff without application-held player keys.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

integrate-game-asset-trading

Integrate explicitly selected game asset settlement with exact unsigned intents, scoped approvals, idempotent operations and canonical receipt reconciliation. Use for NFT listing, buying, cancellation, retries or marketplace integration.

★ 4
TimothyMeadows
TimothyMeadows/Hephaera

build-evm-game-contracts

Author and verify host-owned EVM game collections and explicit mint, burn, craft or admin rules with pinned Solidity tooling. Use for contract source and deployment candidates; deployment and player signing require separate authorization.

★ 4