ios-self-improve

v1.1.0

iOS 开发自改进技能 - Swift/ObjC 规范、审核合规、崩溃预防、自动自检、Xcode、UIKit、SwiftUI

1· 117·1 current·1 all-time
byJoe.Lee@joelee09

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for joelee09/ios-self-improve.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "ios-self-improve" (joelee09/ios-self-improve) from ClawHub.
Skill page: https://clawhub.ai/joelee09/ios-self-improve
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-self-improve

ClawHub CLI

Package manager switcher

npx clawhub@latest install ios-self-improve
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name, description, and included files all describe an iOS-focused self-improvement / static-checking extension. The declared dependency on developer-self-improve-core and the script calls into that core for rule generation are coherent with the stated purpose.
Instruction Scope
SKILL.md describes pre_answer/post_answer/periodic checks and states it reads platform-specific long-term memory and proposes rules but does not auto-modify memory. The included shell script implements local static checks and will call the dependency's script when generating proposals. This scope is appropriate, but the skill's runtime behavior depends on the core dependency's implementation and any long-term-memory access handled by the core; audit that core for memory access behavior if you are concerned about data usage.
Install Mechanism
There is no external install spec (instruction-only skill) and the only shipped code is a local shell script. The script creates a rules file and logs folder inside the skill directory on init — expected for this type of skill. No network downloads or remote install URLs are present.
Credentials
The skill declares no environment variables or external credentials. It requires standard utilities (bash/grep/find) which the script uses. It reads a relative config from a sibling dependency (../developer-self-improve-core/config/config.yaml) — this is expected but does require trusting that dependency.
Persistence & Privilege
No special privileges requested (always:false). The skill writes only to its own directories (rules/, logs/) during init and otherwise reads config files; this is appropriate. It will invoke the dependency's script if present, so privilege/behavior depends on that dependency, not on this skill having elevated platform privileges.
Assessment
This skill appears internally coherent and does what it claims: local static checks and iOS rule proposals that rely on a separate core skill. Before installing, review and/or install and audit the required dependency (developer-self-improve-core), because this skill will read its config and invoke its script — if that dependency were malicious or compromised it could change behavior. Also note the skill will create a rules file and logs directory under its own folder on init; this is normal but means it writes to its own install path. If you want additional assurance, inspect the dependency's scripts and confirm there are no network calls or unexpected file accesses.

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

latestvk97asm9jv358jytkpj2ay40ybn84h6q6
117downloads
1stars
3versions
Updated 2w ago
v1.1.0
MIT-0

📱 ios-self-improve

iOS 开发者自改进技能 - 依赖 developer-self-improve-core 安全闭环


⚠️ 依赖说明

本 Skill 必须与 developer-self-improve-core 配合使用:

# 先安装核心技能
clawhub install developer-self-improve-core

# 再安装 iOS 扩展技能
clawhub install ios-self-improve

依赖关系:

  • ✅ 所有自改进操作(规则生成、清洗建议)均由 developer-self-improve-core 执行
  • ✅ 本 Skill 仅提供 iOS 领域知识与自检逻辑
  • ✅ 遵循"AI 提议、人类终审"原则,不自动修改任何记忆

🎯 核心功能

1. iOS 全栈知识覆盖

领域覆盖内容
语言Swift 5.x, Objective-C
UI 框架UIKit, SwiftUI
工具Xcode, Instruments, TestFlight
生态App Store, 审核,推送,Widget

2. 内置领域规则(15 条)

基础规范

  1. iOS 系统版本适配规范

    • 最低版本兼容判断
    • API 废弃判断
    • 多版本适配技巧
  2. UIKit 导航栏最佳实践

    • 过渡动画处理
    • scrollEdgeAppearance 配置
    • 样式统一
  3. AutoLayout 规则

    • 约束编写规范
    • 冲突排查
    • 屏幕适配
    • 多设备兼容
  4. 内存管理规范

    • ARC 使用技巧
    • 循环引用排查
    • 内存泄漏预防
    • 弱引用/无主引用使用场景
  5. 代码风格与格式规范

    • SwiftLint 标准
    • Swift/ObjC 编码规范
    • 注释规范

风险预防

  1. 常见崩溃预防规则

    • 数组越界
    • 空指针
    • KVO/通知使用不当
    • 线程安全问题
  2. SwiftUI 布局与生命周期规范

    • 视图渲染
    • 状态管理
    • 导航适配
  3. 应用生命周期管理

    • 前台/后台/挂起/终止状态处理
    • 场景切换适配
  4. Swift Concurrency 异步编程规范

    • Task/Actor 使用
    • 死锁预防
    • 数据竞争规避

审核与合规

  1. 苹果审核规范

    • 隐私权限配置
    • 功能合规
    • 文案规范
    • 被拒问题应对
  2. 权限配置与隐私规范

    • Info.plist 配置
    • 隐私描述编写
    • 权限申请逻辑
  3. 沙盒文件读写规范

    • 目录划分
    • 数据存储安全
    • 文件权限管理

适配与体验

  1. 暗黑模式(Dark Mode)适配规范

    • 颜色适配
    • 图片适配
    • 控件适配
  2. 本地化与多语言适配规范

    • 字符串本地化
    • 界面适配
    • 区域设置
  3. 推送通知、WidgetKit 开发规范

    • 配置流程
    • 适配要求
    • 审核要点

3. iOS 专属自检逻辑(11 条)

每轮回答后自动检查:

#检查项违规示例
1导航栏过渡闪烁、scrollEdgeAppearance 未处理导航栏样式不一致
2苹果审核规范、隐私权限缺失Info.plist 缺少 NSPhotoLibraryUsageDescription
3潜在崩溃风险array[0] 未检查 count
4内存泄漏、循环引用[weak self] 缺失
5过时/不兼容 API使用已废弃的 UIWebView
6AutoLayout 约束冲突约束缺失或矛盾
7SwiftUI 生命周期错误@State 使用不当
8异步代码死锁、数据竞争主线程阻塞
9沙盒违规读写访问非授权目录
10Info.plist 配置错误缺少必要配置
11暗黑模式适配缺失硬编码颜色

🔄 触发时机

时机执行内容频率
pre_answer检索长期记忆中 iOS 专属规则,自动规避历史错误每轮回答前
post_answer执行 iOS 专属自检逻辑,生成领域规则草案每轮回答后
periodic联动 developer-self-improve-core,扫描 iOS 领域规则累计 10 轮对话或每周

⚙️ 约束条件

1. 依赖约束

  • ✅ 严格依赖 developer-self-improve-core
  • ✅ 所有规则草案、清洗建议均需经用户终审
  • ✅ 不自动写入/修改/删除长期记忆

2. 优先级排序

用户指令 > 长期记忆(iOS 专属规则) > AI 临时草案

3. 输出规范

  • ✅ 代码输出必须遵循苹果官方文档
  • ✅ 遵循行业最佳实践
  • ✅ 适配最新正式版 iOS 系统
  • ✅ 兼顾主流旧版本兼容

4. 依据验证

禁止生成的内容:

  • ❌ 主观推断、未验证的 iOS 规则
  • ❌ 一次性特例的泛化
  • ❌ 来源不明的"自创规则"

允许生成的草案(需满足):

  • ✅ 用户明确指出的错误
  • ✅ ≥2 次可复现模式
  • ✅ 可验证硬错误

5. Token 优化

  • ✅ 长期记忆中 iOS 规则保持极简结构化
  • ✅ 优先加载与当前开发场景匹配的条目
  • ✅ 不加载全部规则

6. 追溯与回滚

  • ✅ 所有自检结果可追溯
  • ✅ 规则草案可追溯
  • ✅ 操作记录可追溯
  • ✅ 支持回滚至历史版本
  • ✅ 规则冲突时以最新人工确认规则优先

📝 规则草案格式(与 developer-self-improve-core 一致)

### 【规则 ID】auto_ios_xxxx
### 【场景】iOS 开发场景(≤20 字)
### 【问题/模式】明确描述的问题或可复现模式
### 【建议规则】极简一句话,可直接执行
### 【依据】用户明确指出/重复模式/可验证错误
### 【可信度】高/中/低
### 【建议层级】长期/中期
### 【领域】iOS/具体子领域

🚀 使用示例

示例 1: 导航栏配置问题

用户提问:

导航栏在滚动时样式不一致,如何处理?

AI 回答前:

pre_answer: 检索长期记忆...
命中规则:【auto_ios_nav_001】导航栏必须配置 scrollEdgeAppearance
行动:自动应用该规则

AI 回答后:

post_answer: 执行 iOS 自检...
检查项:导航栏过渡闪烁、scrollEdgeAppearance 未处理
结果:✓ 已处理

示例 2: 循环引用问题

用户代码:

// ❌ 错误示例
self.completionHandler = {
    self.updateUI()  // 循环引用
}

AI 自检:

post_answer: 执行 iOS 自检...
检查项:内存泄漏、循环引用
问题:[weak self] 缺失
生成草案:
【规则 ID】auto_ios_memory_001
【场景】闭包内存管理
【问题/模式】闭包内使用 self 未加 [weak self]
【建议规则】闭包内使用 self 必须添加 [weak self] 或 [unowned self]
【依据】可验证硬错误
【可信度】低
【建议层级】长期
【领域】iOS/内存管理

示例 3: 审核规范问题

用户提问:

App 被拒了,原因是隐私权限描述不清晰

AI 自检:

post_answer: 执行 iOS 自检...
检查项:苹果审核规范、隐私权限缺失
问题:Info.plist 隐私描述不规范
生成草案:
【规则 ID】auto_ios_review_001
【场景】App Store 审核
【问题/模式】隐私权限描述不清晰导致被拒
【建议规则】所有隐私权限必须在 Info.plist 中提供清晰的使用场景描述
【依据】用户明确指出的错误
【可信度】高
【建议层级】长期
【领域】iOS/审核规范

🔧 脚本命令

初始化

./scripts/ios-self-improve.sh init

iOS 专属自检

./scripts/ios-self-improve.sh self-check "代码内容"

加载 iOS 规则

./scripts/ios-self-improve.sh load-rules "当前场景"

生成 iOS 规则草案

./scripts/ios-self-improve.sh propose "内容" "场景" "领域"

📖 更多文档


🤝 贡献

欢迎提交 Issue 和 Pull Request!

作者: lijiujiu
许可证: MIT


📄 许可证

MIT License

Comments

Loading comments...