Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

iOS Dev Cleanup

v1.0.1

Use when checking iOS development disk usage or cleaning up simulators, runtimes, device support, derived data, CocoaPods cache, archives, or other build art...

0· 190·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for jesseluo/ios-dev-cleanup.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "iOS Dev Cleanup" (jesseluo/ios-dev-cleanup) from ClawHub.
Skill page: https://clawhub.ai/jesseluo/ios-dev-cleanup
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install ios-dev-cleanup

ClawHub CLI

Package manager switcher

npx clawhub@latest install ios-dev-cleanup
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The name/description match the instructions: scanning Xcode/simulator/derived data/archives and offering deletion commands is consistent. Minor metadata inconsistency: registry metadata lists no required binaries, but SKILL.md declares requires_binaries: xcrun, du, stat — those binaries are reasonable and expected for macOS/Xcode cleanup.
!
Instruction Scope
The SKILL.md explicitly runs filesystem size scans and numerous deletion commands (rm -rf on DerivedData, DeviceSupport, caches, archives, etc.) which is appropriate for cleanup but inherently destructive. It also specifies automatic cleaning of 'unavailable' simulators/runtimes with '直接执行清理(无需用户确认)' (execute without user confirmation). That automatic deletion before the user review step is the primary scope risk: if invoked without supervision it can remove local data unexpectedly. The instructions target both user-home paths and system Asset paths (/System/Library/AssetsV2) — the latter is SIP-protected but still referenced.
Install Mechanism
Instruction-only skill with no install spec or code to write to disk; this is low install risk. README suggests installing by git cloning from a public GitHub repo, which is a normal distribution method but not enforced or verified by the skill bundle itself.
Credentials
The skill requests no environment variables or credentials. The operations only require local CLI tools (xcrun, du, stat). No network endpoints or external credentials are requested or implied in SKILL.md/README.
!
Persistence & Privilege
The skill is not 'always: true', but model invocation is allowed (disable-model-invocation: false). Because the instructions perform automatic deletion of 'unavailable' items without confirmation, autonomous invocation increases the risk of unintended deletions. Autonomous invocation alone is normal, but combined with the auto-delete behavior this is a notable concern.
What to consider before installing
This skill appears to do what it says (scan and remove iOS/Xcode artifacts) and requests no secrets. However: - Pay attention to the 'unavailable' auto-clean step: SKILL.md says unavailable simulators/runtimes are deleted automatically without user confirmation. If you allow the agent to invoke skills autonomously, that could remove data before you see it. Consider disabling autonomous invocation for this skill or confirming the behavior in a safe environment first. - Review deletion commands before execution. The tool uses rm -rf on many ~/Library paths (DerivedData, DeviceSupport, caches, archives). Make sure you (or the agent) run only the scan or a dry run first and verify which items will be deleted. - The SKILL.md references system asset paths (/System/Library/AssetsV2) — those are SIP-controlled and could have side effects; the doc warns about SIP but be cautious. - If you install the skill from the author's GitHub, inspect that repository yourself before cloning. Prefer running scans only (no-delete mode) initially, and back up any data you cannot afford to lose. If you want this skill to be safer: require explicit user confirmation for every deletion (including 'unavailable' items) or disable autonomous invocation for this skill.

Like a lobster shell, security has layers — review code before you run it.

latestvk97dbt1abekaqxhv4kznnjf4xd832gq9
190downloads
0stars
2versions
Updated 22h ago
v1.0.1
MIT-0

iOS 开发磁盘清理

扫描 iOS 开发相关的磁盘占用,按类别汇总,每类展示最大的 5 项及最近使用时间,供用户选择删除。

执行流程

依次扫描以下 8 个类别,每类输出汇总大小 + Top 5 明细表。全部扫描完后,汇总输出总表供用户决策。

1. Simulator Runtimes(模拟器系统镜像)~10-55GB

两个存储位置,都需要检查:

# 列出已注册的 runtime 及状态
xcrun simctl runtime list

# MobileAsset 位置(macOS 自动下载,含孤立残留)
du -sh /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/*/ 2>/dev/null | sort -rh | head -5

# Xcode 下载位置(cryptexes 磁盘镜像)
du -sh /Library/Developer/CoreSimulator/Volumes/* 2>/dev/null | sort -rh | head -5
du -sh /Library/Developer/CoreSimulator/Profiles/Runtimes/* 2>/dev/null | sort -rh | head -5

删除命令

xcrun simctl runtime delete 'iOS XX.X'

注意/System/ 下的 asset 受 SIP 保护,simctl runtime delete 可能无法清理孤立 asset。

2. Simulator Devices(模拟器设备数据)~1-10GB

# 列出所有设备(含 unavailable)
xcrun simctl list devices

# 各设备数据目录大小(Top 5)
du -sh ~/Library/Developer/CoreSimulator/Devices/*/data/ 2>/dev/null | sort -rh | head -5
# 对应 UUID 查设备名
# xcrun simctl list devices | grep <UUID前8位>

删除命令

# 重置单个设备(清数据,保留设备)
xcrun simctl erase <UUID>

# 删除单个设备
xcrun simctl delete <UUID>

# 批量删除所有 unavailable 设备
xcrun simctl delete unavailable

禁止 直接 rm -rf ~/Library/Developer/CoreSimulator/Devices/<UUID>/,必须用 simctl delete

3. CocoaPods 缓存 ~5-15GB

# 总大小
du -sh ~/Library/Caches/CocoaPods/ 2>/dev/null

# 各 Pod 缓存大小(Top 5)
du -sh ~/Library/Caches/CocoaPods/Pods/*/ 2>/dev/null | sort -rh | head -5

删除命令

# 清理全部缓存(下次 pod install 会重新下载)
pod cache clean --all

# 或直接删除
rm -rf ~/Library/Caches/CocoaPods/

4. iOS DeviceSupport(真机调试符号)~3-10GB

# 每个 iOS 版本的符号文件大小 + 最近访问时间
for dir in ~/Library/Developer/Xcode/iOS\ DeviceSupport/*/; do
  size=$(du -sh "$dir" 2>/dev/null | cut -f1)
  atime=$(stat -f '%Sa' -t '%Y-%m-%d' "$dir" 2>/dev/null)
  name=$(basename "$dir")
  echo "$size|$atime|$name"
done | sort -t'|' -k1 -rh | head -5 | column -t -s'|'

展示时标注 iOS 版本号,用户可根据不再使用的版本决定删除。删除后连接对应版本真机会重新下载符号。

删除命令

rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/<版本目录>

5. DerivedData(编译缓存)~2-20GB

# 各项目大小 + 最近修改时间
for dir in ~/Library/Developer/Xcode/DerivedData/*/; do
  size=$(du -sh "$dir" 2>/dev/null | cut -f1)
  mtime=$(stat -f '%Sm' -t '%Y-%m-%d' "$dir" 2>/dev/null)
  name=$(basename "$dir")
  echo "$size|$mtime|$name"
done | sort -t'|' -k1 -rh | head -5 | column -t -s'|'

全部可安全删除,下次编译自动重建(会增加首次编译时间)。

删除命令

# 删除单个项目缓存
rm -rf ~/Library/Developer/Xcode/DerivedData/<项目名>/

# 清空全部
rm -rf ~/Library/Developer/Xcode/DerivedData/*

6. Archives(归档包)~0-10GB

# 各归档大小 + 日期
du -sh ~/Library/Developer/Xcode/Archives/*/*/ 2>/dev/null | sort -rh | head -5

已上传到 App Store 的可安全删除,未上传的需确认。

删除命令

rm -rf ~/Library/Developer/Xcode/Archives/<日期>/<归档名>.xcarchive

7. SPM 缓存(Swift Package Manager)~0-2GB

du -sh ~/Library/Caches/org.swift.swiftpm/ 2>/dev/null
du -sh ~/Library/Developer/Xcode/DerivedData/*/SourcePackages/ 2>/dev/null | sort -rh | head -5

删除命令

rm -rf ~/Library/Caches/org.swift.swiftpm/

8. Caches & Logs(其他缓存和日志)

# CoreSimulator 缓存
du -sh ~/Library/Developer/CoreSimulator/Caches/ 2>/dev/null

# Xcode 日志和历史
du -sh ~/Library/Developer/Xcode/UserData/IDB/ 2>/dev/null
du -sh ~/Library/Developer/Xcode/UserData/IDEEditorInteractivityHistory/ 2>/dev/null

# SwiftUI Previews 缓存
du -sh ~/Library/Developer/Xcode/UserData/Previews/ 2>/dev/null

# Documentation 缓存
du -sh ~/Library/Developer/Xcode/DocumentationCache/ 2>/dev/null

# Xcode 缓存
du -sh ~/Library/Caches/com.apple.dt.Xcode/ 2>/dev/null

删除命令

rm -rf ~/Library/Developer/CoreSimulator/Caches/*
rm -rf ~/Library/Developer/Xcode/UserData/IDB/*
rm -rf ~/Library/Developer/Xcode/DocumentationCache/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*

Unavailable 自动清理

扫描阶段发现以下 unavailable 项时,直接执行清理(无需用户确认,因为 unavailable 项已无法使用):

# 1. 删除所有 unavailable 模拟器设备(runtime 已卸载的残留设备)
xcrun simctl delete unavailable

# 2. 删除 unavailable runtime(已注册但磁盘镜像缺失的 runtime)
# 先检查是否有 unavailable runtime
xcrun simctl runtime list | grep -i "unavailable\|not available"
# 如果有,逐个删除
xcrun simctl runtime delete <identifier>

清理完 unavailable 后再进入汇总扫描流程。

输出格式

第一步:扫描 + 汇总表

扫描完成后,输出汇总表:

| #  | 类别                | 总大小  | 可安全清理 | 建议 |
|----|---------------------|---------|-----------|------|
| 1  | Simulator Runtimes  | XX GB   | XX GB     | ...  |
| 2  | Simulator Devices   | XX GB   | XX GB     | ...  |
| 3  | CocoaPods Cache     | XX GB   | 全部      | ...  |
| 4  | iOS DeviceSupport   | XX GB   | XX GB     | ...  |
| 5  | DerivedData         | XX GB   | 全部      | ...  |
| 6  | Archives            | XX GB   | XX GB     | ...  |
| 7  | SPM Cache           | XX GB   | 全部      | ...  |
| 8  | Caches & Logs       | XX GB   | 全部      | ...  |
|    | **合计**            | **XX GB** |         |      |

然后逐类列出 Top 5 明细,等用户选择要清理的类别。

第二步:执行清理 + 汇报效果

用户确认后执行清理。清理完成后必须汇报效果

| 类别              | 清理前  | 清理后  | 释放空间 |
|-------------------|---------|---------|---------|
| Unavailable 设备  | XX GB   | -       | XX GB   |
| CocoaPods Cache   | XX GB   | 0 B     | XX GB   |
| ...               | ...     | ...     | ...     |
| **合计释放**      |         |         | **XX GB** |

删除方式安全规则

以下类别必须使用专有命令删除,禁止 rm -rf

类别必须使用的命令禁止操作
Simulator Devicesxcrun simctl delete <UUID>rm -rf ~/Library/Developer/CoreSimulator/Devices/<UUID>/
Simulator Runtimesxcrun simctl runtime delete 'iOS XX.X'rm -rf /Library/Developer/CoreSimulator/...
CocoaPods Cachepod cache clean --allrm -rf ~/Library/Caches/CocoaPods/两种均可

其他类别(DerivedData / DeviceSupport / Archives / SPM Cache / Caches & Logs)可安全使用 rm -rf,但必须等用户确认后再执行

其他注意事项

  • DerivedData / CocoaPods Cache / SPM Cache 全部可安全删除,代价是下次编译/install 变慢
  • iOS DeviceSupport 删除后连接对应版本真机会自动重新下载,耗时几分钟
  • Archives 未上传到 App Store 的需确认后再删
  • Simulator Runtimes 的 /System/ 路径受 SIP 保护,需提示用户

Comments

Loading comments...