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.
npx agentmods add rules/common-ka/ai-agent-unity-rules/unity-coregit clone --depth 1 https://github.com/Common-ka/ai-agent-unity-rulesWhat 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 | $0.01779 | $0.01779 |
| Opus 5 | $0.00890 | $0.00890 |
| Sonnet 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 2d 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.
- 2d 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 (39 stars, last pushed 8mo ago), licensed MIT. It adds 1,779 tokens to every session, about $0.0089 per session on Opus 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.
webdriver-management
Selenium WebDriver lifecycle management — driver factory, explicit waits, browser options, and teardown.
api-testing
Cypress network interception and API testing patterns (cy.intercept, service mocking, request/response validation).
app-router-patterns
Next.js 14+ App Router patterns — Server Components, Client Components, Route Handlers, Server Actions, and metadata API.
page-object-patterns
Page Object Model patterns for Selenium — BasePage, component objects, and fluent interfaces.
test-patterns
Selenium pytest test patterns — data-driven tests, fixtures, error handling, and performance checks.