ndai0454-gif/game_thanhgiong/terrain
Claude Code and agent skill by ndai0454-gif/game_thanhgiong
- community
Checking that the SKILL.md file is still in the repository.
Operate on Unity Terrain
Install
npx vskill@latest install ndai0454-gif/game_thanhgiong/terrainSKILL.md
The same SKILL.md was published earlier as besty0728/unity-skills/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 viaGET /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 — onMODE_RESTRICTED, run the grant protocol;/permission/grantexecutes 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 viaasset_delete(subject to its own forbidden rules).
Note: All sculpt/paint operations require an existing Terrain in the scene, or useterrain_createto generate one.
DO NOT (common hallucinations):
terrain_set_texturedoes not exist → useterrain_paint_texturewith layer index and brush parametersterrain_add_tree/terrain_add_grassdo not exist → these require Unity Terrain tools or custom scriptsterrain_set_sizedoes not exist → terrain dimensions are set at creation viaterrain_createterrain_import_heightmap/terrain_set_heightsdo not exist → useterrain_set_heights_batchwith a 2D heights array ([z][x]values 0-1)
Routing:
- For terrain material → use
materialmodule on terrain's material - For objects on terrain → use
gameobjectmodule to create/place objects
Skills Overview
| Skill | Description | |
|---|---|---|
terrain_create | Create new Terrain with TerrainData | |
terrain_get_info | Get terrain size, resolution, layers | |
terrain_get_height | Get height at world position | |
terrain_set_height | Set height at normalized coords | |
terrain_set_heights_batch | Batch 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_texture | Paint texture layer at position |
Skills
terrain_create
Create a new Terrain GameObject with TerrainData asset.
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
name | string | No | "Terrain" | Terrain name | |
width | int | No | 500 | Terrain width (X) | |
length | int | No | 500 | Terrain length (Z) | |
height | int | No | 100 | Max terrain height (Y) | |
heightmapResolution | int | No | 513 | Heightmap resolution (power of 2 + 1) | |
x, y, z | float | No | 0 | Position |
Returns: {success, name, instanceId, terrainDataPath, size, position}
terrain_get_info
Get terrain information.
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
name | string | No* | Terrain name | |
instanceId | int | No* | 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.
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
worldX | float | Yes | World X coordinate | |
worldZ | float | Yes | World Z coordinate | |
name | string | No | Terrain name |
Returns: {success, worldX, worldZ, height, worldY}
terrain_set_height
Set height at normalized coordinates.
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
normalizedX | float | Yes | X position (0-1) | |
normalizedZ | float | Yes | Z position (0-1) | |
height | float | Yes | Height value (0-1) | |
name | string | No | Terrain name | |
instanceId | int | No | Terrain instance ID |
Returns: {success, normalizedX, normalizedZ, height, pixelX, pixelZ}
terrain_set_heights_batch
⚠️ BATCH SKILL: Set heights in rectangular region.
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
startX | int | Yes | Start X pixel index | |
startZ | int | Yes | Start Z pixel index | |
heights | float[][] | Yes | 2D array [z][x] with values 0-1 | |
name | string | No | Terrain name | |
instanceId | int | No | Terrain instance ID |
Returns: {success, startX, startZ, modifiedWidth, modifiedLength, totalPointsModified}
terrain_add_hill
⭐ RECOMMENDED: Add a smooth, natural-looking hill to the terrain.
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
normalizedX | float | Yes | - | X position (0-1) | |
normalizedZ | float | Yes | - | Z position (0-1) | |
radius | float | No | 0.2 | Hill radius (0-1, relative to terrain size) | |
height | float | No | 0.5 | Hill height (0-1) | |
smoothness | float | No | 1.0 | Smoothness factor (higher = smoother) | |
name | string | No | null | Terrain name | |
instanceId | int | No | 0 | Terrain instance ID |
Returns: {success, centerX, centerZ, radius, height, affectedArea}
terrain_generate_perlin
⭐ RECOMMENDED: Generate natural-looking terrain using Perlin noise algorithm.
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
scale | float | No | 20.0 | Noise scale (lower = larger features) | |
heightMultiplier | float | No | 0.3 | Height intensity (0-1) | |
octaves | int | No | 4 | Detail layers (more = more detail) | |
persistence | float | No | 0.5 | Amplitude decrease per octave | |
lacunarity | float | No | 2.0 | Frequency increase per octave | |
seed | int | No | 0 | Random seed (0 = random) | |
name | string | No | null | Terrain name |
Returns: {success, resolution, scale, heightMultiplier, octaves, persistence, lacunarity, seed}
terrain_smooth
⭐ Smooth terrain heights to reduce sharp edges and create natural transitions.
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
normalizedX | float | Yes | - | X position (0-1) | |
normalizedZ | float | Yes | - | Z position (0-1) | |
radius | float | No | 0.1 | Smoothing radius (0-1) | |
iterations | int | No | 1 | Number of smoothing passes | |
name | string | No | null | Terrain name | |
instanceId | int | No | 0 | Terrain instance ID |
Returns: {success, centerX, centerZ, radius, iterations, affectedArea}
terrain_flatten
⭐ Flatten terrain to a specific height in a region.
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
normalizedX | float | Yes | - | X position (0-1) | |
normalizedZ | float | Yes | - | Z position (0-1) | |
targetHeight | float | No | 0.5 | Target height (0-1) | |
radius | float | No | 0.1 | Flatten radius (0-1) | |
strength | float | No | 1.0 | Flatten strength (0-1) | |
name | string | No | null | Terrain name | |
instanceId | int | No | 0 | Terrain instance ID |
Returns: {success, centerX, centerZ, targetHeight, radius, strength}
terrain_paint_texture
Paint terrain texture layer. Requires terrain layers already configured.
| Parameter | Type | Required | Default | Description | |
|---|---|---|---|---|---|
normalizedX | float | Yes | - | X position (0-1) | |
normalizedZ | float | Yes | - | Z position (0-1) | |
layerIndex | int | Yes | - | Terrain layer index (0-based; use terrain_get_info to query available layers). Out of range, including negative, is rejected before anything is painted | |
strength | float | No | 1.0 | Paint strength | |
brushSize | int | No | 10 | Brush size in pixels | |
name | string | No | null | Terrain name | |
instanceId | int | No | 0 | Terrain instance ID |
Returns: {success, layerIndex, layerName, centerX, centerZ, brushSize, strength}
Example Usage
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingPackages/com.besty.unity-skills/unity-skills~/skills/terrain/SKILL.md
Popularity
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ndai0454-gif/game_thanhgiong/terrain)