Agent Skills for VRChat UdonSharp
Two skills, rules and validation hooks so the agent writes correct UdonSharp code for VRChat and sets up a world scene on SDK 3.10.5
- 341 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The hooks run a shell script (Bash or PowerShell) after every edit of a `.cs` file in the project
- The skill teaches the agent to write and change Unity project code, and C# templates land in your project
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/agent-skills-for-vrchat-udonsharpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The hooks run a shell script (Bash or PowerShell) after every edit of a `.cs` file in the project
- The skill teaches the agent to write and change Unity project code, and C# templates land in your project
This is third-party code. Review the repository files before installing.
What it does
UdonSharp compiles C# into Udon assemblies for VRChat worlds, and in runtime code familiar features such as `List<T>`, `async/await`, `try/catch`, LINQ and lambdas cause compile errors. The set teaches the agent these limits in advance. The `unity-vrc-udon-sharp` skill covers scripts: replacement rules (`List<T>` to `DataList`, `async` to `SendCustomEventDelayedSeconds`), the ownership model and sync modes, `NetworkCallable`, player data persistence, Dynamics, and loading strings and images from the web. It comes with a cheat sheet, 17 C# templates and 25 reference files. The `unity-vrc-world-sdk-3` skill covers the world scene: `VRC_SceneDescriptor` and spawn points, the `VRC_Pickup`, `Station` and `ObjectSync` components, mirrors and portals, VRChat layers, Quest and Android limits, baked lighting, video players and the world upload workflow. Three rule files describe blocked C# features, networking patterns and picking a sync approach from a decision tree, with a data budget of under 50 bytes per behaviour. Validation hooks fire after every edit of a `.cs` file. They flag `async/await`, `try/catch` and `StartCoroutine()` as errors, and warn about `[UdonSynced]` fields without `RequestSerialization()` and without `Networking.SetOwner()`, six or more synced variables in one script and `int[]` or `float[]` arrays in sync.
Who it is for. For VRChat world creators on Unity who write UdonSharp scripts with Claude Code, Codex CLI or Gemini CLI.
Good fit when
- The agent writes an UdonSharp script and produces code with `List<T>`, `async/await` or LINQ that does not compile
- You must pick a sync approach without bloating synced data: the decision tree and data budget help
- Players who join later see a wrong object state and you need a sync template for it
- You are setting up a world scene: spawn points, pickups, stations, mirrors, a video player
- Before uploading a world you want a checklist for layers, performance and lighting, including Quest limits
Not a fit when
- You work with another VRChat SDK version: only 3.10.5 is supported, and the table of earlier versions exists only for code migration
- You need a replacement for the official VRChat documentation: the author calls the set a personal knowledge base, and it may contain errors
- You need to drive the Unity editor from the agent, create objects and assemble a scene: the catalog has MCP for Unity for that
- The project is not about VRChat: the rules describe limits of the UdonSharp compiler specifically and forbid things that ordinary C# allows
- `jq` is not installed and you count on the Bash hook checks: without `jq` it passes the code through and only prints a warning
Example request
Write an UdonSharp door script that opens on interaction and stays open for players who join laterLimitations
- Support is limited to VRChat SDK 3.10.5, the last verified version. The author kept the entries for 3.7.1–3.10.4 as migration history and does not promise to test or fix those versions. A new stable SDK release is supported only after the repository verifies it.
- The author is not affiliated with VRChat Inc. and calls the set a personal knowledge base. It was created and is maintained with the help of Claude, Gemini and Codex, so subtle errors are possible and VRChat documentation has to be checked separately.
- The Bash hook requires `jq`. Without it the code passes unchecked and a `VALIDATOR-WARNING` is printed. A PowerShell version exists.
- The set contains neither the VRChat SDK nor the UdonSharp compiler and does not replace them. The author accepts no pull requests, only bug reports and knowledge requests.
- The MIT license covers the documentation, rules, templates and hooks, not the SDK or the compiler.
How to disable. Delete the `unity-vrc-udon-sharp` and `unity-vrc-world-sdk-3` folders from the project's skills folder. If you installed the npm package, run `npm uninstall agent-skills-vrc-udon`, and remove the hooks from the agent settings if they remain there.
FAQ
Why can't UdonSharp use List and async?
In code that runs in the Udon runtime, `List<T>`, `async/await`, `try/catch`, LINQ and lambdas cause compile errors. For lists the author suggests `DataList`, for delays `SendCustomEventDelayedSeconds`. Fields whose values the editor computes are a separate context, and some of these features are allowed there.
How do I choose a sync approach?
By the decision tree. If other players do not see the state, no sync is needed. If a late joiner does not need the state, events are enough. If the value changes continuously, such as position and rotation, use continuous sync, otherwise manual sync with a minimum of `[UdonSynced]` fields. The target is under 50 bytes per script and under 100 bytes in total for a small or medium world.
What happens if a public method has no underscore?
Such a method counts as a legacy network entry, that is, it can be reached over the network. For local public methods the author advises starting the name with `_` and marking the intended network calls with `[NetworkCallable]`.
How do I install the set?
The author recommends `npx skills add niaka3dayo/agent-skills-vrc-udon`. There is also `claude plugin add niaka3dayo/agent-skills-vrc-udon`, cloning the repository and installing the npm package `agent-skills-vrc-udon` at the version you need, for example `npm install agent-skills-vrc-udon@2.3.0`.
What do the hooks do and when do they run?
These are PostToolUse checks that run after a `.cs` file is edited. They flag blocked features such as `async/await` and `AddListener()` as errors and questionable spots such as six or more synced variables as warnings. Versions exist for Bash (`validate-udonsharp.sh`) and PowerShell (`validate-udonsharp.ps1`).
In which languages is the description available?
The main description is in English. Translations into Japanese, Simplified and Traditional Chinese and Korean sit alongside.
Discussion
No questions or reviews yet.
Related
SkillsOfficial Unity skill set for agents: editor control, builds, 2D and 3D, UI, URP, audio, multiplayer and monetization
UnitySkills
unity-skills
Driving the Unity editor from an agent through a REST API and skills: scenes, objects and components. Three permission modes, Unity 2022.3 and newer
agent-skills (misaka-mikoto-tech)
agent-skills
Three skills by one author for an agent on Windows: safe PowerShell, reading Bilibili videos and working with an open Unity Editor
The author's personal set: shared agent rules and dozens of skills for GitHub, the browser, macOS, messaging and releases, plus a sync script
A set of game-dev skills for AI agents with a router that picks the right ones for the engine and task
Builder Skills
Skills for agents
A set of small skills from Builder.io for agent work habits: visual plans and diff recaps, docs-first checks, cross-agent review and clean status updates
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Agent Skills for VRChat UdonSharp (this entry) | no | 341 | ||
| MCP for Unity | no | not required | 15,502 | drives the Unity editor from an agent through MCP: scenes and objects, C# scripts, assets, tests, profiling and builds |
| Unity Skills | no | 1,171 | the official Unity skill set for agents: editor work, builds, 2D and 3D, UI, URP, audio, multiplayer and monetization |
README in short
The description opens with a table of typical problems with AI-written UdonSharp code and their solutions, then sets the limits of the set: it includes no SDK, holds no Unity project and does not replace official documentation. Next come three install methods, the folder structure, tables for the two skills, three rule files, the sync decision tree, a table of hook checks and a table of SDK versions. The end gives links to official VRChat resources, a list of community helpers, the disclaimer of affiliation with VRChat Inc. and rules for reports. `CHANGELOG.md`, `SECURITY.md` and translations of the description sit alongside.
README badge
Original SKILL.md
---
name: unity-vrc-udon-sharp
description: >-
UdonSharp scripting skill for VRChat SDK 3.10.5 (active and verified target). Use when writing,
reviewing, debugging, or migrating UdonSharp C# and UdonBehaviour code.
Positive triggers include UdonSharp, NetworkCallable, NetworkCalling,
CallingPlayer, Udon network authorization, synced runtime state, a local public helper,
public-method audit, C# to Udon conversion, and UdonSharp Assembly Version Defines.
VRCQualitySettings and VRCTween calls,
PhysBone/Contact callbacks, world VRCPhysBoneCollider runtime access,
persistence, collection, web, and other component APIs trigger this skill
when the request is about Udon, C#, or runtime API access. Excludes
scene setup, component setup, Build Panel work, layers, optimization, and
upload; route those requests to unity-vrc-world-sdk-3.
license: MIT
metadata:
author: niaka3dayo
version: "4.1.1"
tags: vrchat, udonsharp, udon, networking, sync, persistence, dynamics, asmdef, vpm, assembly-definition
---
# UdonSharp Skill
## Why This Skill Matters
UdonSharp looks like regular Unity C# scripting — until you hit its hidden walls. Many standard C# features (`List<T>`, `async/await`, `try/catch`, LINQ, generics) **silently fail or refuse to compile** in code that runs in the Udon runtime. Editor-evaluated field initializers are a separate context: they can use some ordinary C# features to generate a final value that Udon can hold. Networking is even more treacherous: modifying a synced variable without ownership produces no error — it just does nothing. Forgetting `RequestSerialization` means your state changes never leave your machine. Standard single-player local testing gives zero signal about these networking bugs because there is only one player.
Every rule in this skill exists because UdonSharp's default behavior is to **fail silently**. Read the Rules before generating any code.
## Before Writing Network Code
Four architectural decisions that must be made before choosing sync modes or writing any synced variable. Changing them mid-implementation typically requires a full rewrite:
- **Who owns this state?** One owner writes; all others read. If two players can both write (e.g., a shared toggle), you need an ownership transfer protocol — writes without ownership are silently discarded.
- **When does ownership transfer?** On grab? Interact? Game event? `OnPlayerLeft`? `Networking.SetOwner` is **locally immediate** on the calling client — `Networking.IsOwner(gameObject)` is `true` synchronously after the call, and writing `[UdonSynced]` fields plus `RequestSerialization()` immediately afterwards is safe under an `IsOwner` guard. Concurrent `SetOwner` calls from multiple clients are resolved by network arrival order — there is no client-side arbitration, so accept that the loser's write is overwritten.
- **What do late joiners see?** State set only by one-time events (`SendCustomNetworkEvent`) is invisible to late joiners. Late-joiner-visible state must live in `[UdonSynced]` variables, which are delivered automatically via `OnDeserialization`; no manual `RequestSerialization()` on join is needed.
- **What if the owner leaves mid-session?** VRChat automatically transfers ownership to a remaining player (selection rule is not publicly documented), and `OnOwnershipTransferred` fires on all clients. Synced variables are preserved, so state is not frozen; decide upfront whether to keep the current value, reset to a known default, or re-apply/re-broadcast derived state in `OnOwnershipTransferred`.
## Context Preservation
For complex synced systems, ownership-sensitive refactors, or work resumed after compaction/handoff, consider loading `references/context-preservation.md`.
It provides a lightweight task-context note for source of truth, transport, sync mode, storage, ownership, late-joiner behavior, and validation rationale.
This is optional guidance for complex work, not a step for small mechanical edits.
Keep private data and raw transcripts out of any note.