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.
git clone --depth 1 https://github.com/loonghao/auroraviewWrote 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.
[](https://agentmods.dev/rules/loonghao/auroraview/06-python-api)<a href="https://agentmods.dev/rules/loonghao/auroraview/06-python-api"><img src="https://agentmods.dev/badge/rules/loonghao/auroraview/06-python-api/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.
<a href="https://agentmods.dev/rules/loonghao/auroraview/06-python-api"><img src="https://agentmods.dev/badge/rules/loonghao/auroraview/06-python-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00802 | $0.00802 |
| Opus 5.5 | $0.00321 | $0.00321 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (47 stars, last pushed 18d ago), licensed MIT. It adds 802 tokens to every session, about $0.0032 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-08-30.
Other cursor rules, from other repositories
python_tests
We use the unit tests to cover internal behavior that can work without the web / backend counterpart. We aim for 95%+ unit test coverage of our Python code in lib/streamlit.
django-python
Rules for writing Python services at PostHog (Python servers powered by the Django framework).
py-fast-api
Cursor rules for Python FastAPI backend development and best practices.
python
Python best practices and patterns for modern software development with Flask and SQLite.
python--typescript-guide-cursorrules-prompt-file
Cursor rules for Python development with TypeScript guide integration.
python-conventions
Python coding style, FastAPI endpoint template, code organisation sections.