swift-code-reviewer-skill 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/CONTRIBUTING.md +86 -3
- package/README.md +315 -118
- package/bin/install.js +71 -90
- package/bin/lib/agents.js +134 -0
- package/bin/lib/prompt.js +58 -0
- package/core/swift-code-reviewer.core.md +281 -0
- package/examples/README.md +35 -0
- package/examples/claude-tca-review.md +140 -0
- package/examples/codex-async-algorithms-review.md +208 -0
- package/examples/gemini-isowords-review.md +207 -0
- package/package.json +6 -1
- package/templates/agents/claude/swift-code-reviewer.md +78 -0
- package/templates/agents/codex/swift-code-reviewer.md +211 -0
- package/templates/agents/gemini/swift-code-reviewer.md +211 -0
- package/templates/agents/kiro/swift-code-reviewer.md +218 -0
- package/templates/commands/claude/review.md +56 -0
- package/templates/commands/gemini/review.toml +15 -0
package/README.md
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
[](https://github.com/sponsors/Viniciuscarvalho)
|
|
4
4
|
[](https://www.npmjs.com/package/swift-code-reviewer-skill)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Multi-layer Swift/SwiftUI code review for Claude Code, OpenAI Codex CLI, Google Gemini CLI, and Kiro — with spec adherence, agent loop feedback, and project-standards validation.
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
---
|
|
7
11
|
|
|
8
12
|
## Quick Start
|
|
9
13
|
|
|
@@ -13,185 +17,268 @@ A code review skill for [Claude Code](https://docs.anthropic.com/en/docs/claude-
|
|
|
13
17
|
npx skills add Viniciuscarvalho/swift-code-reviewer-skill
|
|
14
18
|
```
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npx swift-code-reviewer-skill@latest
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### 2. Add the review agent to your project (optional)
|
|
20
|
+
### 2. Scaffold the review agent into your project
|
|
23
21
|
|
|
24
22
|
```bash
|
|
25
23
|
cd ~/Projects/YourApp
|
|
26
24
|
npx swift-code-reviewer-skill init
|
|
27
25
|
```
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
The interactive prompt lets you choose which agent(s) to install:
|
|
30
28
|
|
|
31
29
|
```
|
|
32
|
-
|
|
33
|
-
agents/
|
|
34
|
-
|
|
30
|
+
? Which agent(s) should the review guide be installed for?
|
|
31
|
+
◉ Claude Code (.claude/agents/ + .claude/commands/)
|
|
32
|
+
○ OpenAI Codex CLI (swift-code-reviewer.md at repo root)
|
|
33
|
+
○ Google Gemini CLI (swift-code-reviewer.md + .gemini/commands/review.toml)
|
|
34
|
+
○ Kiro (.kiro/steering/swift-code-reviewer.md, fileMatch: **/*.swift)
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
#### CI / scripted install (no prompt)
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
```bash
|
|
40
|
+
npx swift-code-reviewer-skill init --agent claude # Claude only (default in non-TTY)
|
|
41
|
+
npx swift-code-reviewer-skill init --all # all agents at once
|
|
42
|
+
npx swift-code-reviewer-skill init --agent codex,gemini # specific subset
|
|
43
|
+
npx swift-code-reviewer-skill init --dry-run # preview without writing files
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 3. Run a review
|
|
40
47
|
|
|
41
48
|
```
|
|
42
|
-
|
|
49
|
+
/review # Claude: staged + unstaged Swift changes
|
|
50
|
+
@swift-code-reviewer # Claude: invoke agent directly
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
For Gemini: `/review` (via `.gemini/commands/review.toml`).
|
|
54
|
+
For Codex and Kiro: ask the agent to review your Swift changes directly.
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
---
|
|
49
57
|
|
|
50
|
-
|
|
58
|
+
## Choose Your Agent
|
|
51
59
|
|
|
52
|
-
|
|
60
|
+
| Agent | Install target | `/review` command | Auto-activates | Project standards file |
|
|
61
|
+
| --------------- | --------------------------------------- | :---------------: | :-------------: | ------------------------------------- |
|
|
62
|
+
| **Claude Code** | `.claude/agents/swift-code-reviewer.md` | ✅ | — | `.claude/CLAUDE.md` |
|
|
63
|
+
| **Codex CLI** | `swift-code-reviewer.md` (root) | ❌ | — | `AGENTS.md` |
|
|
64
|
+
| **Gemini CLI** | `swift-code-reviewer.md` (root) | ✅ | — | `GEMINI.md` |
|
|
65
|
+
| **Kiro** | `.kiro/steering/swift-code-reviewer.md` | — | ✅ `**/*.swift` | `.kiro/steering/project-standards.md` |
|
|
53
66
|
|
|
54
|
-
|
|
55
|
-
Review this PR
|
|
56
|
-
Review LoginView.swift
|
|
57
|
-
Review my uncommitted changes
|
|
58
|
-
Review all ViewModels in the Features folder
|
|
59
|
-
Check if this follows our coding standards
|
|
60
|
-
```
|
|
67
|
+
---
|
|
61
68
|
|
|
62
|
-
|
|
69
|
+
## Capability Matrix
|
|
70
|
+
|
|
71
|
+
| Feature | Claude | Codex | Gemini | Kiro |
|
|
72
|
+
| ------------------------------- | :-----: | :--------: | :--------: | :--------: |
|
|
73
|
+
| Phase 0 — Spec adherence | ✅ | ✅ | ✅ | ✅ |
|
|
74
|
+
| Phase 1 — Swift quality | ✅ | ✅ | ✅ | ✅ |
|
|
75
|
+
| Phase 2 — SwiftUI patterns | ✅ | ✅ | ✅ | ✅ |
|
|
76
|
+
| Phase 3 — Performance | ✅ | ✅ | ✅ | ✅ |
|
|
77
|
+
| Phase 4 — Security | ✅ | ✅ | ✅ | ✅ |
|
|
78
|
+
| Phase 5 — Architecture | ✅ | ✅ | ✅ | ✅ |
|
|
79
|
+
| Phase 6 — Project standards | ✅ | ✅ | ✅ | ✅ |
|
|
80
|
+
| Phase 2.5 — Agent loop feedback | ✅ | ✅ | ✅ | ✅ |
|
|
81
|
+
| Companion skill cross-refs | ✅ full | ⚡ inlined | ⚡ inlined | ⚡ inlined |
|
|
82
|
+
| `/review` slash command | ✅ | ❌ | ✅ | — |
|
|
83
|
+
| Auto-activates on Swift files | — | — | — | ✅ |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Highlights
|
|
88
|
+
|
|
89
|
+
- **Seven-layer analysis** — spec adherence, Swift 6+ concurrency, SwiftUI patterns, performance, security, architecture, and project standards
|
|
90
|
+
- **Agent loop feedback** — detects recurring patterns and drafts `.claude/CLAUDE.md` rules to prevent them in future AI-generated code
|
|
91
|
+
- **Spec-first** — validates every acceptance criterion in the PR description against the actual diff; flags scope creep and missing implementations
|
|
92
|
+
- **Project-aware** — reads your project's standards file (`.claude/CLAUDE.md`, `AGENTS.md`, or `GEMINI.md`) and flags violations
|
|
93
|
+
- **Four agents, one install** — interactive `init` scaffolds the right files for each agent with idempotent, non-destructive writes
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## How It Works
|
|
63
98
|
|
|
64
99
|
```
|
|
65
|
-
|
|
100
|
+
Phase 1 Context Gathering
|
|
101
|
+
→ gh pr view / glab mr view + git diff + project standards file
|
|
102
|
+
|
|
103
|
+
Phase 2 Analysis (per category)
|
|
104
|
+
0. Spec Adherence — requirement coverage table, scope creep, missing work
|
|
105
|
+
1. Swift Quality — concurrency, optionals, typed throws, naming
|
|
106
|
+
2. SwiftUI Patterns — @Observable, NavigationStack, .task, accessibility
|
|
107
|
+
3. Performance — ForEach identity, Equatable, lazy loading, GeometryReader
|
|
108
|
+
4. Security — Keychain, HTTPS, no secrets in logs
|
|
109
|
+
5. Architecture — MVVM/TCA, DI, testability
|
|
110
|
+
6. Project Standards — custom rules from your project standards file
|
|
111
|
+
|
|
112
|
+
Phase 2.5 Pattern Detection
|
|
113
|
+
→ group findings by rule; flag any rule firing ≥2 times as a recurring pattern
|
|
114
|
+
→ draft directives for your project standards file to prevent recurrence
|
|
115
|
+
|
|
116
|
+
Phase 3 Report
|
|
117
|
+
→ grouped by file, sorted by severity (Critical → High → Medium → Low)
|
|
118
|
+
→ prioritized action items + agent loop feedback
|
|
66
119
|
```
|
|
67
120
|
|
|
68
|
-
|
|
121
|
+
---
|
|
69
122
|
|
|
70
|
-
|
|
123
|
+
## Example Output
|
|
124
|
+
|
|
125
|
+
The following is a representative excerpt from `examples/claude-tca-review.md`, generated
|
|
126
|
+
against [pointfreeco/swift-composable-architecture](https://github.com/pointfreeco/swift-composable-architecture)
|
|
127
|
+
at commit [`d9f965e`](https://github.com/pointfreeco/swift-composable-architecture/commit/d9f965e38a86c78279ff59dfab1754b637f097a2).
|
|
71
128
|
|
|
72
129
|
```markdown
|
|
73
|
-
# Code Review
|
|
130
|
+
# Code Review — FeatureReducer.swift, FeatureView.swift
|
|
74
131
|
|
|
75
132
|
## Summary
|
|
76
133
|
|
|
77
|
-
|
|
134
|
+
Files: 2 | Critical: 0 | High: 2 | Medium: 1 | Low: 1
|
|
78
135
|
|
|
79
|
-
##
|
|
136
|
+
## Spec Adherence
|
|
80
137
|
|
|
81
|
-
|
|
138
|
+
**Source**: inferred from diff
|
|
82
139
|
|
|
83
|
-
|
|
140
|
+
| Requirement | Status | Location |
|
|
141
|
+
| ----------------------------------- | ------------------------------------------- | ----------------------- |
|
|
142
|
+
| State mutations isolated to Reducer | ✅ Implemented | FeatureReducer.swift:34 |
|
|
143
|
+
| View reads only from store | ⚠️ Partial — direct URLSession call in body | FeatureView.swift:78 |
|
|
84
144
|
|
|
85
|
-
|
|
86
|
-
Current: `let user = repository.currentUser!`
|
|
87
|
-
Fix:
|
|
88
|
-
guard let user = repository.currentUser else {
|
|
89
|
-
logger.error("No current user")
|
|
90
|
-
return
|
|
91
|
-
}
|
|
145
|
+
---
|
|
92
146
|
|
|
93
|
-
|
|
94
|
-
Current: `.foregroundColor(.blue)`
|
|
95
|
-
Fix: `.foregroundColor(AppColors.primary)`
|
|
147
|
+
## FeatureView.swift
|
|
96
148
|
|
|
97
|
-
|
|
149
|
+
High **SwiftUI Patterns** (line 78)
|
|
150
|
+
Current: `URLSession.shared.dataTask(with: url) { ... }.resume()`
|
|
151
|
+
Fix: Move network call into the Reducer's Effect. Views in TCA must be
|
|
152
|
+
pure transformations of State — side effects belong in Effects returned
|
|
153
|
+
by the Reducer, not in the view body.
|
|
98
154
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
155
|
+
High **SwiftUI Patterns** (line 12)
|
|
156
|
+
Current: `NavigationView { ... }`
|
|
157
|
+
Fix: Replace with `NavigationStack`. NavigationView is deprecated as of iOS 16.
|
|
102
158
|
|
|
103
|
-
##
|
|
159
|
+
## Positive Observations
|
|
104
160
|
|
|
105
|
-
|
|
106
|
-
| --------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
107
|
-
| **Swift Quality** | Concurrency safety, actor isolation, Sendable, error handling, optionals, access control, naming |
|
|
108
|
-
| **SwiftUI Patterns** | @Observable, state management, property wrappers, NavigationStack, .task, view composition, accessibility |
|
|
109
|
-
| **Performance** | View updates, Equatable, ForEach identity, GeometryReader, lazy loading, memory leaks |
|
|
110
|
-
| **Security** | Keychain, input validation, HTTPS, certificate pinning, API key protection, sensitive data logging |
|
|
111
|
-
| **Architecture** | MVVM/MVI/TCA compliance, dependency injection, code organization, testability |
|
|
112
|
-
| **Project Standards** | `.claude/CLAUDE.md` rules, design system, custom error patterns, testing requirements |
|
|
161
|
+
FeatureReducer.swift correctly uses typed throws and @Sendable closures throughout.
|
|
113
162
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
| Icon | Severity | Action |
|
|
117
|
-
| -------- | -------- | ----------------------- |
|
|
118
|
-
| Critical | Critical | Must fix before merge |
|
|
119
|
-
| High | High | Should fix before merge |
|
|
120
|
-
| Medium | Medium | Fix in current sprint |
|
|
121
|
-
| Low | Low | Consider for future |
|
|
163
|
+
## Prioritized Action Items
|
|
122
164
|
|
|
123
|
-
|
|
165
|
+
- [Must fix] Move URLSession call from view body into Reducer Effect (FeatureView.swift:78)
|
|
166
|
+
- [Should fix] Replace NavigationView with NavigationStack (FeatureView.swift:12)
|
|
167
|
+
- [Consider] Add Equatable conformance to FeatureView for diffing (FeatureView.swift:1)
|
|
124
168
|
|
|
125
|
-
|
|
126
|
-
- Swift 6.0+ | iOS 17+ | macOS 14+ | watchOS 10+ | tvOS 17+ | visionOS 1+
|
|
169
|
+
---
|
|
127
170
|
|
|
128
|
-
##
|
|
171
|
+
## Agent Loop Feedback
|
|
129
172
|
|
|
130
|
-
|
|
173
|
+
### Pattern: NavigationView (2 occurrences)
|
|
131
174
|
|
|
132
|
-
|
|
133
|
-
|
|
175
|
+
**Files**: FeatureView.swift:12, SettingsView.swift:44
|
|
176
|
+
**Suggested rule for .claude/CLAUDE.md**:
|
|
134
177
|
|
|
135
|
-
|
|
178
|
+
> Use `NavigationStack` exclusively. `NavigationView` is deprecated as of iOS 16.
|
|
179
|
+
```
|
|
136
180
|
|
|
137
|
-
|
|
138
|
-
- All dependencies MUST be injected via constructor
|
|
139
|
-
- Views MUST NOT contain business logic
|
|
181
|
+
See [`examples/`](examples/) for three full review reports against real OSS projects.
|
|
140
182
|
|
|
141
|
-
|
|
183
|
+
---
|
|
142
184
|
|
|
143
|
-
|
|
144
|
-
- Use AppFonts enum ONLY
|
|
185
|
+
## Installation
|
|
145
186
|
|
|
146
|
-
|
|
187
|
+
### Primary (recommended)
|
|
147
188
|
|
|
148
|
-
|
|
149
|
-
|
|
189
|
+
```bash
|
|
190
|
+
npx skills add Viniciuscarvalho/swift-code-reviewer-skill
|
|
191
|
+
npx swift-code-reviewer-skill init
|
|
150
192
|
```
|
|
151
193
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
<details>
|
|
155
|
-
<summary>NPX installer (installs skill only)</summary>
|
|
194
|
+
### NPX installer (skill only, no `init`)
|
|
156
195
|
|
|
157
196
|
```bash
|
|
158
197
|
npx swift-code-reviewer-skill
|
|
159
198
|
```
|
|
160
199
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<details>
|
|
164
|
-
<summary>Clone this repository</summary>
|
|
200
|
+
### Clone (for offline or development use)
|
|
165
201
|
|
|
166
202
|
```bash
|
|
167
|
-
git clone https://github.com/Viniciuscarvalho/swift-code-reviewer-skill.git
|
|
203
|
+
git clone https://github.com/Viniciuscarvalho/swift-code-reviewer-skill.git \
|
|
204
|
+
~/.claude/skills/swift-code-reviewer-skill
|
|
168
205
|
```
|
|
169
206
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<details>
|
|
173
|
-
<summary>Update to latest version</summary>
|
|
207
|
+
### Update
|
|
174
208
|
|
|
175
209
|
```bash
|
|
176
210
|
npx swift-code-reviewer-skill@latest
|
|
177
211
|
```
|
|
178
212
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
</details>
|
|
182
|
-
|
|
183
|
-
<details>
|
|
184
|
-
<summary>Uninstall</summary>
|
|
213
|
+
### Uninstall
|
|
185
214
|
|
|
186
215
|
```bash
|
|
187
216
|
npx swift-code-reviewer-skill uninstall
|
|
188
217
|
```
|
|
189
218
|
|
|
190
|
-
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## CLI Reference
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
npx swift-code-reviewer-skill [command] [options]
|
|
225
|
+
|
|
226
|
+
Commands:
|
|
227
|
+
(none) Install the skill to ~/.claude/skills/
|
|
228
|
+
init Scaffold review agent into the current project
|
|
229
|
+
uninstall Remove the skill from ~/.claude/skills/
|
|
230
|
+
help Show help
|
|
231
|
+
|
|
232
|
+
Options for init:
|
|
233
|
+
--agent <name[,name]> Target specific agent(s): claude, codex, gemini, kiro
|
|
234
|
+
--all Install for all supported agents
|
|
235
|
+
--force Overwrite existing files
|
|
236
|
+
--dry-run Preview writes without touching the filesystem
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Configuration
|
|
191
242
|
|
|
192
|
-
|
|
243
|
+
The skill validates your code against a project-specific standards file. The file path differs by agent:
|
|
193
244
|
|
|
194
|
-
|
|
245
|
+
| Agent | Standards file |
|
|
246
|
+
| ----------- | ------------------------------------- |
|
|
247
|
+
| Claude Code | `.claude/CLAUDE.md` |
|
|
248
|
+
| Codex CLI | `AGENTS.md` |
|
|
249
|
+
| Gemini CLI | `GEMINI.md` |
|
|
250
|
+
| Kiro | `.kiro/steering/project-standards.md` |
|
|
251
|
+
|
|
252
|
+
The file is optional — if absent, the skill falls back to Apple's official Swift API Design Guidelines.
|
|
253
|
+
|
|
254
|
+
**Example `.claude/CLAUDE.md`:**
|
|
255
|
+
|
|
256
|
+
```markdown
|
|
257
|
+
# MyApp Standards
|
|
258
|
+
|
|
259
|
+
## Architecture
|
|
260
|
+
|
|
261
|
+
- ViewModels MUST use @Observable (iOS 17+)
|
|
262
|
+
- All dependencies MUST be injected via constructor
|
|
263
|
+
- Views MUST NOT contain business logic
|
|
264
|
+
|
|
265
|
+
## Design System
|
|
266
|
+
|
|
267
|
+
- Use AppColors enum ONLY
|
|
268
|
+
- Use AppFonts enum ONLY
|
|
269
|
+
|
|
270
|
+
## Testing
|
|
271
|
+
|
|
272
|
+
- Minimum coverage: 80%
|
|
273
|
+
- All ViewModels MUST have unit tests
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Companion Skills (Claude)
|
|
279
|
+
|
|
280
|
+
When installed via `npx skills add`, Claude can read supplementary reference files from the
|
|
281
|
+
bundled companion skills for deeper context on specific topics:
|
|
195
282
|
|
|
196
283
|
```
|
|
197
284
|
skills/
|
|
@@ -203,36 +290,146 @@ skills/
|
|
|
203
290
|
└── swiftui-ui-patterns/ ← 32 component references (nav, sheets, grids…)
|
|
204
291
|
```
|
|
205
292
|
|
|
206
|
-
|
|
293
|
+
For Codex, Gemini, and Kiro, the must-load excerpts from these skills are inlined directly
|
|
294
|
+
into the respective wrapper templates — no separate install step needed.
|
|
207
295
|
|
|
208
296
|
### Thanks to the original authors
|
|
209
297
|
|
|
210
|
-
The bundled skills are based on the public Swift/SwiftUI work of:
|
|
211
|
-
|
|
212
298
|
| Author | GitHub |
|
|
213
299
|
| ------------------- | ------------------------------------------ |
|
|
214
300
|
| Antoine van der Lee | [@AvdLee](https://github.com/AvdLee) |
|
|
215
301
|
| Thomas Ricouard | [@Dimillian](https://github.com/Dimillian) |
|
|
216
302
|
| Eduardo Bocato | [@bocato](https://github.com/bocato) |
|
|
217
303
|
|
|
218
|
-
Each skill folder contains a `NOTICE.md` with attribution details.
|
|
304
|
+
Each skill folder contains a `NOTICE.md` with attribution details. If you are an original
|
|
305
|
+
author and want attribution updated or content removed, please
|
|
306
|
+
[open an issue](https://github.com/Viniciuscarvalho/swift-code-reviewer-skill/issues).
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Per-Agent Quirks & Limitations
|
|
311
|
+
|
|
312
|
+
### Claude Code
|
|
313
|
+
|
|
314
|
+
- Full companion-skill cross-references resolve automatically from `~/.claude/skills/swift-*/`
|
|
315
|
+
- `/review` slash command available after `init`
|
|
316
|
+
|
|
317
|
+
### OpenAI Codex CLI
|
|
318
|
+
|
|
319
|
+
- No `/review` slash command — Codex CLI does not support custom slash commands
|
|
320
|
+
- `@`-path mentions in `AGENTS.md` are **not** auto-resolved; Codex concatenates `AGENTS.md`
|
|
321
|
+
verbatim into the system prompt. After `init`, paste this into your `AGENTS.md` manually:
|
|
322
|
+
|
|
323
|
+
```markdown
|
|
324
|
+
## Swift code review
|
|
325
|
+
|
|
326
|
+
See swift-code-reviewer.md for the full review guide.
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
- Companion skill excerpts are inlined into `swift-code-reviewer.md`; no external files needed
|
|
330
|
+
|
|
331
|
+
### Google Gemini CLI
|
|
332
|
+
|
|
333
|
+
- `/review` available via `.gemini/commands/review.toml` — the TOML `prompt` field uses
|
|
334
|
+
`@./swift-code-reviewer.md` which Gemini **does** resolve at command invocation time
|
|
335
|
+
- Companion skill excerpts are inlined; no external files needed
|
|
336
|
+
|
|
337
|
+
### Kiro
|
|
338
|
+
|
|
339
|
+
- Steering is workspace-scoped (`inclusion: fileMatch`, `fileMatchPattern: "**/*.swift"`) —
|
|
340
|
+
the guide activates automatically whenever you open or edit a Swift file
|
|
341
|
+
- **Known bug**: Kiro global steering has a bug
|
|
342
|
+
([kirodotdev/Kiro#6171](https://github.com/kirodotdev/Kiro/issues/6171)) — workspace-scoped
|
|
343
|
+
steering is the recommended path until it is resolved
|
|
344
|
+
- No dedicated slash command — ask Kiro directly to review your Swift changes
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## Project Layout
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
swift-code-reviewer-skill/
|
|
352
|
+
├── core/
|
|
353
|
+
│ └── swift-code-reviewer.core.md ← canonical agent-agnostic source of truth
|
|
354
|
+
├── templates/
|
|
355
|
+
│ ├── agents/
|
|
356
|
+
│ │ ├── claude/swift-code-reviewer.md
|
|
357
|
+
│ │ ├── codex/swift-code-reviewer.md
|
|
358
|
+
│ │ ├── gemini/swift-code-reviewer.md
|
|
359
|
+
│ │ └── kiro/swift-code-reviewer.md
|
|
360
|
+
│ └── commands/
|
|
361
|
+
│ ├── claude/review.md
|
|
362
|
+
│ └── gemini/review.toml
|
|
363
|
+
├── references/ ← detailed review checklists (agent-agnostic)
|
|
364
|
+
│ ├── review-workflow.md
|
|
365
|
+
│ ├── swift-quality-checklist.md
|
|
366
|
+
│ ├── swiftui-review-checklist.md
|
|
367
|
+
│ ├── performance-review.md
|
|
368
|
+
│ ├── security-checklist.md
|
|
369
|
+
│ ├── architecture-patterns.md
|
|
370
|
+
│ ├── feedback-templates.md
|
|
371
|
+
│ ├── spec-adherence.md
|
|
372
|
+
│ ├── agent-loop-feedback.md
|
|
373
|
+
│ └── custom-guidelines.md
|
|
374
|
+
├── skills/ ← bundled companion skills
|
|
375
|
+
├── examples/ ← real review reports (3 OSS projects)
|
|
376
|
+
├── assets/
|
|
377
|
+
│ ├── demo.png
|
|
378
|
+
│ └── init-demo.tape ← VHS script for init-demo.gif
|
|
379
|
+
├── bin/
|
|
380
|
+
│ ├── install.js ← CLI entry point
|
|
381
|
+
│ └── lib/
|
|
382
|
+
│ ├── agents.js ← per-agent install functions
|
|
383
|
+
│ └── prompt.js ← TTY-aware agent selector
|
|
384
|
+
├── __tests__/
|
|
385
|
+
│ └── installer.test.js
|
|
386
|
+
└── SKILL.md ← Claude Code skill descriptor
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## Development
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
git clone https://github.com/Viniciuscarvalho/swift-code-reviewer-skill.git
|
|
395
|
+
cd swift-code-reviewer-skill
|
|
396
|
+
npm install
|
|
397
|
+
|
|
398
|
+
# Run installer tests
|
|
399
|
+
node --test __tests__/installer.test.js
|
|
400
|
+
|
|
401
|
+
# Preview init in a sandbox
|
|
402
|
+
cd "$(mktemp -d)" && git init
|
|
403
|
+
node /path/to/swift-code-reviewer-skill/bin/install.js init --dry-run
|
|
404
|
+
node /path/to/swift-code-reviewer-skill/bin/install.js init --all
|
|
405
|
+
node /path/to/swift-code-reviewer-skill/bin/install.js init # interactive
|
|
406
|
+
|
|
407
|
+
# Regenerate the demo GIF (requires vhs)
|
|
408
|
+
brew install vhs
|
|
409
|
+
vhs /path/to/swift-code-reviewer-skill/assets/init-demo.tape
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
219
413
|
|
|
220
414
|
## Contributing
|
|
221
415
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
416
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide, including the
|
|
417
|
+
[**Adding a new agent target**](CONTRIBUTING.md#adding-a-new-agent-target) checklist.
|
|
418
|
+
|
|
419
|
+
1. Edit `SKILL.md` or `core/swift-code-reviewer.core.md` for review logic
|
|
420
|
+
2. Update `references/` for specific checklists
|
|
421
|
+
3. Add/modify per-agent templates in `templates/`
|
|
422
|
+
4. Add tests in `__tests__/installer.test.js`
|
|
226
423
|
5. Submit a pull request
|
|
227
424
|
|
|
425
|
+
---
|
|
426
|
+
|
|
228
427
|
## License
|
|
229
428
|
|
|
230
|
-
MIT
|
|
429
|
+
MIT — see [LICENSE](LICENSE).
|
|
231
430
|
|
|
232
431
|
---
|
|
233
432
|
|
|
234
433
|
**Made with care for the Swift community**
|
|
235
434
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
- [Issues](https://github.com/Viniciuscarvalho/swift-code-reviewer-skill/issues) | [Discussions](https://github.com/Viniciuscarvalho/swift-code-reviewer-skill/discussions)
|
|
435
|
+
[Issues](https://github.com/Viniciuscarvalho/swift-code-reviewer-skill/issues) · [Discussions](https://github.com/Viniciuscarvalho/swift-code-reviewer-skill/discussions) · [Sponsor](https://github.com/sponsors/Viniciuscarvalho)
|