← 返回
未分类

shoutcut-manager

Use this skill whenever the user wants to batch manage Windows shortcut files (.lnk). Triggers include: "shortcut", ".lnk", "快捷方式", "批量创建快捷方式", "扫描失效快捷方式", "修复快捷方式", "管理桌面快捷方式", "导出快捷方式", "导入快捷方式". This skill provides PowerShell-based tooling to list, create, validate, fix, rename, and batch operate on Windows shell shortcuts.
Use this skill whenever the user wants to batch manage Windows shortcut files (.lnk). Triggers include: "shortcut", ".lnk", "快捷方式", "批量创建快捷方式", "扫描失效快捷方式", "修复快捷方式", "管理桌面快捷方式", "导出快捷方式", "导入快捷方式". This skill provides PowerShell-based tooling to list, create, validate, fix, rename, and batch operate on Windows shell shortcuts.
user_19963c77
未分类 community v1.0.0 1 版本 98591.5 Key: 无需
★ 0
Stars
📥 70
下载
💾 0
安装
1
版本
#latest

概述

软件快捷方式批量管理

概述

管理 Windows 上的 .lnk 快捷方式文件。核心操作通过 PowerShell + WScript.Shell COM 组件实现,支持扫描、创建、校验、修复、重命名、导出/导入等批量操作。

核心能力

操作说明
------------
列出快捷方式扫描指定目录的所有 .lnk 文件,显示目标路径、参数、图标等信息
检测失效链接找出目标文件不存在或无访问权限的失效快捷方式
批量创建从 JSON/CSV 配置文件批量生成快捷方式
批量修复对失效快捷方式尝试自动查找正确目标路径
重命名按规则批量重命名快捷方式文件
导出/导入将快捷方式配置导出为 JSON,支持备份和迁移

脚本位置

所有脚本位于 skills/shortcut-manager/scripts/ 目录下。

使用方式

1. 列出快捷方式

扫描目录中所有 .lnk 文件并显示详细信息。

powershell -ExecutionPolicy Bypass -File "scripts/list-shortcuts.ps1" -Path "C:\Users\Public\Desktop"

可选参数:

  • -Path <路径>:要扫描的目录(必填)
  • -Recurse:递归扫描子目录
  • -OutputJson <文件路径>:导出结果为 JSON

2. 检测失效快捷方式

找出目标文件不存在或无法访问的快捷方式。

powershell -ExecutionPolicy Bypass -File "scripts/find-broken.ps1" -Path "C:\Users\Public\Desktop" -Recurse

可选参数:

  • -Path <路径>:扫描目录
  • -Recurse:递归扫描
  • -AutoFix:尝试自动修复
  • -Delete:删除确认无目标的失效快捷方式
  • -ReportPath <文件路径>:输出报告

3. 批量创建快捷方式

从 JSON 配置文件批量创建快捷方式。JSON 格式:

[
  {
    "name": "VS Code",
    "target": "C:\\Users\\UserName\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
    "arguments": "",
    "workingDirectory": "C:\\Users\\UserName",
    "iconLocation": "C:\\Users\\UserName\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe,0",
    "description": "Visual Studio Code",
    "hotkey": "",
    "windowStyle": 1,
    "locations": [
      "C:\\Users\\Public\\Desktop",
      "C:\\Users\\UserName\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs"
    ]
  }
]
powershell -ExecutionPolicy Bypass -File "scripts/batch-create.ps1" -Config "C:\path\to\shortcuts.json"

4. 导出快捷方式配置

将目录中所有快捷方式的信息导出为 JSON,用于备份或迁移。

powershell -ExecutionPolicy Bypass -File "scripts/export-shortcuts.ps1" -Path "C:\Users\Public\Desktop" -Output "shortcuts-backup.json"

5. 批量重命名

按正则替换规则批量重命名快捷方式。

powershell -ExecutionPolicy Bypass -File "scripts/rename-shortcuts.ps1" -Path "C:\Users\Public\Desktop" -Pattern "旧名称" -Replacement "新名称"

6. 校验快捷方式

验证快捷方式目标的完整性和安全性,检测可疑目标。

powershell -ExecutionPolicy Bypass -File "scripts/validate-shortcuts.ps1" -Path "C:\Users\Public\Desktop"

常见使用场景

  • 新装系统后恢复:用之前导出的 JSON 批量重建所有快捷方式
  • 清理桌面:扫描桌面和开始菜单,删除或修复失效链接
  • 软件迁移:软件移动路径后,批量更新所有关联的快捷方式
  • 安全审计:检查快捷方式是否指向可疑路径或带有恶意参数

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-05-23 18:44 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358 📥 318,319
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,517
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,136