AIRules.zh

AIRules.zh is a cursor rule for Cursor from bytepine/NexusLink. It costs 28 tokens per session (3,495 once invoked), scanned A, original, MIT.

A set of IDE rules for finding and editing Unreal Engine assets through NexusLink MCP. MCP is a way for an AI agent to call tools provided by another program; these rules require discovering capabilities and asset paths before reading or changing them.

In plain words
What is it for?
It is for working with Unreal Engine assets such as blueprints, widgets, materials, behaviour trees, and runtime actors through the prescribed search, edit, and save workflow.
Why use it?
It prevents the agent from guessing tool names or asset paths and requires modified assets to be saved back to disk.

Cursor rule for Cursor

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

Good fit It is for working with Unreal Engine assets such as blueprints, widgets, materials, behaviour trees, and runtime actors through the prescribed search, edit, and save workflow.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bytepine/nexuslink/airules.zh
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/bytepine/NexusLink

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 AIRules.zh

README.md
[![agentmods](https://agentmods.dev/badge/rules/bytepine/nexuslink/airules.zh/github.svg)](https://agentmods.dev/rules/bytepine/nexuslink/airules.zh)
Your own site
<a href="https://agentmods.dev/rules/bytepine/nexuslink/airules.zh"><img src="https://agentmods.dev/badge/rules/bytepine/nexuslink/airules.zh/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 AIRules.zh

Your own site · 80×15
<a href="https://agentmods.dev/rules/bytepine/nexuslink/airules.zh"><img src="https://agentmods.dev/badge/rules/bytepine/nexuslink/airules.zh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,495 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.00028 $0.03495
Opus 5.5 $0.00011 $0.01398
Sonnet 5.5 $0.00006 $0.00699
Haiku 4.5 $0.00003 $0.00349

Measured 3d ago against content hash 2c4c217a4ace, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

AIRules.zh 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 3d 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.

Resources/AIRules.zh.mdc · 134 lines

How it starts

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

English | 中文

与 MCP 握手指令的分工

  • InitializeInstructions(UE 握手)提供当前模式的调用入口和通用读写约束。
  • 本规则(IDE 侧):强制先发现工具 → 查路径 → 读写;禁止猜测能力名/路径;填写项目级 PathFilter 前缀。

来源:Plugins/NexusLink/Resources/AIRules.mdc;升级插件后,将通用段变更合并到工程副本。


1. 四步流程(必遵)

涉及 UE 资产 / PIE / 蓝图 / Widget / 材质 / 行为树 / GAS 时,本轮先调用 MCP,再回答。UnLua 属于 NexusLinkExt:加载该插件后,用 SearchCapabilities 发现对应能力。

步骤 工具 说明
1 发现能力 SearchCapabilities 已知能力名可跳过;否则 Query 使用 1–2 个精确词,如 blueprint variable、runtime actor、behavior tree;禁止业务功能名、资产名或过宽单词(见 §2)
2 发现资产路径 SearchAsset 必须提供 AssetType 和功能目录 PathFilter;顶层 Assets;指定类型搜索会在顶层返回 RecommendedGet/RecommendedManage,步骤 3 优先采用
3 读写 GetAsset* / ManageAsset* / ListRuntime* 等 AssetPath 只能来自 Assets[].Path;优先 RecommendedGet/RecommendedManage;列表有 <k>_defaults 时,缺失字段等于对应默认值({**defaults,**entry})
4 持久化 SaveAsset 或 manage bSaveToDisk=true 磁盘资产修改后必须保存;BP/ABP/WBP 还可传 bCompile=true

按当前问题一次请求已知必需的字段。当前地图用 GetEditorContext(Sections=["CurrentMap"]),蓝图图表概况用 Sections=["GraphOverview"],已知属性在支持的 section 传 PropertyPaths。资产搜索指定 AssetType、业务 PathFilter 和小 Limit。日志先按类别、级别或文本过滤,首轮最多 50 条。仅在结果不足时补查所缺 section 或下一页。

元工具 SearchCapabilities、CallCapability、SubmitFeedback 必须直接使用 MCP tools/call,不能包装为 CallCapability(Capability="SearchCapabilities", …)。

图数据用领域 GetAsset* / ManageAsset*;图视图与选择用 GetEditorGraph / ControlEditorGraph。通用 UI 后备用 GetEditorSlate / CaptureEditorSlate / InteractEditorSlate,只使用返回的 Ref。本地测试用 ControlEditorAutomation / ListEditorAutomationTests;编译用 CompileEditorLiveCoding。长操作只启动一次,再凭 OperationId 查询 GetEditorOperation;WaitSeconds 上限 30。State=Completed 仅描述执行状态,还须检查 Result.Outcome 或逐测试结果。取消请求只结束等待;支持停止的操作须显式停止。断连或超时后不得重试写入。这些操作不能加入 Calls[] 原子批次。能力发现会提供 Execution 后端原因与 outputSchema。

图操作优先专用 API。GetEditorGraph(AssetPath) 发现图;传回返回的 GraphName 查看节点、布局、SelectedNodeIds 和可用原生视图。使用返回的图相对路径与节点 ID,不用 Slate Ref 或猜测名称。ControlEditorGraph 支持 Open、SetView、ZoomToFit、FocusNode、SelectNodes 和 ClearSelection;除 Open 外都需要 GraphName。ViewLocation={X,Y} 是图空间左上偏移;正数 Zoom 由引擎量化。选择使用 NodeIds[] 和 SelectionMode=Replace|Add|Remove。两项能力同步返回,没有 OperationId;bRequestAccepted / bViewDeferred 区分接受请求与延迟视图动画。FocusNode / ZoomToFit 后要稍后回读,不能假定视图已稳定。结构写入、编译和保存仍由领域工具承担。缺少图动作时应发现领域工具并 SubmitFeedback,不能立即用 Slate 拖线或操作右键菜单。无领域或专用图 API 时,通用 Slate 才作为最后的 UI 后备,并通过重新查询/截图验证。仅无 MCP 路径时使用电脑控制,例如原生系统对话框或编辑器外 UI。模态窗口与慢任务仍受 EditorBusy 保护,Slate 请求也不例外;不能假定支持模态控制,也不能在断连/超时后重放写入。

Read the full file on GitHub · 134 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. 3d ago Changed 2c4c217a4ace
  2. 5d ago Changed · +2 lines bf9bcaa439cf
  3. 15d ago First seen · 132 lines · 28 tokens per session scan A a758e269133d

Subscribe to this mod's changes

AIRules.zh is a cursor rule published in the GitHub repository bytepine/NexusLink (12 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 3,495 once invoked, about $0.0001 per session on Opus 5.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-11-15.

Related

AIRules.zh compared with cursor rules from other repositories

AIRules.zh next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
AIRules.zhbytepine/NexusLinkCursor rule12yesterdayMITA28Cursor
ai-game-development-handbookgonglei007/GameDevMindCursor rule6.7k4d agoMITA0Cursor
monobehaviour-lifecycleTMHSDigital/Unity-Developer-ToolsCursor rule52d agononeA0Cursor
minimax-m2-coremadebyaris/rakitui-aiCursor rule510mo agoMITA2,836Cursor
security-best-practicesmadebyaris/rakitui-aiCursor rule510mo agoMITA0Cursor
ponytailDietrichGebert/ponytailCursor rule201k8d agoMITA604Cursor
angular-20angular/angularCursor rule102k4d agoMITA0Cursor