unity-ecs

unity-ecs is a cursor rule for Cursor from Bilal140202/the-lord-of-the-skills. It costs 16 tokens per session (592 once invoked), scanned A, a copy of unity-ecs, MIT.

Guidance for Unity's Entity Component System and DOTS, a way to process large numbers of game entities efficiently using structured data and jobs.

In plain words
What is it for?
Use it to build high-throughput movement and simulation systems with ISystem, IJobEntity, Burst, and component data.
Why use it?
It encourages code patterns that can reduce memory overhead and run work across multiple processor threads.

Cursor rule for Cursor

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

Good fit Use it to build high-throughput movement and simulation systems with ISystem, IJobEntity, Burst, and component data.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bilal140202/the-lord-of-the-skills/unity-ecs
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-ecs

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/bilal140202/the-lord-of-the-skills/unity-ecs"><img src="https://agentmods.dev/badge/rules/bilal140202/the-lord-of-the-skills/unity-ecs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 592 The whole file, excluding the scripts and references it only reads on demand.
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.00016 $0.00592
Opus 5 $0.00008 $0.00296
Sonnet 5 $0.00003 $0.00118
Haiku 4.5 $0.00002 $0.00059

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

Security

Grade A, and why

unity-ecs 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 9d 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-ecs — 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/gondor/cursor/Common-ka__ai-agent-unity-rules/unity-ecs.mdc · 101 lines

What it actually says

Unity ECS & DOTS (Unity 6.2+)

Core Principles

  1. Prefer ISystem (struct) over SystemBase (class) to avoid GC overhead.
  2. Always use [BurstCompile] for Systems and Jobs to unlock native performance.
  3. Use IJobEntity for component iteration; it handles chunking and multithreading automatically.
  4. Follow Microsoft Naming Conventions: Use PascalCase for public fields in Jobs and Components.

Entity Component System

1. Component Data

using Unity.Entities;
using Unity.Mathematics;

public struct MovementSpeed : IComponentData
{
    public float Value;
}

2. System (ISystem + IJobEntity)

This is the modern standard. It separates data iteration (Job) from the system lifecycle (System).

using Unity.Entities;
using Unity.Transforms;
using Unity.Burst;
using Unity.Mathematics;

[BurstCompile]
partial struct MovementSystem : ISystem
{
    [BurstCompile]
    public void OnCreate(ref SystemState state)
    {
        // Prevents the system from running if no entities have MovementSpeed
        state.RequireForUpdate<MovementSpeed>();
    }

    [BurstCompile]
    public void OnUpdate(ref SystemState state)
    {
        // Pass delta time into the job
        float deltaTime = SystemAPI.Time.DeltaTime;

        // Schedule the job to run in parallel across available worker threads
        new MoveJob
        {
            DeltaTime = deltaTime
        }.ScheduleParallel();
    }
}

// The Source Generator automatically creates the optimized chunk iteration code for this job
[BurstCompile]
partial struct MoveJob : IJobEntity
{
    public float DeltaTime;

    // Use 'in' for read-only data to improve performance
    private void Execute(ref LocalTransform transform, in MovementSpeed speed)
    {
        transform.Position += new float3(0, speed.Value * DeltaTime, 0);
    }
}

Job System (Native Arrays)

Use this pattern when processing raw memory (NativeArray) outside of the ECS framework.

using Unity.Jobs;
using Unity.Collections;
using Unity.Burst;
using Unity.Mathematics;

[BurstCompile]
public struct VelocityJob : IJobParallelFor
{
    // Microsoft Style: Public fields should be PascalCase
    public NativeArray<float3> Velocity;
    
    [ReadOnly] 
    public NativeArray<float3> Acceleration;
    
    public float DeltaTime;
    
    public void Execute(int index)
    {
        Velocity[index] += Acceleration[index] * DeltaTime;
    }
}
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. 9d ago First seen · 101 lines · 16 tokens per session scan A 39e0e85c2e41

Subscribe to this mod's changes

unity-ecs 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 16 tokens to every session and 592 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to unity-ecs, differing in 0 lines, and is treated as a copy.