Agent skill

Unity Terrain

by Besty0728 in Besty0728/Unity-Skills

“Operate on Unity Terrain”

— description from SKILL.md by Besty0728
MITAuto-check passedGame Development

Install Unity Terrain

skills CLI
$ npx skills add Besty0728/Unity-Skills --skill unity-terrain -a claude-code

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

GitHub CLI
$ gh skill install Besty0728/Unity-Skills unity-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/Besty0728/Unity-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'SkillsForUnity/unity-skills~/skills/terrain' .claude/skills/unity-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
unity-terrain
GitHub stars
1.8k
Token cost
~3.3k tokens
SKILL.md length
938 words
Files
1
Skills in repo
82
Repo updated
First seen
Licence
MIT

At a glance

  • SKILL.md covers Triggers, Guardrails, Skills Overview and Skills, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

About this skill

Unity Terrain is a skill in Besty0728/Unity-Skills (1.8k stars). Its SKILL.md is about 3.3k tokens. Licence: MIT.

What it can do on your machine

Read from SKILL.md and the folder at commit ec8aa7c. 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 (its code samples are python).

    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

Unity Terrain loads about 3.3k tokens when it runs. Until then it costs about 10 tokens; SKILL.md has 938 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~10
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

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 Besty0728/Unity-Skills at commit ec8aa7c, republished under its MIT licence (© Besty0728). 938 words, ~3,299 tokens.

Download SKILL.mdSave it as .claude/skills/unity-terrain/SKILL.md (or your agent's skills folder).
name
unity-terrain
description
Operate on Unity Terrain

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Creating or editing terrain
  • Sculpting or smoothing heightmap
  • Painting terrain texture layers
  • 创建或编辑地形、雕刻或平滑高度图、绘制地形纹理层

Unity Terrain Skills

Guardrails

Operating Mode (v1.9 three-tier):

  • Approval (default): query skills (terrain_get_info, terrain_get_height) run directly. Create/modify skills (terrain_create, terrain_set_height, terrain_set_heights_batch, terrain_add_hill, terrain_generate_perlin, terrain_smooth, terrain_flatten, terrain_paint_texture) are FullAuto — on MODE_RESTRICTED, run the grant protocol; /permission/grant executes the skill server-side and returns the result.
  • Auto / Bypass: SemiAuto and FullAuto run directly.
  • This module contains no Delete / PlayMode / Reload / RiskLevel="high" skills — nothing auto-classifies as forbidden. To remove a terrain delete the asset via asset_delete (subject to its own forbidden rules).

Note: All sculpt/paint operations require an existing Terrain in the scene, or use terrain_create to generate one.

DO NOT (common hallucinations):

  • terrain_set_texture does not exist → use terrain_paint_texture with layer index and brush parameters
  • terrain_add_tree / terrain_add_grass do not exist → these require Unity Terrain tools or custom scripts
  • terrain_set_size does not exist → terrain dimensions are set at creation via terrain_create
  • terrain_import_heightmap / terrain_set_heights do not exist → use terrain_set_heights_batch with a 2D heights array ([z][x] values 0-1)

Routing:

  • For terrain material → use material module on terrain's material
  • For objects on terrain → use gameobject module to create/place objects

Skills Overview

SkillDescription
terrain_createCreate new Terrain with TerrainData
terrain_get_infoGet terrain size, resolution, layers
terrain_get_heightGet height at world position
terrain_set_heightSet height at normalized coords
terrain_set_heights_batchBatch set heights in region
terrain_add_hill⭐ Add smooth hill with radius and falloff
terrain_generate_perlin⭐ Generate natural terrain using Perlin noise
terrain_smooth⭐ Smooth terrain to reduce sharp edges
terrain_flatten⭐ Flatten terrain to target height
terrain_paint_texturePaint texture layer at position

Skills

terrain_create

Create a new Terrain GameObject with TerrainData asset.

ParameterTypeRequiredDefaultDescription
namestringNo"Terrain"Terrain name
widthintNo500Terrain width (X)
lengthintNo500Terrain length (Z)
heightintNo100Max terrain height (Y)
heightmapResolutionintNo513Heightmap resolution (power of 2 + 1)
x, y, zfloatNo0Position

Returns: {success, name, instanceId, terrainDataPath, size, position}

terrain_get_info

Get terrain information.

ParameterTypeRequiredDescription
namestringNo*Terrain name
instanceIdintNo*Instance ID

*If neither provided, uses first terrain in scene

Returns: {success, name, instanceId, position, size, heightmapResolution, alphamapResolution, detailResolution, terrainLayerCount, layers}

terrain_get_height

Get terrain height at world position.

ParameterTypeRequiredDescription
worldXfloatYesWorld X coordinate
worldZfloatYesWorld Z coordinate
namestringNoTerrain name

Returns: {success, worldX, worldZ, height, worldY}

terrain_set_height

Set height at normalized coordinates.

ParameterTypeRequiredDescription
normalizedXfloatYesX position (0-1)
normalizedZfloatYesZ position (0-1)
heightfloatYesHeight value (0-1)
namestringNoTerrain name
instanceIdintNoTerrain instance ID

Returns: {success, normalizedX, normalizedZ, height, pixelX, pixelZ}

terrain_set_heights_batch

⚠️ BATCH SKILL: Set heights in rectangular region.

ParameterTypeRequiredDescription
startXintYesStart X pixel index
startZintYesStart Z pixel index
heightsfloat[][]Yes2D array [z][x] with values 0-1
namestringNoTerrain name
instanceIdintNoTerrain instance ID

Returns: {success, startX, startZ, modifiedWidth, modifiedLength, totalPointsModified}

python
# Example: Create a 10x10 hill
heights = [[0.5 - abs(x-5)/10 - abs(z-5)/10 for x in range(10)] for z in range(10)]
call_skill("terrain_set_heights_batch", startX=50, startZ=50, heights=heights)
Show full SKILL.md (398 more words)Show less
terrain_add_hill

⭐ RECOMMENDED: Add a smooth, natural-looking hill to the terrain.

ParameterTypeRequiredDefaultDescription
normalizedXfloatYes-X position (0-1)
normalizedZfloatYes-Z position (0-1)
radiusfloatNo0.2Hill radius (0-1, relative to terrain size)
heightfloatNo0.5Hill height (0-1)
smoothnessfloatNo1.0Smoothness factor (higher = smoother)
namestringNonullTerrain name
instanceIdintNo0Terrain instance ID

Returns: {success, centerX, centerZ, radius, height, affectedArea}

python
# Add a large smooth hill at center
call_skill("terrain_add_hill",
    normalizedX=0.5, normalizedZ=0.5,
    radius=0.3, height=0.6, smoothness=2.0)

# Add multiple hills for varied terrain
for i in range(5):
    call_skill("terrain_add_hill",
        normalizedX=random.uniform(0.2, 0.8),
        normalizedZ=random.uniform(0.2, 0.8),
        radius=random.uniform(0.1, 0.25),
        height=random.uniform(0.3, 0.7))
terrain_generate_perlin

⭐ RECOMMENDED: Generate natural-looking terrain using Perlin noise algorithm.

ParameterTypeRequiredDefaultDescription
scalefloatNo20.0Noise scale (lower = larger features)
heightMultiplierfloatNo0.3Height intensity (0-1)
octavesintNo4Detail layers (more = more detail)
persistencefloatNo0.5Amplitude decrease per octave
lacunarityfloatNo2.0Frequency increase per octave
seedintNo0Random seed (0 = random)
namestringNonullTerrain name

Returns: {success, resolution, scale, heightMultiplier, octaves, persistence, lacunarity, seed}

python
# Generate rolling hills
call_skill("terrain_generate_perlin",
    scale=25.0, heightMultiplier=0.4, octaves=4)

# Generate mountainous terrain
call_skill("terrain_generate_perlin",
    scale=15.0, heightMultiplier=0.6, octaves=6, persistence=0.6)

# Generate with specific seed for reproducibility
call_skill("terrain_generate_perlin",
    scale=20.0, heightMultiplier=0.5, seed=12345)
terrain_smooth

⭐ Smooth terrain heights to reduce sharp edges and create natural transitions.

ParameterTypeRequiredDefaultDescription
normalizedXfloatYes-X position (0-1)
normalizedZfloatYes-Z position (0-1)
radiusfloatNo0.1Smoothing radius (0-1)
iterationsintNo1Number of smoothing passes
namestringNonullTerrain name
instanceIdintNo0Terrain instance ID

Returns: {success, centerX, centerZ, radius, iterations, affectedArea}

python
# Smooth a specific area
call_skill("terrain_smooth",
    normalizedX=0.5, normalizedZ=0.5,
    radius=0.2, iterations=3)
terrain_flatten

⭐ Flatten terrain to a specific height in a region.

ParameterTypeRequiredDefaultDescription
normalizedXfloatYes-X position (0-1)
normalizedZfloatYes-Z position (0-1)
targetHeightfloatNo0.5Target height (0-1)
radiusfloatNo0.1Flatten radius (0-1)
strengthfloatNo1.0Flatten strength (0-1)
namestringNonullTerrain name
instanceIdintNo0Terrain instance ID

Returns: {success, centerX, centerZ, targetHeight, radius, strength}

python
# Create a flat plateau
call_skill("terrain_flatten",
    normalizedX=0.5, normalizedZ=0.5,
    targetHeight=0.6, radius=0.15, strength=1.0)
terrain_paint_texture

Paint terrain texture layer. Requires terrain layers already configured.

ParameterTypeRequiredDefaultDescription
normalizedXfloatYes-X position (0-1)
normalizedZfloatYes-Z position (0-1)
layerIndexintYes-Terrain layer index (0-based; use terrain_get_info to query available layers). Out of range, including negative, is rejected before anything is painted
strengthfloatNo1.0Paint strength
brushSizeintNo10Brush size in pixels
namestringNonullTerrain name
instanceIdintNo0Terrain instance ID

Returns: {success, layerIndex, layerName, centerX, centerZ, brushSize, strength}


Example Usage

python
import unity_skills

# === Method 1: Quick terrain with Perlin noise (RECOMMENDED) ===
# Create terrain
result = unity_skills.call_skill("terrain_create",
    name="MyTerrain", width=200, length=200, height=50)

# Generate natural terrain with Perlin noise
unity_skills.call_skill("terrain_generate_perlin",
    scale=20.0,           # Larger scale = bigger features
    heightMultiplier=0.4, # Height intensity
    octaves=5,            # More octaves = more detail
    persistence=0.5,
    lacunarity=2.0)

# === Method 2: Add individual smooth hills ===
# Create flat terrain
result = unity_skills.call_skill("terrain_create",
    name="HillyTerrain", width=200, length=200, height=50)

# Add multiple smooth hills
import random
for i in range(8):
    unity_skills.call_skill("terrain_add_hill",
        normalizedX=random.uniform(0.2, 0.8),
        normalizedZ=random.uniform(0.2, 0.8),
        radius=random.uniform(0.15, 0.3),
        height=random.uniform(0.3, 0.6),
        smoothness=1.5)  # Higher = smoother

# Smooth the entire terrain for natural transitions
unity_skills.call_skill("terrain_smooth",
    normalizedX=0.5, normalizedZ=0.5,
    radius=0.5, iterations=2)

# === Method 3: Create specific features ===
# Create a mountain
unity_skills.call_skill("terrain_add_hill",
    normalizedX=0.5, normalizedZ=0.5,
    radius=0.25, height=0.8, smoothness=2.0)

# Create a flat plateau on top
unity_skills.call_skill("terrain_flatten",
    normalizedX=0.5, normalizedZ=0.5,
    targetHeight=0.8, radius=0.1, strength=1.0)

# === Method 4: Manual height control (advanced) ===
import math
heights = []
for z in range(64):
    row = []
    for x in range(64):
        # Distance from center
        dx = (x - 32) / 32
        dz = (z - 32) / 32
        dist = math.sqrt(dx*dx + dz*dz)
        # Smooth hill with cosine falloff
        h = max(0, 0.5 * math.cos(dist * math.pi / 2)) if dist < 1 else 0
        row.append(h)
    heights.append(row)

unity_skills.call_skill("terrain_set_heights_batch",
    startX=100, startZ=100, heights=heights)

# Query height at world position
info = unity_skills.call_skill("terrain_get_height", worldX=100, worldZ=100)
print(f"Height at position: {info['height']}")

Workflow Integration

All terrain operations support workflow undo/redo:

python
# Start workflow session
unity_skills.call_skill("workflow_session_start", tag="Create Terrain")

# Create and modify terrain
unity_skills.call_skill("terrain_create", name="TestTerrain")
unity_skills.call_skill("terrain_generate_perlin", scale=20, heightMultiplier=0.5)
unity_skills.call_skill("terrain_add_hill", normalizedX=0.3, normalizedZ=0.3, radius=0.2)

# End session
unity_skills.call_skill("workflow_session_end")

# Later: Undo entire terrain creation
sessions = unity_skills.call_skill("workflow_session_list")
unity_skills.call_skill("workflow_session_undo", sessionId=sessions['sessions'][0]['sessionId'])

Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

© Besty0728, MIT. 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 SkillsForUnity/unity-skills~/skills/terrain of Besty0728/Unity-Skills.

Open the folder on GitHubat commit ec8aa7c

Compare with similar skills

Unity 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.

Unity Terrain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unity Terrain this skillBesty0728/Unity-Skills1.8k—~3.3kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k2 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.4k—~2.2kAutomated safety check: PassMIT
Game Asset Generatorhtdt/godogen7.1k—~2.8kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 2 repos~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.4k GitHub stars~2.2k tokensUpdated 10 days ago
    Game DevelopmentAuto-check passed
  • Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.

    7.1k GitHub stars~2.8k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Uloop Execute Dynamic Code

    CyberAgentGameEntertainment/NovaShader

    Execute C with Unity APIs when existing uloop tools cannot inspect or edit enough.

    1.6k GitHub starsUsed in 1 repo~1.9k tokens
    Game DevelopmentAuto-check passed

More from Besty0728/Unity-Skills

All 82 skills in this repo
  • Unity Skills

    Besty0728/Unity-Skills

    Automate the Unity Editor through a local REST API — scripts, scenes, prefabs, assets, materials, lighting, tests and hundreds of other Editor operations.

    1.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Unity Animator

    Besty0728/Unity-Skills

    Edit Unity Animator Controllers and drive runtime parameters

    1.8k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Unity Architecture

    Besty0728/Unity-Skills

    Advise on Unity gameplay and system architecture. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Unity Batch

    Besty0728/Unity-Skills

    Unified batch and async-job orchestration. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Unity Behavior

    Besty0728/Unity-Skills

    Drive Unity Behavior behavior graphs and blackboard variables

    1.8k GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Unity Console

    Besty0728/Unity-Skills

    Capture and query the Unity Editor console. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed

Questions about Unity Terrain

How do I install Unity Terrain in Claude Code?

Run `npx skills add Besty0728/Unity-Skills --skill unity-terrain -a claude-code`. Or copy the skill folder (SkillsForUnity/unity-skills~/skills/terrain in Besty0728/Unity-Skills) into .claude/skills/unity-terrain in your project. Claude Code loads it when a task matches its description.

How do I install Unity Terrain in Codex?

Run `npx skills add Besty0728/Unity-Skills --skill unity-terrain -a codex`. Or copy the skill folder (SkillsForUnity/unity-skills~/skills/terrain in Besty0728/Unity-Skills) into .agents/skills/unity-terrain in your project. Codex loads it when a task matches its description.

Can I use Unity 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 Besty0728/Unity-Skills --skill unity-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/unity-terrain, .gemini/skills/unity-terrain, .github/skills/unity-terrain and .opencode/skills/unity-terrain in your project.

What does Unity Terrain need to run?

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

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

Unity Terrain 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 Unity Terrain use?

About 3.3k tokens (SKILL.md is roughly 13k 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 Unity Terrain?

Skills that share tags, products or a category with Unity Terrain: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.4k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unity Terrain?

Besty0728 (a GitHub user) maintains it in Besty0728/Unity-Skills, which has 1,815 GitHub stars. The repository holds 82 skills in this directory. The repository was last updated on October 7, 2026.

Source: Besty0728/Unity-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.