Borrowing it
Nothing to install: this file belongs to loonghao/auroraview. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/loonghao/auroraview/main/.codebuddy/skills/architecture-diagnosis/SKILL.mdgit 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/skills/loonghao/auroraview/architecture-diagnosis)<a href="https://agentmods.dev/skills/loonghao/auroraview/architecture-diagnosis"><img src="https://agentmods.dev/badge/skills/loonghao/auroraview/architecture-diagnosis/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/skills/loonghao/auroraview/architecture-diagnosis"><img src="https://agentmods.dev/badge/skills/loonghao/auroraview/architecture-diagnosis.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.00079 | $0.01935 |
| Opus 5 | $0.00039 | $0.00967 |
| Sonnet 5 | $0.00016 | $0.00387 |
| Haiku 4.5 | $0.00008 | $0.00194 |
Grade A, and why
architecture-diagnosis 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Architecture Diagnosis
生成一份可用于评审与重构决策的“架构诊断书”,强调 证据链、风险分级、渐进式改造路线,避免泛泛而谈。
适用场景(When to Use)
- 对某个分支/版本进行 设计缺陷盘点,判断是否需要重构。
- 出现线程/事件循环/生命周期相关的疑难问题,需要从架构层面解释根因与系统性风险。
- 项目进入“功能膨胀期”,需要固化模块边界、配置规范、可观测性与测试策略。
- 新成员 onboarding,需要一份 系统边界图 + 风险清单 + 可扩展方向。
输入与约束(Inputs & Constraints)
在开始前,优先收集:
- 当前分支/目标版本(例如 PR/commit/branch)。
- 目标平台与宿主(Windows / macOS / Linux;DCC/Qt/Standalone)。
- 关键约束(例如:必须兼容 Python 3.7、必须零 Python 依赖、UI 必须主线程等)。
如果缺少关键约束,最多询问 1–2 个问题;其它信息尽量通过仓库搜索获得。
产出(Deliverables)
默认产出一个 Markdown 文档(推荐命名:architecture-diagnosis.md),包含以下结构:
- 系统边界图(Subsystems & Boundaries):列出主要子系统、职责、依赖方向。
- 关键约束与运行模式(Constraints & Run Modes):明确线程模型、消息泵归属、打包/部署模型。
- 缺陷清单(Findings):按严重度分级(P0/P1/P2),每条必须包含:
- 证据(文件/模块/函数/配置项)
- 风险后果(会导致什么、影响谁、发生概率)
- 建议(短期补丁 vs 中期重构)
- 方案候选与取舍(Options & Trade-offs):给出 2–4 个可选方案,输出 trade-off 表,并给出推荐路径与验收标准。
- 重构路线(Roadmap):按阶段列出可渐进落地的里程碑与验收标准。
- 扩展点与应用场景(Extensions & Scenarios):未来可增长的方向与可复用能力。
- 关键入口索引(Key Entry Points):后续排查与重构的主要文件/模块索引。
工作流程(Workflow)
Step 1:做仓库“快速体检”与技术栈识别
执行以下动作:
- 列出根目录关键文件(例如:
Cargo.toml、pyproject.toml、package.json、justfile、CI 配置)。 - 搜索并确定:
- Rust workspace/主要 crates
- Python 包入口与高阶 API(例如
WebView/AuroraView) - JS SDK 与注入脚本(例如
window.*命名空间) - 示例与端到端应用(如 Gallery)
- 测试组织策略(
tests/、fixture、integration tests)
输出一个“组件地图(组件→职责→依赖)”草稿。
Step 2:建立“运行模式与线程模型”真相表
必须回答清楚:
- 事件循环由谁拥有(宿主 Qt / 自己的 event loop / Win32 message pump)
- UI 操作必须在哪个线程(STA/main thread)
- IPC/消息队列如何被 drain(主动唤醒 vs timer/host pump)
- 关闭流程与资源释放由谁控制(Drop/GC/显式 close/state machine)
- 启动时序与就绪信号(谁先启动:事件循环/消息队列 proxy/timer/服务端;有没有明确的 ready 事件/屏障)
将这些写成一个 Run Mode 矩阵表(例如:StandaloneBlocking / StandaloneThreaded / EmbeddedHostPump / IPCOnly / PackedHeadless)。
Step 3:扫描“架构异味”并固化证据
按下面的“高命中”模式搜索与归档证据:
- 重复实现/重复分支:同类消息/事件在多个文件重复处理。
- 跨层耦合:JS→Rust→Python→Rust 往返或层间依赖反向。
- 默认值/语义漂移:Rust/Python/JS 对同一参数不同默认或不同含义。
- 生命周期补丁:先构造再回填(
new_without_*/set_*),或 Drop 中做破坏性动作。 - 超时/取消语义缺失:前端 Promise/回调 manager/服务端 timeout 不一致。
- 可观测性混杂:
tracing/logging/print混用;协议通道 stdout 被污染。 - 跨平台声明与现实不符:非 Windows/非 Qt 场景只“能编译但不可用”。
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 137 lines · 79 tokens per session scan A d4bc8ef16e5f
architecture-diagnosis is a skill published in the GitHub repository loonghao/auroraview (44 stars, last pushed 1mo ago), licensed MIT. It adds 79 tokens to every session and 1,935 once invoked, about $0.0004 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 skills, from other repositories
autoreview
Pre-commit/ship code review: Codex default; optional Claude or Pi.
omh-code-review
This is a Hermes-native code-review workflow skill.
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
code-reviewer
Code review specialist focused on patterns, bugs, security, and performance.
full-repo-review
Comprehensive four-wave review of all repo source files, producing a prioritized issue backlog.
agent-teams-simplify-and-harden
Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests pass, and auditors find zero issues or…