用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/publieople/hermes-config-kit --skill windows-rust-dev命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | windows-rust-dev |
| description | Windows 系统编程 in Rust — windows crate COM/注册表/任务计划/签名校验。 |
Windows 平台 Rust 开发(非 Tauri UI 部分):windows crate、winreg、COM 接口、WinVerifyTrust。
[target.'cfg(windows)'.dependencies],否则 Linux/macOS 编译直接报 compile_error!。#[cfg(windows)] 门控;非 Windows 下给同一函数提供返回空 Vec/Unknown 的 stub,保证 crate 在 Linux 上可编译、纯逻辑单元测试可跑。rustup target add x86_64-pc-windows-msvc
cargo build --target x86_64-pc-windows-msvc
编译通过 = API 签名/feature 对;运行时行为(COM 连接、路径解析)仍需真机验证。*data.Anonymous.pFile = file_info(对 zeroed 指针解引用)——交叉编译、Linux 单测全绿,GitHub Actions 真 Windows runner 一跑就 STATUS_STACK_BUFFER_OVERRUN (0xc0000409)。windows-latest runner(就是真 Windows:真实注册表、Task Scheduler 服务、WinVerifyTrust):
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --workspace
- run: cargo clippy --workspace --all-targets -- -D warnings
配套写 tests/windows_integration.rs(#![cfg(windows)]):真机枚举注册表/任务计划/启动文件夹,断言不 panic、结构合理(enrich 过真实 WinVerifyTrust)。CI 会替你抓住交叉编译看不见的运行时 bug——不要只在本地交叉编译就认为"Windows 侧没问题"。Win32_System_TaskScheduler + Win32_System_Com + Win32_System_Variant + Win32_System_Ole(任务计划)Win32_Security_WinTrust + Win32_Security_Cryptography(WINTRUST_DATA 结构体被后者 gate!)Win32_UI_Shell(SHGetFolderPathW)、Win32_Foundation(HWND/INVALID_HANDLE_VALUE)~/.cargo/registry/src/.../windows-0.62.x/src/Windows/Win32/.../mod.rs),确认实际签名,别凭文档猜。let...else 配 unsafe block 必须加括号:let Ok(x) = (unsafe { f() }) else { ... };0x800B0100(TRUST_E_NOSIGNATURE)要写成 0x800B0100u32 as i32。见 references/windows-crate-0.62.md——含 TaskScheduler COM、WinVerifyTrust、SHGetFolderPathW、winreg 的逐条签名和用法。
taskschd crate 已死(2023 停更)——任务计划用 windows crate 官方 COM 绑定。crates/core/src/windows/(registry/startup_folder/scheduled_task/signature)。