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 commands/awesome-embedded-learning-studio/cfdesktop/architecturegit clone --depth 1 https://github.com/Awesome-Embedded-Learning-Studio/CFDesktopWrote 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/commands/awesome-embedded-learning-studio/cfdesktop/architecture)<a href="https://agentmods.dev/commands/awesome-embedded-learning-studio/cfdesktop/architecture"><img src="https://agentmods.dev/badge/commands/awesome-embedded-learning-studio/cfdesktop/architecture.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.01000 |
| Opus 5 | $0.00000 | $0.00500 |
| Sonnet 5 | $0.00000 | $0.00200 |
| Haiku 4.5 | $0.00000 | $0.00100 |
Grade A, and why
architecture 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.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/architecture — 架构一致性守护
检查代码是否符合 CFDesktop 三层架构规则。
层级定义
Layer 1: base/ (基础层)
- 路径:
base/ - CMake targets:
cfbase,cfbase_headers,cfbase_cpu,cfbase_memory,cfbase_gpu,cfbase_network,cfbase_console - 允许依赖: Qt6::Core, OS APIs (POSIX, Win32)
- 职责: 硬件探测、工具库、平台抽象
- 禁止: 不可感知 UI 或桌面环境概念
Layer 2: ui/ (UI 框架层)
- 路径:
ui/ - CMake targets:
cfui,cf_ui_base,cf_ui_core,cf_ui_widget_material,cf_ui_components_material - 允许依赖: Qt6::Core, Qt6::Gui, CFDesktop::base
- 职责: Material Design 3 组件、主题引擎、动画框架
- 禁止: 不可感知桌面环境或窗口管理概念
Layer 3: desktop/ (桌面环境层)
- 路径:
desktop/ - CMake targets:
CFDesktop_shared,CFDesktopMain,CFDesktopUi,cffilesystem,cfconfig,cflogger - 允许依赖: Qt6::Core, Qt6::Gui, Qt6::Widgets, cfbase, cflogger, cfui
- 职责: 桌面环境实现、窗口管理、显示后端、配置管理
依赖规则 (STRICT)
base/ → 禁止 include ui/ 或 desktop/ 的任何头文件
ui/ → 禁止 include desktop/ 的任何头文件
desktop/ → 可以 include ui/ 和 base/ 的头文件
检查流程
Step 1: 确定审查范围
根据用户指定的模块/文件/目录,确定需要检查的文件列表。
Step 2: 检查 #include 指令
对每个源文件和头文件:
- 提取所有
#include行 - 将每个 include 映射到其所属层级 (base/ui/desktop/外部)
- 标记任何向上依赖(低层级 include 高层级)
检测模式:
- base 层违规:
#include匹配ui/或desktop/或cfui或CFDesktop - ui 层违规:
#include匹配desktop/或CFDesktop_shared
Step 3: 检查 CMake 依赖
对每个 CMakeLists.txt:
- 检查
target_link_libraries只引用同层或更低层 - base: 只允许 Qt 和系统库
- ui: Qt + CFDesktop::base
- desktop: Qt + cfbase + cfui + 自身静态库
Step 4: 检查接口驱动设计
- 抽象接口应在
components/或include/目录 - 具体实现在
platform/或private/目录 - 运行时平台选择使用工厂模式
- 行为变化使用策略模式
Step 5: 检查平台抽象隔离
平台特定代码必须隔离在 private/<platform>_impl/ 目录中:
base/system/*/private/linux_impl/— Linux 实现base/system/*/private/win_impl/— Windows 实现desktop/ui/platform/windows/— Windows 桌面后端desktop/ui/platform/linux_wsl/— Linux/WSL 后端
共享代码(ui/core, ui/widget, base/include)中不得出现平台特定代码。
输出格式 (中文)
# 架构一致性报告: <scope>
## 依赖关系图
(ASCII 图示实际依赖关系)
## 违规项
| 文件 | 行号 | 违规类型 | 说明 |
|------|------|----------|------|
## 符合项
(确认观察到的正确模式)
## 建议修改
(针对每个违规的具体修复方案)
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.
- 3d ago First seen · 98 lines · 0 tokens per session scan A 5165ffa66e1d
architecture is a command published in the GitHub repository Awesome-Embedded-Learning-Studio/CFDesktop (10 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,000 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-31.
Other commands, from other repositories
gui-anything
Build a complete GUI harness for any software application.
validate
Validate a GUI harness against HARNESS.md standards and best practices.
refine
Expand and improve an existing GUI harness with additional coverage.
test
Run tests for a GUI harness and update TEST.md with results.
list
List all GUI-Anything harnesses in the current repository.
fix_board
Automatically diagnose and fix PlatformIO board upload/monitor issues.