Agent skill

Tinyworld Mesh Terrain

by jasonkneen in jasonkneen/tiny-world-builder

A skill your agent uses when changing the Mesh Terrain sculptor — the opt-in voxel-block landscape designer that paints per-voxel materials and pull/push-sculpts flat-topped blocks, then keeps the…

AGPL-3.0Auto-check passedGame Development

Install Tinyworld Mesh Terrain

skills CLI
$ npx skills add jasonkneen/tiny-world-builder --skill tinyworld-mesh-terrain -a claude-code

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

GitHub CLI
$ gh skill install jasonkneen/tiny-world-builder tinyworld-mesh-terrain --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/jasonkneen/tiny-world-builder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/tinyworld-mesh-terrain .claude/skills/tinyworld-mesh-terrain && 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
tinyworld-mesh-terrain
GitHub stars
1.6k
Token cost
~2.7k tokens
SKILL.md length
1,338 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
AGPL-3.0

At a glance

A skill your agent uses when changing the Mesh Terrain sculptor — the opt-in voxel-block landscape designer that paints per-voxel materials and pull/push-sculpts flat-topped blocks, then keeps the…

  • Then keeps the block mesh as the rendered terrain
  • SKILL.md covers The model is per-voxel blocks…, Sculpt / paint, Apply keeps blocks — it does… and Programmatic generation (used…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Tinyworld Mesh Terrain is an agent skill from jasonkneen/tiny-world-builder. Use when changing the Mesh Terrain sculptor — the opt-in voxel-block landscape designer that paints per-voxel materials and pull/push-sculpts flat-topped blocks, then keeps the block mesh as the rendered terrain. Module engine/world/46-mesh-terrain.js.

Its SKILL.md is about 2.7k 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. The licence is AGPL-3.0.

When your agent uses it

  • Then keeps the block mesh as the rendered terrain

Example prompts

  • “/tinyworld-mesh-terrain”

What it can do on your machine

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

    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

Tinyworld Mesh Terrain loads about 2.7k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 1,338 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~2.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 jasonkneen/tiny-world-builder at commit 49e8abd, republished under its AGPL-3.0 licence (© jasonkneen). 1,338 words, ~2,662 tokens.

Download SKILL.mdSave it as .claude/skills/tinyworld-mesh-terrain/SKILL.md (or your agent's skills folder).
name
tinyworld-mesh-terrain
description
Use when changing the Mesh Terrain sculptor — the opt-in voxel-block landscape designer that paints per-voxel materials and pull/push-sculpts flat-topped blocks, then keeps the block mesh as the rendered terrain. Module engine/world/46-mesh-terrain.js.

Tiny World Mesh Terrain Sculptor

A self-contained, opt-in landscape designer in engine/world/46-mesh-terrain.js. Lay a fine voxel grid over the home board, paint per-voxel materials, and pull/push voxels up and down. The result is flat-topped voxel blocks, not a smooth/curved surface, and it stays that way — Apply keeps the block mesh as the terrain instead of baking into per-tile setCell.

The model is per-voxel blocks (not a smooth heightfield)

  • cellH: Float32Array(N*N) — the flat-top height of each voxel. There are no shared/interpolated vertices, so tops never slope into curves. Sculpting clamps cellH to [0, MAX_HEIGHT] — ground (0) is the floor, so you build up from the ground and cannot dig below it.
  • mats: Uint8Array(N*N) — per-voxel material index into MATERIALS (ids match real terrain names: grass/sand/water/stone/dirt/snow/lava).
  • N = GRID * effVpt voxels per side; effVpt is clamped so N <= MAX_N (96).
  • Render (rebuildGeometry): each voxel writes a flat top quad at its height plus vertical step-walls only on edges where a neighbour (or the board boundary) is lower. The real-material path greedily merges flat same-material top rectangles that have no exposed drop edge, then leaves exposed bevels and walls per-voxel so the chunky silhouette stays intact. Boundary walls drop to a base skirt below the lowest block. Geometry is non-indexed and writes from scalars via quad()/wv() (no per-quad array allocation). Sculpt/paint edits don't rebuild inline — they call scheduleRebuild(), which coalesces to one rebuild per animation frame (rAF); flushRebuild() forces the final frame on pointer-up and cancelScheduledRebuild() runs on teardown. This keeps a fast drag from forcing multiple full-board rewrites per frame (engine perf budget).
  • Preserved sunken board cells (water/stone) are mesh holes so the underlying board terrain shows through. Treat those holes as open/low neighbours when computing adjacent wall panels; otherwise deleting adjacent blocks leaves see-through missing side faces around the cutout.
  • Materials use the app's REAL terrain shaders. The geometry is laid out grouped by terrain (all tops, then all sides) and surfaceMesh.material is a parallel array: tops get terrainVoxelMaterials(t).base, sides get terrainRiserMaterial(t) (the soil/stone risers). Exception: stone reads as grainy NOISE rock via rockNoiseMat — a grey-tinted clone of the sand material (M.sand/texSand) — because both the masonry finish (M.stone) and the blocky stone pattern (M.rock/texStone) look like built walls, not rock. Those materials compute UVs from world position in-shader (applyWorldUVs onBeforeCompile), so the blocks pick up the same textures/shading as the rest of the world — do not hand-roll UVs. Materials are used via double-sided clones (dsClone) that copy onBeforeCompile/userData/customProgramCacheKey across (Three Material.clone drops onBeforeCompile), cached by uuid so there is no per-frame churn; clones are disposed on teardown. If M/terrainVoxelMaterials/ terrainRiserMaterial are missing, it falls back to a single vertex-coloured flatShading mesh (fixed per-voxel stride + degenerate fill for absent walls).

Sculpt / paint

  • Entry point: the Terrain toolbar flyout includes a Mesh Terrain action tool (id: mesh-terrain) that opens window.__tinyworldMeshTerrain.open(). Keep it as an action, not a paint brush.
  • Sculpt: pressure-brush controls. Hold/drag left mouse to raise and right mouse to lower under the brush; right-click context menu is suppressed on the terrain canvas while editing. The brush applies SCULPT_PRESSURE_RATE * dt * falloff(dist/brushRadius) continuously while the button is held, so a stationary press keeps raising/lowering and dragging paints height across the surface. Every voxel stays flat at its own height.
  • Paint: drag left mouse to set every voxel whose centre is within brushRadius.

Apply keeps blocks — it does NOT bake into world tiles

  • Persistence is Apply-only. Edits (sculpt drags, paint, Flatten, resolution changes) mutate in-memory state and are NOT written to storage; applyDesign() is the only writer (saveDesign()), and it also snapshots the design in memory (captureApplied() -> appliedSnap). This is what lets Cancel truly discard.
  • applyDesign() sets applied = true, snapshots + persists, hides the flat home tiles (setHomeMeshesVisible(false) toggles only m.tile, never m.object, so placed objects stay visible), and leaves the block mesh in the scene. There is no setCell bake, so there are no full GRID tiles afterward.
  • cancelEdit() reverts from the in-memory appliedSnap (recovering correctly even if the resolution changed mid-edit); if nothing was ever applied it disposes the mesh, restores the flat tiles, and clearDesign()s any draft.
  • removeDesign() deletes the block terrain, restores the flat tiles, clears appliedSnap, and clearDesign()s storage.
  • Boot restoreApplied() rebuilds an applied design and re-hides home tiles (with delayed retries + a tinyworld:world-changed listener, because world tiles can render slightly after this module boots).
Show full SKILL.md (625 more words)Show less

Programmatic generation (used by the "Realistic" landscape generator)

  • window.__tinyworldMeshTerrain.generate(sample, opts) fills the voxel grid from an external per-voxel sampler and displays it as a transient block overlay (hides the flat home tiles like an applied design, but does NOT persist unless opts.persist). sample(cellX, cellZ) gets board-cell coords in [0, gridAtEnter] and returns { material: 'grass'|'sand'|…, level: 1.. } (level → cellH = (level-1)*opts.levelStep) or { material, height } (world-Y directly). It exits the manual editor if open.
  • clearGenerated() tears the transient overlay down and restores the flat tiles (no-op if none, or if the user opened it for editing). isGenerated() reports state.
  • sampleWorld(wx, wz), sampleCell(x, z, opts), and anchorForCell(x, z, opts) expose the visible block surface for runtime grounding. anchorForCell samples the center plus optional cardinal probes (offsetX, offsetZ, radius) and returns the highest support. Consumers must fall back to LandscapeEngine/tile heights when it returns null (for example over preserved water/stone holes or outside the home board).
  • The Generate modal's Realistic landscape style routes here: applyRealisticVoxelLandscape() (in engine/world/27-landscape-engine.js) samples sampleLandscapeCell() (the same procedural height/biome the old realistic LandscapeEngine used) at voxel resolution, with levelStep = LANDSCAPE_VOXEL_LEVEL_STEP (1.12, matching the landscape-mode tile step so block tops align with the hidden tiles objects sit on). It is driven from the generate handler (module 28) and the reload path (module 29, when useLandscapeEngine && landscapeMeshStyle==='realistic'), and torn down by disposeLandscapeMesh() → clearGenerated(). Realistic keeps landscapeMeshMode = false; the world save (cells + seed + style) is the single source of truth, so reload regenerates the blocks deterministically — the overlay itself is not persisted in tinyworld:meshTerrain:*.
  • A generated overlay is editable: opening the editor on top of it lets the user tweak and Apply (which turns it into a real persisted design; generatedActive clears).

Why it is structured this way (do not regress)

  • One IIFE, no top-level names → dodges the tools/check.js cross-file duplicate-declaration guard; keep new code inside the IIFE.
  • Own localStorage keys (tinyworld:meshTerrain:v2 design, tinyworld:meshTerrain:prefs:v1 prefs). The world schema and embedded WORLD_SCHEMA are untouched, so schema parity stays green. Do not persist this feature in the world save.
  • Height consumers ask the mesh first, then fall back. Current wired consumers include object/extras placement (17-tile-renderers.js), selection/hover height (12-selection-tool.js, 18-scene-pick-xr.js), crowd/vehicle grounding (11-vehicle-crowd.js, 10-world-data.js), and Tinyverse avatar grounding (47-worlds-room.js). Keep this one-way: consumers sample the overlay; they do not mutate or bake it.
  • CSS injected from JS; guarded styles/tiny-world.css is never edited.
  • Window capture-phase pointer handling that engages only when e.target === renderer.domElement and the ray hits the surface, then stopPropagation(). Otherwise events flow through so orbit/zoom and UI clicks keep working. Handlers attach on open, detach on leave.

Known limitations / next steps

  • The block terrain is still a separately persisted overlay. Object/avatar grounding can sample it, but the world save/version schema does not yet store a mesh-terrain payload for published islands.
  • Mesh Terrain is visual/grounding data only for the economy. If a sculpted formation should become harvestable, project it to ordinary cells or object cells with explicit economy metadata; do not infer resource payouts from shader/material pixels.
  • Home-tile hiding can race world (re)renders; it re-hides on tinyworld:world-changed and via short boot timers.

QA checklist (needs a browser — npm test cannot verify rendering)

  • Open the editor: a flat grid of grass blocks covers the board; flat tiles hide.
  • Sculpt drag raises/lowers flat-topped blocks with vertical step-walls — no sloped/curved surfaces; neighbours taper with the brush.
  • Tops use the real terrain textures/shaders (grass, water flow, stone masonry, etc.); side walls use the soil/stone riser materials. If they render as flat plain colours, the real-material wiring fell through to the fallback — check M/terrainVoxelMaterials/terrainRiserMaterial are defined at open time.
  • Paint lays materials per voxel.
  • Orbit/zoom still work on empty-space drag / scroll; toolbar clicks not hijacked.
  • Apply keeps the blocks (no full tiles reappear); reload restores them.
  • Cancel reverts; Remove deletes the blocks and restores the flat tiles.

© jasonkneen, AGPL-3.0. 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 .codex/skills/tinyworld-mesh-terrain of jasonkneen/tiny-world-builder.

Open the folder on GitHubat commit 49e8abd

Compare with similar skills

Tinyworld Mesh Terrain 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.

Tinyworld Mesh Terrain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tinyworld Mesh Terrain this skilljasonkneen/tiny-world-builder1.6k—~2.7kAutomated safety check: PassAGPL-3.0
Code-Drawn 2D Game Art0x0funky/agent-sprite-forge4.4k—~2.5kAutomated safety check: PassMIT
Sprite Genaldegad/sprite-gen2.7k—~4.9kAutomated safety check: PassApache-2.0
Motion Webfeitangyuan/motion-web696—~18kAutomated safety check: PassCC-BY-NC-4.0
Hatch PethAcKlyc/MyAgents9191 repos~9.5kAutomated safety check: PassApache-2.0
2D Sprite Generator0x0funky/agent-sprite-forge4.4k—~3.6kAutomated safety check: PassMIT

Similar skills

  • Code-Drawn 2D Game Art

    0x0funky/agent-sprite-forge

    Draws 2D game art from code with no image model: pixel sprites, SVG props and icons, rigged characters, FX, autotiles and layouts, only when explicitly asked for.

    4.4k GitHub stars~2.5k tokensUpdated 4 days ago
    Game DevelopmentAuto-check passed
  • Sprite Gen

    aldegad/sprite-gen

    Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation.

    2.7k GitHub stars~4.9k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Motion Web

    feitangyuan/motion-web

    Design and build motion-first creative websites — page design (structure, type scale, palette, spacing) plus interaction choreography: scroll animation, Framer Motion, GSAP, and light 3D via…

    696 GitHub stars~18k tokensUpdated 25 days ago
    Game DevelopmentAuto-check passed
  • Hatch Pet

    hAcKlyc/MyAgents

    Create, repair, validate, visually QA, and package MyAgents/Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual…

    919 GitHub starsUsed in 1 repo~9.5k tokens
    Game DevelopmentAuto-check passed
  • 2D Sprite Generator

    0x0funky/agent-sprite-forge

    Produces game-ready 2D characters, creatures, props, icons and effects as master stills, sheets or clips, and exports frames for common game engines.

    4.4k GitHub stars~3.6k tokensUpdated 4 days ago
    Game DevelopmentAuto-check passed
  • Generate and edit 2D image assets for Three.js games with Google's Gemini image API: concept sheets, image-to-3D inputs, texture and material references, sky and background plates, decals, logos…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed

More from jasonkneen/tiny-world-builder

All 29 skills in this repo
  • Lightweight 3D Effects

    jasonkneen/tiny-world-builder

    Lightweight 3D effects for decorative elements and micro-interactions using Zdog, Vanta.js, and Vanilla-Tilt.js.

    1.6k GitHub starsUsed in 1 repo~5.7k tokens
    Auto-check passed
  • Threejs Primitive Reconstructor

    jasonkneen/tiny-world-builder

    create robust, browser-runnable three.js primitive reconstructions from static low-poly, voxel, isometric, or stylized game-art reference images.

    1.6k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Poly Pizza API

    jasonkneen/tiny-world-builder

    A skill your agent uses whenever an LLM agent needs to search, browse, or download 3D models from Poly Pizza (poly.pizza) using their REST API.

    1.6k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Tinyworld Block Button Style

    jasonkneen/tiny-world-builder

    A skill your agent uses when styling any tool/block button, palette tile, icon chip, or new clickable square in Tiny World Builder.

    1.6k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Tinyworld Ghost World Gen

    jasonkneen/tiny-world-builder

    A skill your agent uses when changing ghost board generation, path / road / river continuity, deterministic regen, edge connections, or anything that runs inside makeGhostWorld in…

    1.6k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Tinyworld Island And Planes

    jasonkneen/tiny-world-builder

    A skill your agent uses when changing the home island layout, edge dressing, undersides, autoincentive sponsor banner (now a top-left logo-adjacent DOM banner), plane/crop-duster flight paths…

    1.6k GitHub stars~4.7k tokensUpdated today
    Auto-check passed

Questions about Tinyworld Mesh Terrain

What does Tinyworld Mesh Terrain do?

A skill your agent uses when changing the Mesh Terrain sculptor — the opt-in voxel-block landscape designer that paints per-voxel materials and pull/push-sculpts flat-topped blocks, then keeps the…. Tinyworld Mesh Terrain is an agent skill from jasonkneen/tiny-world-builder. Use when changing the Mesh Terrain sculptor — the opt-in voxel-block landscape designer that paints per-voxel materials and pull/push-sculpts flat-topped blocks, then keeps the block mesh as the rendered terrain.

When should I use Tinyworld Mesh Terrain?

Tinyworld Mesh Terrain fits situations like: then keeps the block mesh as the rendered terrain.

How do I install Tinyworld Mesh Terrain in Claude Code?

Run `npx skills add jasonkneen/tiny-world-builder --skill tinyworld-mesh-terrain -a claude-code`. Or copy the skill folder (.codex/skills/tinyworld-mesh-terrain in jasonkneen/tiny-world-builder) into .claude/skills/tinyworld-mesh-terrain in your project. Claude Code loads it when a task matches its description.

How do I install Tinyworld Mesh Terrain in Codex?

Run `npx skills add jasonkneen/tiny-world-builder --skill tinyworld-mesh-terrain -a codex`. Or copy the skill folder (.codex/skills/tinyworld-mesh-terrain in jasonkneen/tiny-world-builder) into .agents/skills/tinyworld-mesh-terrain in your project. Codex loads it when a task matches its description.

Can I use Tinyworld Mesh Terrain 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 jasonkneen/tiny-world-builder --skill tinyworld-mesh-terrain -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tinyworld-mesh-terrain, .gemini/skills/tinyworld-mesh-terrain, .github/skills/tinyworld-mesh-terrain and .opencode/skills/tinyworld-mesh-terrain in your project.

What does Tinyworld Mesh Terrain need to run?

SKILL.md names no scripts, command-line tools or credentials: Tinyworld Mesh Terrain is instructions for the agent only.

Does Tinyworld Mesh Terrain 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 Tinyworld Mesh Terrain 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 Tinyworld Mesh Terrain use?

Tinyworld Mesh Terrain is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tinyworld Mesh Terrain use?

About 2.7k tokens (SKILL.md is roughly 11k 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 Tinyworld Mesh Terrain?

Skills that share tags, products or a category with Tinyworld Mesh Terrain: Code-Drawn 2D Game Art (0x0funky/agent-sprite-forge, 4.4k stars), Sprite Gen (aldegad/sprite-gen, 2.7k stars), Motion Web (feitangyuan/motion-web, 696 stars) and Hatch Pet (hAcKlyc/MyAgents, 919 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tinyworld Mesh Terrain?

jasonkneen (a GitHub user) maintains it in jasonkneen/tiny-world-builder, which has 1,592 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 10, 2026.

Source: jasonkneen/tiny-world-builder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.