Agent skill

Tresjs Core Skilld

by skilld-dev in skilld-dev/vue-ecosystem-skills

Declarative Three.js using Vue components. An agent skill from skilld-dev/vue-ecosystem-skills.

MITAuto-check passedGame Development

Install Tresjs Core Skilld

skills CLI
$ npx skills add skilld-dev/vue-ecosystem-skills --skill tresjs-core-skilld -a claude-code

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

GitHub CLI
$ gh skill install skilld-dev/vue-ecosystem-skills tresjs-core-skilld --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/skilld-dev/vue-ecosystem-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tresjs-core-skilld .claude/skills/tresjs-core-skilld && 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
tresjs-core-skilld
GitHub stars
181
Token cost
~2.2k tokens
SKILL.md length
651 words
Files
7 (incl. references)
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Declarative Three.js using Vue components. An agent skill from skilld-dev/vue-ecosystem-skills.

  • Writing code that imports @tresjs/core
  • SKILL.md covers Environment limits, Setup, Core model and API changes to know, plus 3 more sections
  • Calls pnpm
  • Touches TresCanvas

What it does

Tresjs Core Skilld is an agent skill from skilld-dev/vue-ecosystem-skills. Declarative Three.js using Vue components. ALWAYS use when writing code that imports "@tresjs/core" or touches TresCanvas, Tres components, useLoop, useLoader, useTres, useTresContext, TresPortal, pointer events, render modes, or TresJS debugging, upgrades, and performance work.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/components.md`, `references/composables.md` and `references/migration-v4-v5.md`).

It sits in Game Development, covering 3D graphics and WebGL. It works with Vue.js, Three.js and npm. The repository describes itself as: Agent Skills for the Vue ecosystem, written from current docs, issues, and releases. The licence is MIT.

When your agent uses it

  • Writing code that imports @tresjs/core
  • Touches TresCanvas
  • Tres components
  • TresJS debugging

Example prompts

  • “@tresjs/core”
  • “/tresjs-core-skilld”

What it can do on your machine

Read from SKILL.md and the folder at commit c8994af. 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

    Shell commands in SKILL.md call:

    • pnpm

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

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.tresjs.org
    • github.com

    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

Tresjs Core Skilld loads about 2.2k tokens when it runs, and up to ~7k if it reads all its reference files. Until then it costs about 75 tokens; SKILL.md has 651 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7k

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 skilld-dev/vue-ecosystem-skills at commit c8994af, republished under its MIT licence (© skilld-dev). 651 words, ~2,231 tokens.

Download SKILL.mdSave it as .claude/skills/tresjs-core-skilld/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
tresjs-core-skilld
description
Declarative Three.js using Vue components. ALWAYS use when writing code that imports "@tresjs/core" or touches TresCanvas, Tres components, useLoop, useLoader, useTres, useTresContext, TresPortal, pointer events, render modes, or TresJS debugging, upgrades, and performance work.

@tresjs/core 5.9.0

Vue custom renderer for Three.js: any THREE class becomes a component by prefixing Tres (<TresMesh>, <TresBoxGeometry>). Prepared source: package.json, dist/tres.d.ts (public types), dist/tres.js.

npm dist-tags at generation time: latest 5.9.0, rc 5.0.0-rc.0, next 5.0.0-next.6, beta 2.0.0-beta.13, alpha 5.0.0-alpha.2.

Environment limits

  • ESM-only since v5. No UMD, no require(). import { TresCanvas } from '@tresjs/core'.
  • Peer deps: vue >=3.4, three >=0.133 (package.json:44-46). Built against three ^0.184.
  • Time source: three Timer on r179+, falls back to Clock on older three (dist/tres.d.ts:962-970).
  • WebGPU is experimental; requires the renderer prop with a three/webgpu Renderer (see references/webgpu.md).

Setup

bash
pnpm i @tresjs/core three
pnpm i @types/three -D   # TypeScript

Vite: spread templateCompilerOptions into the Vue plugin, or Tres components warn as unknown custom elements (README.md:36-50):

ts
import { templateCompilerOptions } from '@tresjs/core'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [vue({ ...templateCompilerOptions })],
})

A separate subpath export @tresjs/core/template-compiler-options exists for hosts that only need compiler options (package.json:21-25). For Nuxt use @tresjs/nuxt instead of manual setup.

Core model

  • Component catalogue is autogenerated from the THREE namespace: Tres + capitalized class name, also available kebab-case (<tres-mesh>, supported since v5.1.0) (dist/tres.d.ts:497-509).
  • args passes constructor arguments: <TresBoxGeometry :args="[1, 2, 3]" />. Changing reactive args recreates the whole instance; use props for everything settable after construction (dist/tres.d.ts:405-411).
  • Props map to instance properties. Math types accept shorthand: :position="[1, 2, 3]", :rotation="[0, Math.PI, 0]", color="#00ff00" (dist/tres.d.ts:457-485).
  • Child material/geometry auto-attach via attach: <TresMesh><TresBoxGeometry /><TresMeshNormalMaterial /></TresMesh> works without explicit attach.
  • extend({ MyObject }) before using non-THREE classes as <TresMyObject> (dist/tres.d.ts:872-874).
  • <primitive :object="existingThreeObject" /> mounts an object you created in JS. It does not own disposal; dispose manually (see references/performance.md).

Minimal scene:

vue
<script setup lang="ts">
import { TresCanvas } from '@tresjs/core'
</script>

<template>
  <TresCanvas shadows>
    <TresPerspectiveCamera :position="[3, 3, 3]" :look-at="[0, 0, 0]" />
    <TresMesh>
      <TresBoxGeometry :args="[1, 1, 1]" />
      <TresMeshNormalMaterial />
    </TresMesh>
    <TresDirectionalLight :position="[3, 3, 3]" :intensity="1" cast-shadow />
  </TresCanvas>
</template>

Without an explicit camera, a default PerspectiveCamera is created (dist/tres.d.ts:682-685).

API changes to know

v5 breaking (migrate with references/migration-v4-v5.md):

  • useLoader returns reactive state { state, isLoading, error, progress, load }, no longer a Promise (dist/tres.d.ts:40-65).
  • Pointer events use native DOM names: @pointerdown, not @pointer-down. Only the first intersected object fires.
  • useTexture moved to @tresjs/cientos. useRenderLoop, useCamera, useSeek, useRaycaster, useTresReady, useTresEventManager, useLogger were removed. Replacements: useLoop, useTres, useGraph, @ready event.
  • useTresContext().camera is a camera manager; use useTres().camera for the active camera instance (dist/tres.d.ts:574-606).
  • WebGL context props (alpha, antialias, depth, stencil, powerPreference, logarithmicDepthBuffer, preserveDrawingBuffer, failIfMajorPerformanceCaveat) are readonly; set once at mount (dist/tres.d.ts:141-206).

Recent additions:

  • 5.9.0: TresPortal component reparents children into any Object3D/Scene target (dist/tres.d.ts:853-858), https://docs.tresjs.org/api/components/tres-portal
  • 5.9.0: isWebGPURenderer guard and reactive context.isWebGPU flag (dist/tres.d.ts:350-367, 1204-1222)
  • 5.9.0: shadowMapType defaults to PCFShadowMap on WebGL, PCFSoftShadowMap on WebGPU (dist/tres.d.ts:250-255)
  • 5.8.0: fpsLimit prop caps render FPS (dist/tres.d.ts:692-696)
  • 5.7.0: three <r179 compatibility via Timer to Clock fallback (dist/tres.d.ts:962-970)
  • 5.5.0: TresCanvasContext (the Context component) for bringing your own <canvas> (dist/tres.d.ts:680-708)
  • 5.3.0: customRendererOptions.primitivePrefix renames <primitive> (dist/tres.d.ts:622-625)
  • 5.2.0: TresCanvasProps / TresCanvasEmits types exported (dist/tres.d.ts:776-781)
  • Full history: https://github.com/Tresjs/tres/blob/main/packages/core/CHANGELOG.md
Show full SKILL.md (245 more words)Show less

Common tasks

Animate with frame-rate independence (delta in seconds):

vue
<script setup lang="ts">
import { useLoop } from '@tresjs/core'
const { onBeforeRender } = useLoop()
const cube = shallowRef<TresInstance | null>(null)

onBeforeRender(({ delta, elapsed }) => {
  if (!cube.value) return
  cube.value.rotation.y += delta * 2        // 2 rad/s on any refresh rate
  cube.value.position.y = Math.sin(elapsed * 3) * 0.5
})
</script>

<template>
  <TresMesh ref="cube">
    <TresBoxGeometry :args="[1, 1, 1]" />
    <TresMeshNormalMaterial />
  </TresMesh>
</template>

useLoop only works inside child components of TresCanvas; on the canvas itself use @before-loop / @loop events (https://docs.tresjs.org/api/composables/use-loop).

Load a model:

ts
import { useLoader } from '@tresjs/core'
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'

const { state: model, isLoading, error, progress } = useLoader(
  GLTFLoader,
  '/models/duck.gltf',            // MaybeRef<string>: changing the ref reloads
  { extensions: (loader) => loader.setDRACOLoader(dracoLoader) },
)
// template: <primitive v-if="!isLoading && model?.scene" :object="model.scene" />

Click a mesh:

vue
<TresMesh @click="(e) => e.object.material.color.set('#ff0000')">
  <TresBoxGeometry />
  <TresMeshNormalMaterial />
</TresMesh>

Event payloads carry point, object, distance, face, uv, xy. @pointermissed on TresCanvas catches clicks on empty space. Details: references/pointer-events.md.

Best practices

  • Use shallowRef for template refs to Three.js instances and for any object passed to <primitive>; deep ref proxies cost real frame time. https://docs.tresjs.org/api/advanced/performance
  • Prefer renderMode="on-demand" plus invalidate() for non-game scenes; renderMode="manual" plus advance() for full control (dist/tres.d.ts:134-139).
  • In on-demand mode, call invalidate() after mutating objects through refs, since those mutations bypass Vue reactivity.
  • Take over rendering with useLoop().render(fn) only for post-processing or multi-pass; the fn must call notifySuccess() or render modes break (https://docs.tresjs.org/api/composables/use-loop).
  • Register ordered updates via the priority argument of onBeforeRender/onRender (default 0, higher runs later).
  • useGraph(object) gives named nodes, materials, meshes maps for loaded GLTF scenes instead of manual traversal (dist/tres.d.ts:565).
  • Call dispose() (exported from @tresjs/core) on programmatically created objects used via <primitive>; template-created objects are disposed automatically.
  • Keep args static unless you intend instance recreation; animate via props or refs instead.
  • Debug with v-log / v-log:material, v-light-helper, v-distance-to directives (dist/tres.d.ts:934-952), https://docs.tresjs.org/api/utils/directives

References

Official docs: https://docs.tresjs.org

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

Files

SKILL.md and 6 other files (references) in skills/tresjs-core-skilld of skilld-dev/vue-ecosystem-skills.

  • SKILL.md
  • references/components.md
  • references/composables.md
  • references/migration-v4-v5.md
  • references/performance.md
  • references/pointer-events.md
  • references/webgpu.md

Open the folder on GitHubat commit c8994af

Compare with similar skills

Tresjs Core Skilld 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.

Tresjs Core Skilld compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tresjs Core Skilld this skillskilld-dev/vue-ecosystem-skills181—~2.2kAutomated safety check: PassMIT
Inspira UIsecondsky/claude-skills227—~2.6kAutomated safety check: PassMIT
Web CloneJane-xiaoer/claude-skill-web-clone1k1 repos~2.7kAutomated safety check: PassMIT
New ExperimentTresjs/tres3.8k—~782Automated safety check: PassMIT
Vitexecpmndrs/viverse132—~2.5kAutomated safety check: PassCustom licence
Polycsslayoutit/polycss757—~2.4kAutomated safety check: PassMIT

Similar skills

  • Inspira UI

    secondsky/claude-skills

    120+ Vue/Nuxt animated components with TailwindCSS v4, motion-v, GSAP, Three.js.

    227 GitHub stars~2.6k tokensUpdated 9 days ago
    Frontend & DesignAuto-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
  • New Experiment

    Tresjs/tres

    Create a new experiment in TresJS Lab with all necessary files

    3.8k GitHub stars~782 tokensUpdated today
    Game DevelopmentAuto-check passed
  • Vitexec

    pmndrs/viverse

    A skill your agent uses when an AI agent needs to inspect, verify, debug, or profile a live Vite app by running temporary snippets inside the browser page and reading browser logs or captured…

    132 GitHub stars~2.5k tokensUpdated 5 days ago
    Game DevelopmentAuto-check passed
  • Polycss

    layoutit/polycss

    Build PolyCSS scenes that render 3D meshes, primitive shapes, or custom polygons as DOM/CSS polygon elements.

    757 GitHub stars~2.4k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Deploy

    cyanfish-x/tellux

    Deploy tellux examples/docs sites via project scripts — one local command (pnpm run deploy) rclone-syncs to the self-hosted site then Wrangler Direct Uploads to Cloudflare Pages.

    207 GitHub stars~1.1k tokensUpdated 16 days ago
    Game DevelopmentAuto-check: notes

More from skilld-dev/vue-ecosystem-skills

All 34 skills in this repo
  • Floating UI Vue Skilld

    skilld-dev/vue-ecosystem-skills

    Floating UI for Vue (@floating-ui/vue@2.0.1). An agent skill from skilld-dev/vue-ecosystem-skills.

    181 GitHub stars~1.3k tokensUpdated 15 days ago
    Auto-check passed
  • Formkit Core Skilld

    skilld-dev/vue-ecosystem-skills

    A skill your agent uses whenever writing, debugging, or reviewing code that imports @formkit/core — FormKit's framework-agnostic core (node trees, values, events, hooks, message stores, ledgers…

    181 GitHub stars~2.1k tokensUpdated 15 days ago
    Auto-check passed
  • Pinia Colada Skilld

    skilld-dev/vue-ecosystem-skills

    Data fetching layer for Vue built on Pinia. An agent skill from skilld-dev/vue-ecosystem-skills.

    181 GitHub stars~1.9k tokensUpdated 15 days ago
    Auto-check passed
  • Pinia Skilld

    skilld-dev/vue-ecosystem-skills

    A skill your agent uses when writing, debugging, or refactoring code that imports "pinia", the Vue 3 store library.

    181 GitHub stars~1.5k tokensUpdated 15 days ago
    Auto-check passed
  • Primevue Skilld

    skilld-dev/vue-ecosystem-skills

    A skill your agent uses when writing, debugging, or updating code that imports primevue (PrimeVue v5, UI component library for Vue 3).

    181 GitHub stars~1.9k tokensUpdated 15 days ago
    Auto-check passed
  • Quasar Skilld

    skilld-dev/vue-ecosystem-skills

    Build, configure, and debug apps with the Quasar framework (quasar npm package, v2.33.1).

    181 GitHub stars~1.6k tokensUpdated 15 days ago
    Auto-check passed

Questions about Tresjs Core Skilld

What does Tresjs Core Skilld do?

Declarative Three.js using Vue components. An agent skill from skilld-dev/vue-ecosystem-skills. Tresjs Core Skilld is an agent skill from skilld-dev/vue-ecosystem-skills.js using Vue components.

When should I use Tresjs Core Skilld?

Tresjs Core Skilld fits situations like: writing code that imports @tresjs/core; touches TresCanvas; tres components; tresJS debugging.

How do I install Tresjs Core Skilld in Claude Code?

Run `npx skills add skilld-dev/vue-ecosystem-skills --skill tresjs-core-skilld -a claude-code`. Or copy the skill folder (skills/tresjs-core-skilld in skilld-dev/vue-ecosystem-skills) into .claude/skills/tresjs-core-skilld in your project. Claude Code loads it when a task matches its description.

How do I install Tresjs Core Skilld in Codex?

Run `npx skills add skilld-dev/vue-ecosystem-skills --skill tresjs-core-skilld -a codex`. Or copy the skill folder (skills/tresjs-core-skilld in skilld-dev/vue-ecosystem-skills) into .agents/skills/tresjs-core-skilld in your project. Codex loads it when a task matches its description.

Can I use Tresjs Core Skilld 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 skilld-dev/vue-ecosystem-skills --skill tresjs-core-skilld -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tresjs-core-skilld, .gemini/skills/tresjs-core-skilld, .github/skills/tresjs-core-skilld and .opencode/skills/tresjs-core-skilld in your project.

What does Tresjs Core Skilld need to run?

Going by SKILL.md and its folder, Tresjs Core Skilld needs the command-line tools its instructions call (pnpm).

Does Tresjs Core Skilld access the network?

SKILL.md names 2 domains. As links in the text: docs.tresjs.org and github.com. This is read from the text; nothing was executed.

Is Tresjs Core Skilld 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 Tresjs Core Skilld use?

Tresjs Core Skilld 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 Tresjs Core Skilld use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.7k tokens, read only when the agent opens those files.

What are the alternatives to Tresjs Core Skilld?

Skills that share tags, products or a category with Tresjs Core Skilld: Inspira UI (secondsky/claude-skills, 227 stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), New Experiment (Tresjs/tres, 3.8k stars) and Vitexec (pmndrs/viverse, 132 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tresjs Core Skilld?

skilld-dev (a GitHub organization) maintains it in skilld-dev/vue-ecosystem-skills, which has 181 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on September 22, 2026.

Source: skilld-dev/vue-ecosystem-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.