Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/Common-ka/ai-agent-unity-rulesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/common-ka/ai-agent-unity-rules/unity-core)<a href="https://agentmods.dev/rules/common-ka/ai-agent-unity-rules/unity-core"><img src="https://agentmods.dev/badge/rules/common-ka/ai-agent-unity-rules/unity-core/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/common-ka/ai-agent-unity-rules/unity-core"><img src="https://agentmods.dev/badge/rules/common-ka/ai-agent-unity-rules/unity-core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01779 | $0.01779 |
| Opus 5.5 | $0.00712 | $0.00712 |
| Sonnet 5.5 | $0.00356 | $0.00356 |
| Haiku 4.5 | $0.00178 | $0.00178 |
Grade A, and why
unity-core scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- unity-core — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 324 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Unity Core Rules - C# & MonoBehaviour
Naming Conventions for Unity 6.2
Classes and Structs
// ✅ DO: PascalCase
public class PlayerController : MonoBehaviour { }
// ✅ DO: Readonly structs for data integrity
public readonly struct GameConfig { }
public interface IHealthSystem { }
// ❌ DON'T
public class player_controller { } // snake_case
public class playerController { } // camelCase
public struct MutableConfig { } // Avoid mutable structs
Fields and Properties
public class Example : MonoBehaviour
{
// ✅ DO: Private fields with _ prefix (.NET Style)
[SerializeField] private float _moveSpeed = 5f;
private Transform _targetTransform;
// ✅ DO: Public properties in PascalCase
public float MoveSpeed => _moveSpeed;
public bool IsMoving { get; private set; }
// ✅ DO: Constants in PascalCase (Microsoft Standard)
private const float MaxHealth = 100f;
private const string PlayerTag = "Player";
// ✅ DO: Static fields with _ prefix
private static int _instanceCount = 0;
// ✅ DO: Booleans with is/has/can prefix
private bool _isGrounded;
private bool _hasWeapon;
private bool _canJump;
// ❌ DON'T: Public fields without [SerializeField]
public float moveSpeed; // Use property or [SerializeField] private
// ❌ DON'T: Hungarian notation
private float m_Speed;
private float fSpeed;
}
Methods and Events
public class EventExample : MonoBehaviour
{
// ✅ DO: Methods in PascalCase
public void ProcessInput() { }
private void HandleCollision() { }
// ✅ DO: Events with On prefix
public event Action OnPlayerDeath;
public event Action<int> OnScoreChanged;
// ✅ DO: Async methods with Async suffix (Use Awaitable for Unity 6.2)
private async Awaitable LoadDataAsync() { }
public async Awaitable<bool> TryConnectAsync() { }
}
MonoBehaviour Lifecycle
Correct Method Order
public class LifecycleExample : MonoBehaviour
{
// 1. Serialized Fields
[SerializeField] private float _speed = 5f;
// 2. Private Fields
private Rigidbody _rigidbody;
private bool _isInitialized;
// 3. Properties
public bool IsInitialized => _isInitialized;
// 4. Unity Lifecycle Methods (in call order)
private void Awake()
{
// Initialize components on this object
// Use TryGetComponent to avoid implicit allocation if missing
if (!TryGetComponent(out _rigidbody))
{
Debug.LogError("Rigidbody missing!");
}
}
private void OnEnable()
{
// Subscribe to events
GameEvents.OnLevelStart += HandleLevelStart;
}
private void Start()
{
// Initialization after all Awake calls
_isInitialized = true;
}
private void FixedUpdate()
{
// Physics
if (_isInitialized)
{
ApplyPhysics();
}
}
private void Update()
{
// Game logic and input
ProcessInput();
}
private void LateUpdate()
{
// Called after all Update calls (e.g., camera)
}
private void OnDisable()
{
// Unsubscribe from events
GameEvents.OnLevelStart -= HandleLevelStart;
}
private void OnDestroy()
{
// Cleanup
CleanupResources();
}
// 5. Custom Methods
private void ProcessInput() { }
private void ApplyPhysics() { }
private void HandleLevelStart() { }
private void CleanupResources() { }
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 324 lines · 1,779 tokens per session scan A 3ae1f612e8ee
unity-core is a cursor rule published in the GitHub repository Common-ka/ai-agent-unity-rules (41 stars, last pushed 10mo ago), licensed MIT. It adds 1,779 tokens to every session, about $0.0071 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
component-development
Modern React + TypeScript component patterns — hooks, typed props, performance optimization, forms, and testing.
cursorrules
You are building an AI/ML project with Python. The project uses PyTorch for model training, handles data pipelines with proper validation, tracks experiments systematically, and follows production ML engineering practices. Code is type-hinted, tested, and reproducible.
csharp
C# patterns: async/await, nullable refs, LINQ.
csharp-unity-conventions
C# coding conventions for Unity development.
naming-conventions
Naming conventions for Unity C# code.
rule
AI/ML Python development (PyTorch, scikit-learn).