agentleFS
batihandevbatihandev/unity-mcp-skills/skills/navmesh/SKILL.md

unity-navmesh

Skill7 starsChanged 7 months agoMITView on GitHub

Use when users want to bake NavMesh or calculate paths for AI navigation.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add NavMeshAgent component to an object.

    line 48
  2. Distinctive:

    Add NavMeshObstacle component to an object.

    line 76
  3. Very specific:

    Use these templates in Unity_RunCommand.

    line 136

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

NavMesh Skills

Requirements

  • com.unity.ai.navigation (≥ 2.0). navmesh_bake and navmesh_clear operate on NavMeshSurface components in the active scene — the scene must contain at least one NavMeshSurface for a bake to do anything.

Overview

Baking and pathfinding.

Common Mistakes

DO NOT (common hallucinations):

  • navmesh_create does not exist → use navmesh_bake to generate NavMesh
  • navmesh_add_agent_component / navmesh_set_agent_speed do not exist → use navmesh_add_agent + navmesh_set_agent (convenience wrappers), or component_add/component_set_property for full control
  • NavMesh must be re-baked after scene geometry changes

Routing:

  • For NavMeshAgent/NavMeshObstacle components → use component module
  • For path calculation → navmesh_calculate_path (this module)

Skills

navmesh_bake

Bake the NavMesh (Synchronous). Warning: Can be slow. Parameters: None.

navmesh_clear

Clear the NavMesh data. Parameters: None.

navmesh_calculate_path

Calculate a path between two points. Parameters:

  • startX, startY, startZ (float): Start position.
  • endX, endY, endZ (float): End position.
  • areaMask (int, optional): NavMesh area mask.

Returns: { status: "PathComplete", distance: 12.5, corners: [...] }

navmesh_add_agent

Add NavMeshAgent component to an object.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path

Returns: { success, gameObject }

navmesh_set_agent

Set NavMeshAgent properties (speed, acceleration, radius, height, stoppingDistance).

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
speedfloatNonullAgent movement speed
accelerationfloatNonullAgent acceleration
angularSpeedfloatNonullAgent angular speed
radiusfloatNonullAgent radius
heightfloatNonullAgent height
stoppingDistancefloatNonullDistance to stop before target

Returns: { success, gameObject, speed, radius }

navmesh_add_obstacle

Add NavMeshObstacle component to an object.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
carveboolNotrueEnable carving

Returns: { success, gameObject, carving }

navmesh_set_obstacle

Set NavMeshObstacle properties (shape, size, carving).

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
shapestringNonullObstacle shape (e.g. Box, Capsule)
sizeXfloatNonullObstacle size X
sizeYfloatNonullObstacle size Y
sizeZfloatNonullObstacle size Z
carvingboolNonullEnable carving

Returns: { success, gameObject, shape, carving }

navmesh_sample_position

Find nearest point on NavMesh.

ParameterTypeRequiredDefaultDescription
xfloatYes-Source position X
yfloatYes-Source position Y
zfloatYes-Source position Z
maxDistancefloatNo10Maximum search distance

Returns: { success, found, point: { x, y, z }, distance }

navmesh_set_area_cost

Set area traversal cost.

ParameterTypeRequiredDefaultDescription
areaIndexintYes-NavMesh area index
costfloatYes-Traversal cost value

Returns: { success, areaIndex, cost }

navmesh_get_settings

Get NavMesh build settings.

Parameters: None.

Returns: { success, agentRadius, agentHeight, agentSlope, agentClimb }


Recipes

Use these templates in Unity_RunCommand. Recipe path rule: ../../recipes/navmesh/<command>.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.