保存和恢复Windows桌面图标布局

SKILL运维和基础设施
运维和基础设施 未标注权限 许可证不明确
安装这个技能

备份和恢复Windows桌面图标布局的SKILL. 是备份在系统文档目录下。 Save and restore Windows desktop icon layout by exporting/importing registry keys. Use when the user wants to backup desktop icon positions, save icon arrangement, or restore a previously saved layout. Trigger keywords: desktop layout, icon layout, backup icons, restore icons, desktop arrangement, 桌面布局, 图标布局, 备份图标, 恢复图标.

一句话选型结论

按资料字段整理

保存和恢复Windows桌面图标布局是运维和基础设施类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类运维和基础设施 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_c641d7bd/save-desktop-layout
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

运维和基础设施
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_c641d7bd仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791638918
正文体量8.0 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
查服务与日志

按现象定位服务状态与日志线索。

写部署与巡检脚本

把重复的部署、巡检写成脚本。

故障排查

按步骤排查网络、依赖与配置。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在运维和基础设施场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
保存和恢复Windows桌面图标布局当前 未标注权限 未标注 未标注 未标注 有
Azure 部署 调用外部服务 GitHub 仓库 664.2 万 Codex、Claude、Cursor 有
Azure diagnostics 问题管理 调用外部服务 GitHub 仓库 657.6 万 Codex、Claude、Cursor 有
Azure aigateway 部署 调用外部服务 GitHub 仓库 655.3 万 Codex、Claude、Cursor 有
Azure AI 搜索 调用外部服务 GitHub 仓库 651.4 万 Codex、Claude、Cursor 有
Azure Cloud migrate 部署 调用外部服务 GitHub 仓库 650.7 万 Codex、Claude、Cursor 有

SKILL.md 全文

8.0 KB
模型实际读到的说明书原文,来自技能仓库

Save Desktop Layout / 保存桌面图标布局

Backs up Windows desktop icon positions by exporting the relevant registry keys, and generates a one-click restore script.
通过导出注册表键值来备份 Windows 桌面图标位置,并生成一键恢复脚本。

Workflow / 备份流程

Step 1: Ask where to save / 第一步:询问保存位置

Use AskUserQuestion to let the user choose a backup destination folder. Offer these options:
使用 AskUserQuestion 让用户选择备份目标文件夹,提供以下选项:

  • Desktop / 桌面 — save to ~/Desktop/DesktopLayoutBackup
  • Documents / 文档 — save to ~/Documents/DesktopLayoutBackup
  • Custom path / 自定义路径 — let the user specify

Step 2: Collect system info / 第二步:收集系统信息

Gather metadata by writing a small .ps1 script and running it (avoids $_ being eaten by bash):
通过编写并运行一个小型 .ps1 脚本来收集元数据(避免 $_ 被 bash 吞掉):

# Write to a temp file, then run: / 写入临时文件后运行:
$controllers = Get-CimInstance Win32_VideoController
foreach ($c in $controllers) {
    if ($c.CurrentHorizontalResolution -gt 0) {
        Write-Host "$($c.CurrentHorizontalResolution)x$($c.CurrentVerticalResolution)"
        break
    }
}

# Icon size (safe to run inline) / 图标大小(可安全内联运行)
Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\Shell\Bags\1\Desktop' -Name 'IconSize' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty IconSize

# Current timestamp / 当前时间戳
Get-Date -Format 'yyyy-MM-dd HH:mm:ss'

IMPORTANT / 重要提示: Do NOT use $_ in inline PowerShell commands passed through bash — it gets stripped. Always use .ps1 script files for commands involving $_.
不要在通过 bash 传递的内联 PowerShell 命令中使用 $_——它会被吞掉。涉及 $_ 的命令必须写入 .ps1 脚本文件再执行。

Step 3: Export registry / 第三步:导出注册表

Run the export script bundled with this skill:
运行技能自带的导出脚本:

powershell -ExecutionPolicy Bypass -File "scripts/export_layout.ps1" -OutputDir "<chosen_directory>"

The script exports HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop to desktop_icon_layout.reg using reg.exe export.
该脚本使用 reg.exe export 将注册表键导出为 desktop_icon_layout.reg 文件。

If the script is not found or fails, fall back to running directly:
如果脚本未找到或执行失败,回退到直接运行:

$dir = "<chosen_directory>"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
reg.exe export "HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop" "$dir\desktop_icon_layout.reg" /y

Verify the .reg file exists and has non-zero size after export.
导出后验证 .reg 文件存在且大小不为零。

Step 4: Generate restore script / 第四步:生成恢复脚本

Create a file named restore_desktop_layout.bat in the backup directory. Use the template from scripts/restore_template.bat bundled with this skill — read it, then write it to the target directory.
在备份目录中创建 恢复桌面图标布局.bat 文件。读取技能自带的 scripts/restore_template.bat 模板,然后写入目标目录。

The .bat calls scripts/restore_layout.ps1 (bundled with this skill) which performs a reliable restore:
该 .bat 文件会调用技能自带的 scripts/restore_layout.ps1,执行可靠的恢复操作:

  1. Parses the .reg file and extracts all registry values (dword, binary, string) / 解析 .reg 文件,提取所有注册表值
  2. Force-kills explorer via Stop-Process + taskkill /f fallback (prevents explorer from overwriting layout on shutdown) / 通过 Stop-Process + taskkill /f 强制终止资源管理器(防止其在退出时覆盖布局数据)
  3. Deletes the current Desktop bag registry key to clear stale data / 删除当前的 Desktop bag 注册表键以清除过期数据
  4. Writes backup values directly via Set-ItemProperty (more reliable than reg.exe import) / 通过 Set-ItemProperty 直接写入备份值(比 reg.exe import 更可靠)
  5. Restarts explorer / 重启资源管理器

Step 5: Write backup info / 第五步:写入备份信息

Create a backup_info.txt in the backup directory containing:
在备份目录中创建 backup_info.txt,包含以下内容:

  • Backup timestamp / 备份时间
  • Screen resolution (width x height) / 屏幕分辨率(宽 x 高)
  • Icon size in pixels / 图标大小(像素)
  • File descriptions / 文件说明
  • Restore instructions (run the .bat as admin) / 恢复说明(以管理员身份运行 .bat)

Step 6: Verify and present / 第六步:验证并呈现

  1. List all files in the backup directory and confirm sizes > 0 / 列出备份目录中的所有文件并确认大小 > 0
  2. Present the backup directory to the user with present_files / 使用 present_files 向用户呈现备份文件
  3. Remind the user: restore works best when screen resolution matches the backup resolution / 提醒用户:恢复时屏幕分辨率应与备份时一致

Restore Workflow / 恢复流程

If the user asks to restore a previously saved layout:
如果用户要求恢复之前保存的布局:

  1. Search for backup in common locations (~/Documents/DesktopLayoutBackup, ~/Desktop/DesktopLayoutBackup):
    在常见位置搜索备份文件:
    powershell Test-Path 'C:\Users\<user>\Documents\DesktopLayoutBackup\desktop_icon_layout.reg' Test-Path 'C:\Users\<user>\Desktop\DesktopLayoutBackup\desktop_icon_layout.reg'
  2. Run the restore script bundled with this skill:
    运行技能自带的恢复脚本:
    bash powershell -ExecutionPolicy Bypass -File "scripts/restore_layout.ps1" -RegFile "<path_to_reg_file>"
  3. If the layout doesn't take effect, advise the user to sign out and sign back in.
    如果布局未生效,建议用户注销并重新登录。

Pitfalls (learned from testing) / 踩坑记录(来自实测)

  • reg.exe import alone is unreliable / 单独使用 reg.exe import 不可靠 — explorer may overwrite the imported data on shutdown. Must force-kill explorer so it cannot write back. / 资源管理器在退出时可能将当前布局写回注册表,覆盖导入的数据。必须强制终止 explorer。
  • Stop-Process may not kill explorer / Stop-Process 可能无法终止 explorer — use taskkill /f /pid <pid> as a fallback. The script handles both. / 使用 taskkill /f /pid <pid> 作为备用方案。脚本已处理这两种情况。
  • $pid is read-only in PowerShell / $pid 在 PowerShell 中是只读变量 — never use it as a loop variable. Use $proc or $p instead. / 切勿用作循环变量,应使用 $proc 或 $p。
  • $_ is stripped by bash / $_ 会被 bash 吞掉 — write PowerShell commands that use $_ to .ps1 files, not inline. / 涉及 $_ 的 PowerShell 命令必须写入 .ps1 文件,不能内联执行。

Notes / 备注

  • Only works on Windows (tested on Windows 10/11) / 仅适用于 Windows(已在 Windows 10/11 上测试)
  • Registry path / 注册表路径: HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop
  • The IconLayouts binary value stores per-icon positions / IconLayouts 二进制值存储每个图标的位置
  • FFLAGS bit 0x1 indicates auto-arrange — if enabled, custom positions are ignored / FFLAGS 的第 0x1 位表示自动排列——启用时自定义位置会被忽略
  • Always verify the export succeeded before telling the user the backup is complete / 在告知用户备份完成之前,务必验证导出是否成功

常见问题

5 问
答案由本站依据条目字段整理
保存和恢复Windows桌面图标布局怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_c641d7bd/save-desktop-layout。安装方式为未标注。装完刷新技能列表或重开客户端。

保存和恢复Windows桌面图标布局支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

保存和恢复Windows桌面图标布局权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

保存和恢复Windows桌面图标布局收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

保存和恢复Windows桌面图标布局用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。