Contributing to Unity Developer Tools¶
Thanks for helping improve this plugin. This document describes how to set up locally, extend skills and rules, and submit changes.
Getting Started¶
Cursor loads local plugins from ~/.cursor/plugins/local/<name> and skips symlinks that point outside that folder, so fork the repository and clone your fork straight into the local plugins folder:
macOS / Linux:
git clone https://github.com/<your-username>/Unity-Developer-Tools.git ~/.cursor/plugins/local/unity-developer-tools
cd ~/.cursor/plugins/local/unity-developer-tools
Windows (PowerShell):
git clone https://github.com/<your-username>/Unity-Developer-Tools.git "$env:USERPROFILE\.cursor\plugins\local\unity-developer-tools"
cd "$env:USERPROFILE\.cursor\plugins\local\unity-developer-tools"
Create a branch for your work (git checkout -b feat/my-change), then run Developer: Reload Window in Cursor after changing the manifest, rules, skills, or mcp.json.
Plugin Structure¶
The repo is organized as a Cursor plugin with 18 skills and 8 rules, plus snippets, templates, and a companion MCP server.
.cursor-plugin/
plugin.json
skills/
<skill-name-kebab>/
SKILL.md
rules/
<rule-name>.mdc
snippets/
csharp/
shaders/
visual-scripting/
templates/
mcp-server/
server.py
data/
docs/
.github/
workflows/
plugin.json- manifest (name, version, paths to skills/rules).skills/- one directory per skill; each containsSKILL.md.rules/- Cursor rules as.mdcfiles with YAML frontmatter.snippets/- C#, HLSL/ShaderLab, and Visual Scripting examples organized by language.templates/- starter project archetypes (2D platformer, 3D FPS, UI menu, ScriptableObject architecture, editor tool).mcp-server/- Python MCP server exposing Unity-aware tools (script scaffolding, API lookup, shader patterns, platform info, project analysis), with tests inmcp-server/tests/.
Adding a Skill¶
- Add a kebab-case directory under
skills/, e.g.skills/unity-example-flow/. - Create
SKILL.mdwith YAML frontmatter includingtitle,description,standards-version, andglobs(path-scoped patterns where applicable, e.g.["**/*.cs"],["**/*.shader", "**/*.hlsl"]). - In the body, include sections (use
##headings) such as: - Overview / Why - when the skill applies and what problem it solves.
- Required Inputs - what the agent or user must provide.
- Workflow - step-by-step guidance.
- Key References - Unity manual links, package names, or repo paths.
- Example Interaction - short example prompt/response pattern.
- MCP Usage - when to use the companion MCP server, if relevant.
- Common Pitfalls - mistakes to avoid (deprecated APIs, render-pipeline confusion, MonoBehaviour lifecycle traps, etc.).
- See Also - links to related skills or rules.
Match tone, formatting, and frontmatter style of existing skills in this repo.
Adding a Rule¶
- Add a
.mdcfile underrules/, e.g.rules/unity-example.mdc. - Start with YAML frontmatter:
title- one-line summary.description- longer description for humans and tooling.globs- glob patterns scoping the rule (e.g.["**/*.cs"],["**/*.shader", "**/*.hlsl", "**/*.cginc", "**/*.shadergraph"]). Keep them narrow:**/*.assetmatches every material, ScriptableObject, and settings file in a project.alwaysApply: false. Cursor ignoresglobsonalwaysApply: truerules and injects them into every conversation, so CI rejects that combination. UsealwaysApply: trueonly withglobs: []for guidance that truly applies everywhere.-
standards-version- copy it from an existing rule. -
Below the frontmatter, write the rule content in Markdown (constraints, patterns, anti-patterns).
- Register the file under
rulesin.cursor-plugin/plugin.jsonand update the rule counts in the docs.
Keep rules focused; prefer linking to a skill for long workflows. Rules must not contradict the skills; if a skill covers the same topic, keep them in agreement.
Adding a Snippet or Template¶
- Snippets live under
snippets/grouped by language (csharp/,shaders/,visual-scripting/). Each file should be self-contained, target Unity 6.x APIs (Awaitable,FindFirstObjectByType, UI Toolkit), and free of hardcoded credentials. - Templates live under
templates/. A new template needs at least a top-levelREADME.mddescribing usage, the canonical scripts, and any project setup notes (assembly definitions, package dependencies, scripting defines). - Editor-only code (
UnityEditor, custom inspectors, drawers, windows) goes inside#if UNITY_EDITORso the file is safe in any folder. - CI compiles every C# snippet (one file at a time) and every template folder against Unity 6 reference assemblies, once as a player build and once as an editor build, with C# 9 and with obsolete APIs treated as errors. To run it locally (needs Python 3.12 and the .NET SDK; the first download streams the Unity editor archive, several GB):
python .github/scripts/fetch_unity_refs.py --unity-version 6000.0.84f1 --inputsystem-version 1.20.1 --out .unity-refs
python .github/scripts/compile_csharp.py --unity .unity-refs/Editor/Data --inputsystem .unity-refs/inputsystem/package
Validation¶
CI runs the same checks you can run locally:
# Manifest, data schemas, frontmatter and rule scoping, dashes, credentials, C# 9, templates, and counts
python .github/scripts/validate_plugin.py
# MCP server tests and lint
pip install -r mcp-server/requirements-dev.txt
python -m pytest mcp-server/tests
ruff check mcp-server .github/scripts
validate_plugin.py also checks that every skill, rule, snippet, template, tool, and workflow count in README.md, CLAUDE.md, AGENTS.md, .cursorrules, and the docs matches the repo, so update those counts when you add or remove content.
Commit Conventions¶
Releases are automated from commit messages on main:
feat:- new features (minor version bump)fix:,docs:,chore:,refactor:- patch version bumpfeat!:or aBREAKING CHANGEfooter - major version bump
Do not edit the version in plugin.json, the README version badge, or the **Version:** line in CLAUDE.md; the release workflow owns them.
Content Rules¶
- No em dashes or en dashes; use hyphens or rewrite the sentence.
- No hardcoded credentials, tokens, API keys, or passwords, including placeholders that look real.
- Target Unity 6 (CI compiles against 6000.0 LTS) and modern APIs: Awaitable,
FindFirstObjectByType,HLSLPROGRAM, UI Toolkit. - C# must compile as C# 9 (no file-scoped namespaces, no primary constructors).
Pull Request Process¶
- Update docs if you change behavior or content lists (
README.md,CLAUDE.md,AGENTS.md,docs/). - Run validation locally (see above).
- Open a PR against
mainwith a clear title using a conventional commit prefix. - Respond to review feedback; CI must pass before merge.
Developer Certificate of Origin and Inbound License Grant¶
This project uses CC-BY-NC-ND-4.0 as its outbound license, which forbids derivatives. Every pull request is a derivative. Contributions are accepted inbound under a broader grant via the Developer Certificate of Origin (DCO), which resolves the conflict so the project can accept and redistribute contributions.
Required grant¶
By submitting a contribution to this repository, you certify that you have the right to do so under the Developer Certificate of Origin (DCO) 1.1, and you grant TMHSDigital a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute your contribution under the project's current license (CC-BY-NC-ND-4.0) or any successor license chosen by the project.
DCO sign-off¶
Every commit in a pull request must have a Signed-off-by: trailer matching the commit author:
Signing is done at commit time:
The GitHub DCO App enforces this on every PR.
For the full inbound/outbound model and rationale, see standards/licensing.md in the Developer-Tools-Directory meta-repo.