Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

swift-code-reviewerSwift 代码 reviewer

Agent Skill

swift-code-reviewer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

470

周安装

20

GitHub Stars

22

下载量

165
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:swift-code-reviewer(Swift 代码 reviewer)
来源仓库:https://github.com/viniciuscarvalho/swift-code-reviewer-skill
仓库路径:skills/swift-code-reviewer
安装命令:
npx skills add https://github.com/viniciuscarvalho/swift-code-reviewer-skill --skill swift-code-reviewer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/viniciuscarvalho/swift-code-reviewer-skill --skill swift-code-reviewer

简介

swift-code-reviewer 用于查找、检索和筛选相关信息,适合快速定位内容。

  • 适用于关键词搜索、任务场景匹配或来源线索筛选等研究检索需求。
  • 通过 npx skills add 命令从 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 可结合来源仓库和安装命令进一步核验实际功能和调用方式。

SKILL.md

Swift/SwiftUI Code Review Skill

Multi-layer review covering Swift 6+ concurrency, SwiftUI patterns, performance, security, architecture, and project-specific standards. Reads .claude/CLAUDE.md and outputs Critical/High/Medium/Low severity findings with file:line references and before/after code examples.

Workflow

Phase 1 — Context Gathering

  1. Try to load .claude/CLAUDE.md.

- If missing: add a note to the report — *"No project standards file found — review uses default Apple guidelines"* — then continue.

  1. Obtain the changeset: git diff, git diff --cached, or gh pr diff <n>.

- If diff is empty: stop and ask the user to specify files, a PR number, or a directory.

  1. Read each changed file plus key related files (imports, protocols it conforms to, corresponding test file if present).

Phase 2 — Analysis

For each category, load the reference file before writing findings:

  1. Swift Quality — concurrency, error handling, optionals, naming → references/swift-quality-checklist.md; for concurrency findings also read skills/swift-concurrency/references/sendable.md and actors.md
  2. SwiftUI Patterns — property wrappers, state management, deprecated APIs → references/swiftui-review-checklist.md; for wrapper selection read skills/swiftui-expert-skill/references/state-management.md
  3. Performance — view body cost, ForEach identity, lazy loading, retain cycles → references/performance-review.md
  4. Security — force unwraps, Keychain vs UserDefaults, input validation, no secrets in logs → references/security-checklist.md
  5. Architecture — MVVM/MVI/TCA compliance, DI, testability → references/architecture-patterns.md
  6. Project Standards — validate against .claude/CLAUDE.md rules → references/custom-guidelines.md

For test file findings, consult skills/swift-testing/references/test-organization.md. For navigation/routing findings, consult skills/swiftui-ui-patterns/references/navigationstack.md.

Phase 3 — Report

Group findings by file → sort by severity within each file → write prioritized action items.

Severity: Critical (crash/data race/security hole) · High (anti-pattern/major arch violation) · Medium (quality/maintainability) · Low (style/suggestion).

Include one-sentence positive feedback where code is notably well-written. Never pad with generic praise.

Concrete Finding Examples

Force Unwrap → guard let (Critical)

LoginViewModel.swift:89 — Current:

let user = repository.currentUser!

Finding: crashes if currentUser is nil (e.g., after sign-out race condition).

Fix:

guard let user = repository.currentUser else {
    logger.error("currentUser nil — aborting login flow")
    return
}

Missing @MainActor on UI-bound ViewModel (High)

FeedViewModel.swift:12 — Current:

class FeedViewModel: ObservableObject {
    @Published var posts: [Post] = []

    func load() async {
        posts = try? await api.fetchPosts()  // ⚠️ mutates @Published off main thread
    }
}

Finding: @Published mutations must happen on the main actor in Swift 6 strict concurrency; this is a data race.

Fix:

@MainActor
@Observable
final class FeedViewModel {
    var posts: [Post] = []

    func load() async throws {
        posts = try await api.fetchPosts()  // safe: whole class is @MainActor-isolated
    }
}

Also migrate from ObservableObject/@Published to @Observable (iOS 17+) — see skills/swiftui-expert-skill/references/state-management.md.

Output Format

# Code Review — <scope>

## Summary
Files: N | Critical: N | High: N | Medium: N | Low: N

## <Filename.swift>

[Severity] **<Category>** (line N)
Current: `<problematic snippet>`
Fix: <explanation + corrected snippet>

## Positive Observations
...

## Prioritized Action Items
- [Must fix] ...
- [Should fix] ...
- [Consider] ...

Full templates and severity classification: references/feedback-templates.md.

Companion Skills

Full reference tables (all files, when to consult each): references/companion-skills.md.

SkillUse for
skills/swiftui-expert-skill/SwiftUI state, Liquid Glass, macOS patterns, accessibility
skills/swift-concurrency/Actors, Sendable, Swift 6 migration, async/await
skills/swift-testing/Swift Testing framework, test doubles, snapshots
skills/swift-expert/Swift 6+ patterns, protocols, memory, SPM
skills/swiftui-ui-patterns/Navigation, sheets, theming, async state, grids

Platform Commands

# GitHub PR
gh pr diff <n>
gh pr view <n> --json files,comments

# GitLab MR
glab mr diff <n>
glab mr view <n> --json

# Local changes
git diff             # unstaged
git diff --cached    # staged
git diff HEAD~1      # last commit
git diff -- path/to/file.swift

Reference Files

  • references/review-workflow.md — detailed process, diff parsing, git commands
  • references/feedback-templates.md — output templates, severity classification
  • references/swift-quality-checklist.md — Swift 6+, concurrency, optionals, naming
  • references/swiftui-review-checklist.md — property wrappers, state, modern APIs
  • references/performance-review.md — view optimization, ForEach, resource management
  • references/security-checklist.md — input validation, Keychain, network security
  • references/architecture-patterns.md — MVVM/MVI/TCA, DI, testability
  • references/custom-guidelines.md — parsing .claude/CLAUDE.md
  • references/companion-skills.md — full companion skill tables

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.13%
按下载量换算56

Claude

30.24%
按下载量换算50

Cursor

19.13%
按下载量换算32

Gemini CLI

8.23%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills