unity-ai-agent-rules
Free Cursor rules + AGENTS.md that stop AI (Cursor, Claude Code, ChatGPT) from writing broken Unity C#: missing usings, invented APIs, Unity 6 vs 2022 mixups. MIT.
Install / Use
npx skills add scoyoc5/unity-ai-agent-rulesInstalls into whichever agent you are using.
.cursorrules
Cursor IDE rules (legacy)
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of unity-ai-agent-rules
unity-ai-agent-rules scores 75/100 on our quality scale, 840th of 947 AI & Machine Learning skills we index.
Its .cursorrules is 3.3 KB long, well organised into 9 sections with 1 code example: a solid amount of guidance for an agent.
It has 5 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 5 days ago, so unity-ai-agent-rules is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
unity-ai-agent-rules compared with similar skills
All 4 of these similar skills score higher than unity-ai-agent-rules; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| unity-ai-agent-rules (this skill)by scoyoc5 | 75 | 5 | 5d ago | .cursorrules |
| claude-memby thedotmack | 100 | 102.5k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 101.3k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 87.9k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 77.6k | 1d ago | CLAUDE.md |
Frequently asked questions
- How do I install unity-ai-agent-rules?
- Run
npx skills add scoyoc5/unity-ai-agent-rules. The install tabs above show the steps for each supported agent. - Which AI agents does unity-ai-agent-rules work with?
- It is written for Cursor, Claude Code and OpenAI Codex, as a .cursorrules file. Other agents that read the same format can often use it too.
- Is unity-ai-agent-rules safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is unity-ai-agent-rules still maintained?
- The repository was last updated 5 days ago, so unity-ai-agent-rules is actively maintained.
Skill content
View source on GitHubUnity AI Agent Rules (Free Mini)
Cursor rules and an AGENTS.md that stop the most common AI coding mistakes in Unity C#:
- Missing or deleted
usingdirectives (the #1 cause of CS0246 after an AI edit) - Invented APIs (
GameObject.FindByTag,transform.GetChildByName,Rigidbody.AddVelocity…) - Unity 6 vs 2022.3 LTS API mixups (
velocity→linearVelocity,drag→linearDamping, obsoleteFindObjectOfType)
Works with Cursor, Claude Code, and any agent that reads AGENTS.md. There's also a paste-in header for ChatGPT and Claude chat.
Also catches bugs that compile fine
| AI writes | What breaks | Rule says |
|---|---|---|
| target?.TakeDamage(1) | MissingReferenceException after Destroy. ?. can't see Unity's "fake null" | Use target != null on UnityEngine.Object (full kit) |
| renames speed → moveSpeed | Every prefab's tuned value quietly resets | Add [FormerlySerializedAs("speed")] (full kit) |
| += an event in Start with no -= | Errors after a scene reload | Subscribe in OnEnable, unsubscribe in OnDisable (full kit) |
What's inside
| File | What it does |
|---|---|
| .cursor/rules/00-unity-core.mdc | Always on. Reads ProjectVersion.txt and manifest.json first, no invented APIs, writes complete compilable files |
| .cursor/rules/01-namespaces-usings.mdc | Keeps usings, plus a type → namespace lookup table and name-clash fixes |
| .cursor/rules/04-unity-versions-api.mdc | 2022.3 LTS vs Unity 6 API table |
| AGENTS.md | The same guidance for Claude Code, Codex and other agents |
| PRIMING_HEADER.md | Paste at the start of a ChatGPT or Claude chat |
Quick start (60 seconds)
git clone https://github.com/scoyoc5/unity-ai-agent-rules
cp -r unity-ai-agent-rules/.cursor unity-ai-agent-rules/AGENTS.md /path/to/YourUnityProject/
Then ask your agent: "Add a jump to PlayerController." It should read ProjectVersion.txt first and keep your using lines.
Install
- Copy
.cursor/andAGENTS.mdinto your Unity project root, next toAssets/. - That's it. Cursor picks up the rules automatically. For chat tools, paste
PRIMING_HEADER.mdfirst.
Quick reference: Unity 6 vs 2022.3
| Topic | 2022.3 LTS | Unity 6 |
|---|---|---|
| Rigidbody velocity | rb.velocity | rb.linearVelocity |
| Drag | rb.drag, rb.angularDrag | rb.linearDamping, rb.angularDamping |
| Find objects | FindFirstObjectByType<T>() | same (FindObjectOfType obsolete) |
| Async | Coroutines | Coroutines or Awaitable |
Want the full kit?
The Unity AI Agent Kit adds lifecycle, serialization, Input System, performance and test rules, a CLAUDE.md, a phased feature-planning workflow with templates, 20 task prompts (controllers, save/load, FSM, inventory, pooling, UI…), and a batchmode compile + EditMode test loop.
👉 Get it on itch.io ($12 suggested, $9 minimum)
Contributing
Seen an AI invent a Unity API? Open an issue with the fake call and the real one, and I'll add it to the list.
License
MIT. Not affiliated with or endorsed by Unity Technologies, Anysphere (Cursor), or Anthropic.
<sub>Keywords: cursor rules for unity, .cursorrules unity, claude code unity, CLAUDE.md unity, AGENTS.md unity, chatgpt unity c#, unity 6 linearVelocity, CS0246 AI.</sub>
Related Skills
claude-mem
102.5kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
101.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
87.9kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
77.6kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
