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-ecsgit 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.00016 | $0.00592 |
| Opus 5 | $0.00008 | $0.00296 |
| Sonnet 5 | $0.00003 | $0.00118 |
| Haiku 4.5 | $0.00002 | $0.00059 |
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 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.
What it actually says
Unity ECS & DOTS (Unity 6.2+)
Core Principles
- Prefer
ISystem(struct) overSystemBase(class) to avoid GC overhead. - Always use
[BurstCompile]for Systems and Jobs to unlock native performance. - Use
IJobEntityfor component iteration; it handles chunking and multithreading automatically. - 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;
}
}
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 · 101 lines · 16 tokens per session scan A 39e0e85c2e41
unity-ecs 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 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. 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
webdriver-management
Selenium WebDriver lifecycle management — driver factory, explicit waits, browser options, and teardown.
component-development
Modern React + TypeScript component patterns — hooks, typed props, performance optimization, forms, and testing.
test-patterns
Selenium pytest test patterns — data-driven tests, fixtures, error handling, and performance checks.
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.