← 返回 Skills 市场
105
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install force-unwrap-scanner
功能描述
扫描并报告 Swift 项目中的强制解包(!)和 try! 使用情况,识别潜在崩溃风险
使用说明 (SKILL.md)
Force Unwrap Scanner
扫描并报告项目中的强制解包使用情况,帮助识别潜在的运行时崩溃风险。
功能
- 扫描项目中所有的
try!和!强制解包使用 - 按风险等级分类(高/中/低)
- 生成详细报告
- 提供修复建议
使用方法
cd .agent/skills/force-unwrap-scanner
./RunSkill.sh [scan|report|fix]
参数说明
scan- 扫描项目并输出结果report- 生成详细的 HTML 报告fix- 交互式修复(高风险项需要手动确认)
风险分级
| 风险等级 | 说明 | 示例 |
|---|---|---|
| 🔴 高 | EKEventStore、SwiftData、FileIO 等系统级操作 | try! EKEventStore() |
| 🟡 中 | 数据库查询、网络请求 | try! fetchTasks() |
| 🟢 低 | 本地数据、已知安全值 | let x = dict["key"]! |
输出示例
🔍 Force Unwrap Scanner Report
===================================
Total: 3 findings
🔴 High: 1
🟡 Medium: 1
🟢 Low: 1
Files with issues:
TimeFlow/Services/EventKitService.swift:35
TimeFlow/ViewModels/AppState.swift:12
TimeFlow/Helpers/ParseHelper.swift:45
安全使用建议
This skill's purpose (scanning Swift for force-unwraps) is reasonable, but the SKILL.md expects a RunSkill.sh that is not included — do NOT run any unreviewed script. Before installing or invoking: 1) request the missing RunSkill.sh or the tool implementation and inspect it line-by-line (or ask the author to provide a reproducible, auditable implementation); 2) run only in 'scan' or 'report' (read-only) modes first; 3) back up your repository or run inside a disposable clone/container before trying 'fix'; 4) verify the script makes no network calls or credential usage and logs/asks for confirmations before modifying files; 5) prefer tools from a trusted source or add explicit checks (dry-run, explicit file-change list) before allowing automated fixes. If the author cannot supply the missing script or a clear implementation, treat this package as incomplete/untrusted.
功能分析
Type: OpenClaw Skill
Name: force-unwrap-scanner
Version: 1.0.0
The skill bundle contains metadata and documentation for a Swift code analysis tool designed to identify unsafe force unwrapping and 'try!' usage. The provided files (_meta.json and SKILL.md) describe legitimate developer utility functions without any evidence of malicious instructions, prompt injection, or suspicious behavior.
能力评估
Purpose & Capability
Name and description claim a Swift code scanner for `!` and `try!` usages; the declared requirements (no binaries, no credentials) are appropriate for a local static analysis tool.
Instruction Scope
SKILL.md tells the agent to cd into .agent/skills/force-unwrap-scanner and run ./RunSkill.sh [scan|report|fix], but the skill package contains only SKILL.md — the referenced script and its behavior are missing. The 'fix' mode is described as interactive and can modify code; without the actual script or a clear, auditable description of actions (backup, dry-run, file-write rules), executing it would give broad discretion to change source files.
Install Mechanism
No install spec (instruction-only) — lowest-risk delivery. However, because no implementation is present, there is ambiguity about how any required binaries or scripts would be provided in practice.
Credentials
The skill requests no environment variables, credentials, or config paths — that is proportionate for a local static analysis tool.
Persistence & Privilege
always is false and there is no declaration of persistence or system-wide configuration changes. The only notable privilege is the implied ability to read and (in 'fix' mode) modify workspace files, which is expected for a code fixer but should be explicitly documented and constrained.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install force-unwrap-scanner - 安装完成后,直接呼叫该 Skill 的名称或使用
/force-unwrap-scanner触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of force-unwrap-scanner.
- Scans Swift projects for usage of force unwraps (!) and try!
- Categorizes findings by risk level (high, medium, low)
- Generates detailed reports, including file and line numbers
- Provides actionable suggestions for remediation
- Supports commands for scanning, report generation, and interactive fixes
元数据
常见问题
Force Unwrap Scanner 是什么?
扫描并报告 Swift 项目中的强制解包(!)和 try! 使用情况,识别潜在崩溃风险. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 105 次。
如何安装 Force Unwrap Scanner?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install force-unwrap-scanner」即可一键安装,无需额外配置。
Force Unwrap Scanner 是免费的吗?
是的,Force Unwrap Scanner 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Force Unwrap Scanner 支持哪些平台?
Force Unwrap Scanner 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Force Unwrap Scanner?
由 soponcd(@soponcd)开发并维护,当前版本 v1.0.0。
推荐 Skills