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/loonghao/auroraview/06-python-apigit clone --depth 1 https://github.com/loonghao/auroraviewWhat 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.00802 | $0.00802 |
| Opus 5 | $0.00401 | $0.00401 |
| Sonnet 5 | $0.00160 | $0.00160 |
| Haiku 4.5 | $0.00080 | $0.00080 |
Grade A, and why
06-python-api 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
Python 抽象:AuroraView 基类
- 导入约定:
from auroraview import AuroraView - 构造参数(简化版):
parent: Any | None = NoneNone→ Standalone 模式(Rust Shell / WebView 壳)- Qt 对象 → DCC 模式(PySide 宿主,作为 parent dock/panel)
url: str | None = None/html: str | None = Nonetitle: str = "AuroraView"width: int = 800, height: int = 600fullscreen: bool = Falsedebug: bool = Falseapi: Any | None = None→ 暴露到auroraview.api.*
- 生命周期钩子(可覆写):
def on_show(self) -> None: ...def on_hide(self) -> None: ...def on_close(self) -> None: ...def on_ready(self) -> None: ...(WebView & JS bridge 就绪)
- 事件推送:
self.emit(event_name: str, payload: Any) -> None- Python → JS:触发前端
auroraview.on(event_name, handler)
- Python → JS:触发前端
JS → Python 映射机制
-
auroraview.api.*风格- Python 在构造
AuroraView时传入api对象,例如api=self - 规则:
auroraview.api.export_scene(*args)→ Pythonapi.export_scene(*args) - 实现:
- JS:
auroraview.api.foo(...args)→auroraview.call("api.foo", args) - Python:解析 method 前缀
"api.",以getattr(api, name)查找方法 params为 list → 调用func(*params);为 dict → 调用func(**params)
- JS:
- Python 在构造
-
通用
auroraview.call(method, params)- AuroraView 提供注册接口:
bind_call(method: str, func: Callable) - 使用示例:
- JS:
auroraview.call("tool.apply", {"strength": 0.8}) - Python:
self.bind_call("tool.apply", self.apply_tool)def apply_tool(self, strength: float, mode: str = "preview"): ...
- JS:
- 调用规则:
params是 dict →func(**params)params是 list →func(*params)- 其它 → 单一位置参数
- AuroraView 提供注册接口:
Standalone / DCC 双模式
- Standalone:
- 不依赖 Qt/PySide,仅使用 Rust 壳 + WebView(现有 wry/tao,可逐步演进到 Win32 + WebView2)
parent=None,AuroraView 负责创建顶层窗口并托管事件循环
- DCC:
- 仅在 Python 层使用 Qt/PySide 作为宿主壳(通过
parent注入) - Rust/Python core 不直接依赖 Qt;Qt 逻辑集中在
auroraview.dcc.qt_shell类模块 - 通过 parent 将 WebView 子窗口嵌入 DCC 主窗口(Dock/Pane),保持原生体验
- 仅在 Python 层使用 Qt/PySide 作为宿主壳(通过
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 · 58 lines · 802 tokens per session scan A eddaa4d5760d
06-python-api is a cursor rule published in the GitHub repository loonghao/auroraview (44 stars, last pushed 1mo ago), licensed MIT. It adds 802 tokens to every session, about $0.0040 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
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.