unity-core

unity-core is a cursor rule for Cursor from Bilal140202/the-lord-of-the-skills. It costs 1,779 tokens per session, scanned A, a copy of unity-core, MIT.

A set of C# coding rules for Unity, a game-development engine, including naming conventions for classes, fields, properties, constants, and Boolean values. It also covers immutable data structures and serialized fields.

In plain words
What is it for?
Use it when writing or reviewing Unity 6.2 C# scripts, especially MonoBehaviour classes, player controllers, fields, properties, constants, and game-state flags.
Why use it?
It makes Unity code more consistent and easier to read and maintain. The examples show preferred patterns and constructions to avoid.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when writing or reviewing Unity 6.2 C# scripts, especially MonoBehaviour classes, player controllers, fields, properties, constants, and game-state flags.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bilal140202/the-lord-of-the-skills/unity-core
Install

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.

Clone the repo
git clone --depth 1 https://github.com/Bilal140202/the-lord-of-the-skills

Made for: Cursor.

Wrote 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.

agentmods badge for unity-core

README.md
[![agentmods](https://agentmods.dev/badge/rules/bilal140202/the-lord-of-the-skills/unity-core/github.svg)](https://agentmods.dev/rules/bilal140202/the-lord-of-the-skills/unity-core)
Your own site
<a href="https://agentmods.dev/rules/bilal140202/the-lord-of-the-skills/unity-core"><img src="https://agentmods.dev/badge/rules/bilal140202/the-lord-of-the-skills/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.

agentmods 80×15 button for unity-core

Your own site · 80×15
<a href="https://agentmods.dev/rules/bilal140202/the-lord-of-the-skills/unity-core"><img src="https://agentmods.dev/badge/rules/bilal140202/the-lord-of-the-skills/unity-core.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,779 This file is loaded in full into every session.
When invoked 1,779 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01779 $0.01779
Opus 5 $0.00890 $0.00890
Sonnet 5 $0.00356 $0.00356
Haiku 4.5 $0.00178 $0.00178

Measured 12d ago against content hash 3ae1f612e8ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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 12d 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.

Origin

This is a copy

100% identical to unity-core — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/fangorn/cursor/Common-ka__ai-agent-unity-rules/unity-core.mdc · 324 lines

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() { }
}

Read the full file on GitHub · 324 lines

Changes

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.

  1. 12d ago First seen · 324 lines · 1,779 tokens per session scan A 3ae1f612e8ee

Subscribe to this mod's changes

unity-core is a cursor rule published in the GitHub repository Bilal140202/the-lord-of-the-skills (4 stars, last pushed 6d 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. It is 100% identical to unity-core, differing in 0 lines, and is treated as a copy.