Skip to content

Commit af1983a

Browse files
TMHSDigitalclaude
andcommitted
feat: rewrite skill descriptions as triggers and point skills at the MCP tools
Every skill description now starts with 'Use when' and lists the symptoms and words users actually type (lag, GC spikes, Bolt, Baker, SubScene, pink materials). Twelve skills gain an MCP Tools section that says when to call scaffold_script, lookup_api, shader_helper, or analyze_project. validate_plugin.py fails if a description is not a trigger or if any MCP tool is not mentioned by a skill. Closes #42 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpEiWjv38TrdFcgqU8ER5L
1 parent 9b7bffe commit af1983a

19 files changed

Lines changed: 74 additions & 19 deletions

File tree

‎.github/scripts/validate_plugin.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,16 @@ def check_skills():
148148
errors.append(f"{rel}: frontmatter missing {field}")
149149
if "globs" in fields and parse_globs(fields["globs"]) is None:
150150
errors.append(f"{rel}: globs must be a JSON-style list of strings")
151+
if not fields.get("description", "").startswith("Use when"):
152+
errors.append(f"{rel}: description should start with 'Use when' and name what the user asks or sees")
151153
if len(body) < 100:
152154
errors.append(f"{rel}: body too short ({len(body)} chars, minimum 100)")
153-
print(f"Checked {len(dirs)} skills")
155+
skill_text = "".join(read(f"skills/{d.name}/SKILL.md") for d in dirs if (d / "SKILL.md").exists())
156+
tools = re.findall(r"^@mcp\.tool\(\)\s+def (\w+)", read("mcp-server/server.py"), re.MULTILINE)
157+
for tool in tools:
158+
if f"`{tool}`" not in skill_text:
159+
errors.append(f"MCP tool {tool} is not mentioned by any skill; tell the agent when to call it")
160+
print(f"Checked {len(dirs)} skills and {len(tools)} MCP tool references")
154161
return errors
155162

156163

‎skills/addressables-assets/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Addressables and Asset Management
3-
description: Managing assets with the Addressables system for async loading, memory management, and remote content delivery.
3+
description: Use when loading assets at runtime, replacing Resources.Load, shrinking build size, fixing memory that never frees after scene changes, or shipping DLC and remote content. Covers Addressables async loading, handles and Release, labels, groups, and remote catalogs.
44
globs: ["**/*.cs", "**/AddressableAssetsData/**"]
55
standards-version: 1.10.0
66
---

‎skills/animation-systems/SKILL.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
title: Animation Systems
3-
description: Unity animation workflows including Animator Controller, Timeline, DOTween, and sprite animation for 2D.
3+
description: Use when the user works on character or UI animation, Animator Controllers, blend trees, state transitions, root motion, Timeline cutscenes, tweens, or 2D sprite animation. Covers Animator parameters and hashing, Timeline, DOTween, and sprite animation.
44
globs: ["**/*.cs", "**/*.controller", "**/*.anim", "**/*.playable"]
55
standards-version: 1.10.0
66
---
77

88
# Animation Systems
99

10+
## MCP Tools
11+
12+
Call `lookup_api` with `category` set to `animation` to check Animator and Timeline APIs. If the tools are unavailable, continue without them.
13+
1014
## Animator Controller
1115

1216
The Animator Controller is Unity's primary animation state machine. It manages states, transitions, parameters, layers, and blend trees.

‎skills/audio-systems/SKILL.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
title: Audio Systems
3-
description: Audio implementation patterns including AudioSource, AudioMixer, spatial audio, and audio management.
3+
description: Use when the user adds sound effects or music, hears clipping or missing sounds, needs volume sliders, 3D positional audio, or an audio manager. Covers AudioSource, AudioMixer groups and exposed parameters, spatial audio, pooling, and audio import settings.
44
globs: ["**/*.cs", "**/*.mixer"]
55
standards-version: 1.10.0
66
---
77

88
# Audio Systems
99

10+
## MCP Tools
11+
12+
Call `lookup_api` with `category` set to `audio` to check AudioSource and AudioMixer APIs. If the tools are unavailable, continue without them.
13+
1014
## Core Components
1115

1216
### AudioSource

‎skills/ecs-dots/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: ECS and DOTS
3-
description: Entity Component System development with Unity Entities, Jobs, and Burst for high-performance simulation.
3+
description: Use when the user works with DOTS, ECS, Entities, ISystem or SystemBase, IComponentData, Bakers, SubScenes, the Job System, or Burst, or needs to simulate thousands of objects. Covers entity queries, baking, entity command buffers, jobs, and Burst constraints.
44
globs: ["**/*.cs"]
55
standards-version: 1.10.0
66
---

‎skills/editor-scripting/SKILL.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
title: Editor Scripting
3-
description: Extending the Unity Editor with custom inspectors, editor windows, property drawers, gizmos, and Scene View overlays using UI Toolkit.
3+
description: Use when the user wants to extend the Unity Editor with a custom inspector, editor window, property drawer, menu item, gizmo, Scene View overlay, or tooling under an Editor folder. Covers UI Toolkit inspectors, SerializedProperty, Undo, and editor-only assemblies.
44
globs: ["**/Editor/**/*.cs"]
55
standards-version: 1.10.0
66
---
77

88
# Editor Scripting
99

10+
## MCP Tools
11+
12+
Call `scaffold_script` with `type` set to `editor-window`, `custom-inspector`, or `property-drawer` to generate editor code that already lives in an Editor folder. Use `lookup_api` with `category` set to `editor` to check editor APIs. If the tools are unavailable, continue without them.
13+
1014
## Overview
1115

1216
All editor scripts must be placed in an `Editor/` folder (or reference an Editor-only assembly definition). Code in Editor folders is excluded from player builds.

‎skills/input-systems/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Input Systems
3-
description: Input handling with the New Input System package and legacy Input Manager migration guidance.
3+
description: Use when the user handles keyboard, mouse, gamepad, or touch input, sees errors from UnityEngine.Input, sets up PlayerInput or .inputactions assets, adds key rebinding, or adds local multiplayer. Covers the Input System package, action maps, callbacks, rebinding, and migrating from the legacy Input Manager.
44
globs: ["**/*.cs", "**/*.inputactions"]
55
standards-version: 1.10.0
66
---

‎skills/monobehaviour-patterns/SKILL.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
title: MonoBehaviour Patterns
3-
description: Comprehensive guide to MonoBehaviour lifecycle, async patterns with Awaitable, and common Unity design patterns.
3+
description: Use when the user writes or debugs MonoBehaviour scripts, asks about Awake vs Start vs OnEnable, execution order, coroutines vs async, Awaitable, singletons, events, or object pooling. Covers lifecycle order, Awaitable async patterns, and common gameplay architecture patterns.
44
globs: ["**/*.cs"]
55
standards-version: 1.10.0
66
---
77

88
# MonoBehaviour Patterns
99

10+
## MCP Tools
11+
12+
Call `scaffold_script` with `type` set to `monobehaviour`, `state-machine`, or `interface` to generate a new script in the project's namespace, and `lookup_api` to check a Unity API and see deprecation warnings before suggesting it. If the tools are unavailable, continue without them.
13+
1014
## Lifecycle Execution Order
1115

1216
Unity calls MonoBehaviour methods in a strict order each frame:

‎skills/networking/SKILL.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
title: Multiplayer Networking
3-
description: Multiplayer networking patterns with Netcode for GameObjects, Netcode for Entities, Mirror, and Photon Fusion.
3+
description: Use when the user builds multiplayer, sets up a host or server, syncs state, writes RPCs or NetworkVariables, or chooses between Netcode for GameObjects, Netcode for Entities, Mirror, and Photon Fusion. Covers authority, ownership, RPCs, prediction, and solution tradeoffs.
44
globs: ["**/*.cs"]
55
standards-version: 1.10.0
66
---
77

88
# Multiplayer Networking
99

10+
## MCP Tools
11+
12+
Call `analyze_project` to see which networking package and version the project has installed before writing netcode, and `lookup_api` with `category` set to `networking` to check APIs. If the tools are unavailable, continue without them.
13+
1014
## Choosing a Solution
1115

1216
Pick based on your game's scale and genre:

‎skills/performance-optimization/SKILL.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
title: Performance Optimization
3-
description: Unity-specific performance best practices for CPU, GPU, memory, and profiling tools.
3+
description: Use when the game lags, stutters, drops FPS, has GC spikes, too many draw calls, long load times, or high memory use, or the user asks how to profile. Covers CPU and GC allocations, pooling, batching and the SRP Batcher, LOD and culling, memory, and the Profiler, Memory Profiler, and Frame Debugger.
44
globs: ["**/*.cs"]
55
standards-version: 1.10.0
66
---
77

88
# Performance Optimization
99

10+
## MCP Tools
11+
12+
Call `lookup_api` before recommending an API; it flags deprecated or slow patterns (for example `FindObjectOfType`) and names the replacement. Call `analyze_project` to check the render pipeline and scripting backend before giving GPU or IL2CPP advice. If the tools are unavailable, continue without them.
13+
1014
## CPU Optimization
1115

1216
### Cache Component References

0 commit comments

Comments
 (0)