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/zimiaoworkshop/touchpad-shield/touchpad-shield-codegit clone --depth 1 https://github.com/ZiMiaoWorkshop/Touchpad-ShieldWhat 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.00743 | $0.00743 |
| Opus 5 | $0.00371 | $0.00371 |
| Sonnet 5 | $0.00149 | $0.00149 |
| Haiku 4.5 | $0.00074 | $0.00074 |
Grade A, and why
touchpad-shield-code 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
Touchpad Shield 代码维护约定
完整说明见 PRD/Touchpad_Shield_开发指导.md §6.1。以下为 AI 与审查者必须遵守的摘要。
禁止再提议的「优化」
除非用户明确新需求,不得建议或实施:
- 合并 Curtain / SuperCurtain 事件 handler(
SmartAreaSwitch_Toggled、SmartEdgeSwitch_Toggled、CurtainValueChanged、SuperCurtainValueChanged)——有意保留四个独立 handler。 - 抽象 WindowBoundsHelper 与 TrayIconService 的
SetWindowSubclass样板——两处处理的消息语义不同,保持独立。 - 合并 TouchpadParametersService 进 RegistryService——SPI 封装层,保持独立文件。
- 删除
Assets/TouchpadShieldLogo.png的 CopyAssets——PNG 供图标生成脚本使用。 - 移除 WebView2 依赖——WinAppSDK C++/WinRT 构建需要。
禁止恢复的反模式(v1.1.1 已移除)
除非用户明确新需求,不得建议或实施:
RootLayoutGrid构造函数 / XAML 设置MinWidth/MinHeight1560×900——窗口最小尺寸仅由WindowBoundsHelper::ApplyInitialClientBounds+WM_GETMINMAXINFO约束。AutostartHandledSessionId/ShouldSkipStartupLaunch/ defer 尺寸到ShowFromTray——自启重复判定用 Session Mutex;尺寸在CompletePlatformSetup→EnsureInitialWindowSize应用。ActivateExistingInstance裸ShowWindow回退——二次打开必须PostMessage(ShowMainWindow)→ShowFromTray。WindowBoundsHelper分离的Apply+ResizeClientToLogicalSize对外 API——统一为ApplyInitialClientBounds。LaunchToTrayOnly内重复m_trayIcon.Create——托盘由UpdateTrayIconState统一创建。
已完成清理(勿重复)
- HID 源文件已移除;注册表键为
InputAutoTouchpadEnabled/MonitoredInputDevices;无 HID 实验键迁移 - PnP watcher 在关闭自动启停时仍运行(仅 reconcile 关闭);见开发指导 §3.3.1(1)
- pch 已瘦身;
XamlLocalTypes.h仅服务XamlTypeInfo.g.cpp BuildContainerPropertyNamesList()、BuildInputDeviceListRow()已提取共用ShouldMinimizeToTrayOnClose已删除- v1.1.1:
Local\TouchpadShield_SingleInstance_v2、计划任务自启、ApplyInitialClientBounds、遗留AutostartHandledSessionId启动清理
需求变更
有疑问必须与用户确认,不可自行决定解决方案(与 build 规则一致)。
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 · 44 lines · 743 tokens per session scan A 2ba031e9e4cb
touchpad-shield-code is a cursor rule published in the GitHub repository ZiMiaoWorkshop/Touchpad-Shield (8 stars, last pushed 9d ago), licensed Apache-2.0. It adds 743 tokens to every session, about $0.0037 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-31.
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.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.