← 返回 Skills 市场
Swiftui Code Review
作者
Kevin Anderson
· GitHub ↗
· v1.2.1
· MIT-0
172
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install swiftui-code-review
功能描述
Reviews SwiftUI code for view composition, state management, performance, and accessibility. Use when reviewing .swift files containing SwiftUI views, proper...
使用说明 (SKILL.md)
SwiftUI Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| View extraction, modifiers, body complexity | references/view-composition.md |
| @State, @Binding, @Observable, @Bindable | references/state-management.md |
| LazyStacks, AnyView, ForEach, identity | references/performance.md |
| VoiceOver, Dynamic Type, labels, traits | references/accessibility.md |
Gates (review workflow)
Complete in order; do not skip ahead.
- Anchor scope — Pass when: every reviewed file is listed as a repo-relative
.swiftpath (or the review explicitly states “none opened / N/A” with reason). - Reference before critique — Pass when: for any non-trivial body, modifier chain, or wrapper-ownership question, you have opened the matching
references/*.mdrow from the table above or you state “not needed” with one line why. - Evidence-bound findings — Pass when: each substantive issue includes
[FILE:LINE](or a bounded line range) before recommendations; symbols/snippets may supplement but not replace the location anchor; no finding that rests only on “typical SwiftUI” without pointing at this code.
Review Checklist
- View body under 10 composed elements (extract subviews)
- Modifiers in correct order (padding before background)
- @StateObject for view-owned objects, @ObservedObject for passed objects
- @Bindable used for two-way bindings to @Observable (iOS 17+)
- LazyVStack/LazyHStack for scrolling lists with 50+ items
- No AnyView (use @ViewBuilder or generics instead)
- ForEach uses stable Identifiable IDs (not array indices)
- All images/icons have accessibilityLabel
- Custom controls have accessibilityAddTraits(.isButton)
- Dynamic Type supported (no fixed font sizes)
- .task modifier for async work (not onAppear + Task)
When to Load References
- Complex view bodies or modifier chains -> view-composition.md
- Property wrapper usage (@State, @Observable) -> state-management.md
- List performance or view identity issues -> performance.md
- VoiceOver or accessibility implementation -> accessibility.md
Review Questions
- Could this large view body be split into smaller, reusable Views?
- Is modifier order intentional? (padding -> background -> frame)
- Is @StateObject/@ObservedObject usage correct for ownership?
- Could LazyVStack improve this ScrollView's performance?
- Would VoiceOver users understand this interface?
安全使用建议
This skill appears coherent and safe: it is instruction-only, requests no credentials, and focuses on reviewing .swift files. Before installing or using it, ensure you provide only the intended source files (the skill expects repo-relative .swift paths and will reference file:line locations), and confirm the agent/platform will not implicitly grant the skill access to your entire repository or other secrets. Also note the reference guidance calls out iOS 17 features (e.g., @Observable/@Bindable) — verify those recommendations match your target platform. If you need stronger guarantees, review the SKILL.md and references yourself to confirm nothing in the guidance conflicts with your project standards.
功能分析
Type: OpenClaw Skill
Name: swiftui-code-review
Version: 1.2.1
The skill bundle is a well-structured tool for performing SwiftUI code reviews. It contains clear instructions in SKILL.md and comprehensive reference guides in the references/ directory covering accessibility, performance, and state management. There is no evidence of malicious intent, data exfiltration, or prompt injection; all code snippets and instructions are strictly aligned with the stated purpose of improving SwiftUI code quality.
能力评估
Purpose & Capability
Name/description (SwiftUI code review) align with the included instructions and reference docs. The skill asks for repo-relative .swift paths and provides domain-specific guidance; it does not request unrelated binaries, secrets, or platform access.
Instruction Scope
SKILL.md stays within a code-review workflow: gating, referencing local reference docs, and requiring evidence-bound findings with file:line anchors. It does not instruct the agent to read arbitrary system files, contact external endpoints, or exfiltrate data. It does assume the agent will be given or can open the target .swift files for review.
Install Mechanism
No install spec and no code files that would be written to disk. Instruction-only skills are low-risk for installation behavior.
Credentials
No environment variables, credentials, or config paths are required. The references and instructions are self-contained and appropriate for the stated purpose.
Persistence & Privilege
always is false and the skill is user-invocable; disable-model-invocation is false (normal). The skill does not request persistent system-wide changes or cross-skill configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install swiftui-code-review - 安装完成后,直接呼叫该 Skill 的名称或使用
/swiftui-code-review触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.1
- Added a "Gates (review workflow)" section to clarify step-by-step review process and requirements for findings.
- Emphasized evidence-bound, file+line findings for review comments.
- No other checklist or reference changes.
v1.2.0
- Added detailed review checklist covering key SwiftUI best practices for view composition, state management, performance, and accessibility.
- Included quick reference table linking to supporting documentation for common review topics.
- Provided guidance on when to consult reference materials based on code patterns.
- Listed essential review questions to guide consistent code evaluation.
元数据
常见问题
Swiftui Code Review 是什么?
Reviews SwiftUI code for view composition, state management, performance, and accessibility. Use when reviewing .swift files containing SwiftUI views, proper... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 172 次。
如何安装 Swiftui Code Review?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install swiftui-code-review」即可一键安装,无需额外配置。
Swiftui Code Review 是免费的吗?
是的,Swiftui Code Review 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Swiftui Code Review 支持哪些平台?
Swiftui Code Review 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Swiftui Code Review?
由 Kevin Anderson(@anderskev)开发并维护,当前版本 v1.2.1。
推荐 Skills