etrules

etrules is a cursor rule for Cursor from FlameskyDexive/Legends-Of-Heroes. It costs 0 tokens per session (3,883 once invoked), scanned A, original, MIT.

A Chinese-language coding rule set for the ET framework, a game-development framework using an entity-component-system structure. It defines how data, logic, packages, and assemblies should be organized.

In plain words
What is it for?
Use it when adding ET framework code, deciding where files belong, separating shared and client-only code, and following the framework's entity, component, system, and hot-update rules.
Why use it?
It gives the coding agent explicit project conventions and requires complete, executable code instead of assumed or placeholder implementations.

Cursor rule for Cursor

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

Good fit Use it when adding ET framework code, deciding where files belong, separating shared and client-only code, and following the framework's entity, component, system, and hot-update rules.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/flameskydexive/legends-of-heroes/etrules
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/FlameskyDexive/Legends-Of-Heroes

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 etrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/flameskydexive/legends-of-heroes/etrules.svg)](https://agentmods.dev/rules/flameskydexive/legends-of-heroes/etrules)
Your own site
<a href="https://agentmods.dev/rules/flameskydexive/legends-of-heroes/etrules"><img src="https://agentmods.dev/badge/rules/flameskydexive/legends-of-heroes/etrules.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,883 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 original No closer match found 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.00000 $0.03883
Opus 5 $0.00000 $0.01942
Sonnet 5 $0.00000 $0.00777
Haiku 4.5 $0.00000 $0.00388

Measured 8d ago against content hash 6d8b12ffe01f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

etrules 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 8d 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.

Packages/com.unity.ide.cursor/etrules.mdc · 529 lines

How it starts

The opening of the file, as written. The whole thing — 529 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ET框架完整开发规范 - AI开发助手

最重要基础原则

  1. 语言要求:所有AI回复和代码注释都必须使用中文
  2. 严禁假设性代码:AI提供的代码必须是完整可执行的,严禁出现"假设xxx已完成"等占位符

ET框架核心架构原则

Entity-Component-System (ECS) 架构

  • Entity:只包含数据,不包含方法
  • System:只包含逻辑,不包含数据
  • Component:Entity的组成部分,遵循组合优于继承
  • 分离原则:严格分离数据定义和业务逻辑

包结构规范

  • 所有代码文件必须创建在 Packages/cn.etetet.* 目录下
  • 包命名规范cn.etetet.{功能模块名}
    • 核心包:cn.etetet.core
    • 功能包:cn.etetet.mmocn.etetet.bagcn.etetet.skill
    • UI包:cn.etetet.yiui* 系列

程序集分类规范

每个包必须支持以下四个程序集分类:

1. Model 程序集 (Scripts/Model/)
  • 用途:服务器和客户端共享的模型层
  • 内容:Entity定义、配置数据、共享逻辑
  • 特点:不可热更新,稳定性高
2. ModelView 程序集 (Scripts/ModelView/)
  • 用途:客户端专用的视图模型层
  • 内容:UI相关Entity、客户端专用组件
  • 特点:不可热更新,UI底层支持
3. Hotfix 程序集 (Scripts/Hotfix/)
  • 用途:服务器和客户端共享的热更新逻辑层
  • 内容:System类、业务逻辑实现
  • 特点:可热更新,核心业务逻辑
4. HotfixView 程序集 (Scripts/HotfixView/)
  • 用途:客户端专用的热更新视图层
  • 内容:UI System类、客户端显示逻辑
  • 特点:可热更新,UI业务逻辑

Entity 开发规范

Entity 类定义规范

// 位置:Packages/cn.etetet.{包名}/Scripts/Model/ 或 Scripts/ModelView/
namespace ET  // 或 ET.Client, ET.Server
{
    /// <summary>
    /// 详细的中文描述
    /// </summary>
    [ComponentOf(typeof(ParentEntityType))]  // 指定父实体类型(如适用)
    public class ExampleComponent : Entity, IAwake, IDestroy
    {
        // 只包含数据字段,不包含方法
        public int SomeValue;
        public string SomeName;
        public List<int> SomeList;
    }
}

Entity 类要求

  • 必须继承 Entity 基类
  • 必须实现 IAwake 接口(生命周期接口)
  • 根据需要实现其他接口:IDestroyIUpdateISerialize
  • 严禁在Entity类中定义任何方法
  • 必须添加 [ComponentOf][ChildOf] 特性指定父级约束

生命周期接口规范

// 基础生命周期
public interface IAwake { }                          // 初始化
public interface IAwake<A> { }                       // 带参数初始化
public interface IDestroy { }                        // 销毁
public interface IUpdate : IClassEvent<UpdateEvent> { } // 更新
public interface ISerialize { }                     // 序列化前
public interface IDeserialize { }                   // 反序列化后

// 异步生命周期
public interface IAwakeAsync { }
public interface IAwakeAsync<A> { }

Read the full file on GitHub · 529 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. 8d ago First seen · 529 lines · 0 tokens per session scan A 6d8b12ffe01f

Subscribe to this mod's changes

etrules is a cursor rule published in the GitHub repository FlameskyDexive/Legends-Of-Heroes (923 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,883 tokens. 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.