← Back to Skills Marketplace
105
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install force-unwrap-scanner
Description
扫描并报告 Swift 项目中的强制解包(!)和 try! 使用情况,识别潜在崩溃风险
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install force-unwrap-scanner - After installation, invoke the skill by name or use
/force-unwrap-scanner - Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Frequently Asked Questions
What is Force Unwrap Scanner?
扫描并报告 Swift 项目中的强制解包(!)和 try! 使用情况,识别潜在崩溃风险. It is an AI Agent Skill for Claude Code / OpenClaw, with 105 downloads so far.
How do I install Force Unwrap Scanner?
Run "/install force-unwrap-scanner" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Force Unwrap Scanner free?
Yes, Force Unwrap Scanner is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Force Unwrap Scanner support?
Force Unwrap Scanner is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Force Unwrap Scanner?
It is built and maintained by soponcd (@soponcd); the current version is v1.0.0.
More Skills