swift-code-reviewer-skill 1.0.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 ADDED
@@ -0,0 +1,214 @@
1
+ # Changelog
2
+
3
+ All notable changes to the Swift Code Reviewer Agent Skill will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-02-10
9
+
10
+ ### Added
11
+
12
+ #### Core Functionality
13
+ - **Four-phase review workflow**: Context Gathering → Analysis → Report Generation → Delivery
14
+ - **Multi-layer analysis** across 6 core categories:
15
+ - Swift Best Practices (Swift 6+ concurrency, error handling, optionals)
16
+ - SwiftUI Quality (state management, modern APIs, view composition)
17
+ - Performance (view optimization, ForEach performance, resource management)
18
+ - Security & Safety (input validation, sensitive data, network security)
19
+ - Architecture (MVVM, Repository, DI patterns, testability)
20
+ - Project-Specific Standards (.claude/CLAUDE.md integration)
21
+
22
+ #### Review Capabilities
23
+ - **GitHub PR reviews** via `gh` CLI integration
24
+ - **GitLab MR reviews** via `glab` CLI integration
25
+ - **Git diff analysis** for uncommitted changes
26
+ - **Single file reviews** with context awareness
27
+ - **Directory reviews** for multiple files
28
+ - **Project standards validation** via .claude/CLAUDE.md
29
+
30
+ #### Feedback System
31
+ - **Severity classification**: Critical, High, Medium, Low
32
+ - **Positive feedback** for good practices
33
+ - **Refactoring suggestions** for improvements
34
+ - **File:line references** for precise issue location
35
+ - **Code examples** showing current vs recommended code
36
+ - **Prioritized action items** for structured follow-up
37
+
38
+ #### Reference Documentation (7,700+ lines)
39
+ - **review-workflow.md** (1,131 lines): Complete review process and git integration
40
+ - **swift-quality-checklist.md** (928 lines): Swift 6+ patterns and best practices
41
+ - **swiftui-review-checklist.md** (909 lines): SwiftUI state management and modern APIs
42
+ - **performance-review.md** (914 lines): Performance anti-patterns and optimization
43
+ - **security-checklist.md** (781 lines): Security vulnerabilities and safe practices
44
+ - **architecture-patterns.md** (862 lines): MVVM, Repository, DI, Coordinator patterns
45
+ - **feedback-templates.md** (666 lines): Review templates and severity guidelines
46
+ - **custom-guidelines.md** (852 lines): Project standards integration guide
47
+
48
+ #### Integration Features
49
+ - **swift-best-practices skill** integration for Swift 6+ language patterns
50
+ - **swiftui-expert-skill** integration for SwiftUI best practices
51
+ - **swiftui-performance-audit** integration for performance analysis
52
+ - **Independent operation** with comprehensive built-in checklists
53
+
54
+ #### Platform Support
55
+ - Swift 6.0+
56
+ - iOS 17+, macOS 14+, watchOS 10+, tvOS 17+, visionOS 1+
57
+ - GitHub and GitLab integration
58
+ - Local git repository support
59
+
60
+ ### Documentation
61
+
62
+ - **README.md**: Comprehensive overview with examples and usage patterns
63
+ - **CONTRIBUTING.md**: Contribution guidelines and development setup
64
+ - **LICENSE**: MIT License
65
+ - **CHANGELOG.md**: Version history and change tracking
66
+ - **.gitignore**: Standard macOS and editor ignores
67
+
68
+ ### Features in Detail
69
+
70
+ #### Swift Quality Checks
71
+ - Actor isolation and MainActor usage
72
+ - Sendable conformance validation
73
+ - Data race prevention
74
+ - Typed throws (Swift 6+)
75
+ - Force unwrap detection (!, as!, try!)
76
+ - Optional handling patterns
77
+ - Access control enforcement
78
+ - Swift API Design Guidelines compliance
79
+
80
+ #### SwiftUI Checks
81
+ - @Observable pattern adoption (iOS 17+)
82
+ - Property wrapper selection guide
83
+ - NavigationStack vs NavigationView
84
+ - .task vs .onAppear for async work
85
+ - Modern .onChange syntax
86
+ - State ownership rules
87
+ - View composition guidelines
88
+ - Accessibility compliance
89
+
90
+ #### Performance Checks
91
+ - View update optimization
92
+ - Equatable conformance for ViewModels
93
+ - ForEach identity stability
94
+ - GeometryReader overuse detection
95
+ - Layout thrash prevention
96
+ - AsyncImage for remote images
97
+ - Memory leak detection
98
+ - Retain cycle prevention
99
+
100
+ #### Security Checks
101
+ - Keychain usage for credentials
102
+ - Biometric authentication
103
+ - HTTPS enforcement
104
+ - Certificate pinning
105
+ - API key protection
106
+ - Input validation
107
+ - SQL injection prevention
108
+ - XSS prevention in WebViews
109
+ - Sensitive data logging prevention
110
+
111
+ #### Architecture Checks
112
+ - MVVM pattern validation
113
+ - Repository pattern implementation
114
+ - Dependency injection verification
115
+ - Use Case pattern detection
116
+ - Coordinator pattern for navigation
117
+ - Protocol-based abstractions
118
+ - Testability assessment
119
+ - Code organization (MARK comments, extensions)
120
+
121
+ #### Project Standards
122
+ - .claude/CLAUDE.md parsing and validation
123
+ - Custom architecture pattern validation
124
+ - Design system compliance (colors, fonts, spacing)
125
+ - Error handling pattern conformance
126
+ - Testing requirement verification
127
+ - Navigation pattern compliance
128
+
129
+ ### Templates and Examples
130
+
131
+ #### Positive Feedback Templates
132
+ - Modern API adoption
133
+ - Architecture excellence
134
+ - Code quality
135
+ - Performance optimization
136
+ - Accessibility support
137
+ - Security awareness
138
+
139
+ #### Issue Report Templates
140
+ - Critical issues (security, crashes, data races)
141
+ - High priority (performance, anti-patterns)
142
+ - Medium priority (code quality, documentation)
143
+ - Low priority (style, suggestions)
144
+
145
+ #### Refactoring Suggestions
146
+ - Extract subview
147
+ - Simplify complex logic
148
+ - Extract reusable component
149
+ - Performance optimization opportunities
150
+
151
+ ### Example Review Reports
152
+
153
+ Provided complete examples for:
154
+ - Reviewing uncommitted changes
155
+ - Reviewing against project standards
156
+ - Pull request reviews
157
+ - File-specific reviews
158
+ - Multi-file reviews
159
+
160
+ ## [Unreleased]
161
+
162
+ ### Planned Features
163
+
164
+ - **Swift 6.1 support**: Add new language features
165
+ - **iOS 18 patterns**: Add latest SwiftUI APIs
166
+ - **Xcode 16 integration**: Better Xcode project analysis
167
+ - **Custom rule engine**: User-defined review rules
168
+ - **Machine learning**: Pattern learning from reviewed code
169
+ - **Team metrics**: Aggregate review statistics
170
+ - **CI/CD integration**: Automated PR review comments
171
+ - **VSCode extension**: Direct editor integration
172
+
173
+ ### Potential Enhancements
174
+
175
+ - **Video tutorials**: Screen recordings showing usage
176
+ - **Interactive examples**: Live code review demonstrations
177
+ - **Best practices database**: Searchable pattern library
178
+ - **Quick fixes**: Automated code corrections
179
+ - **Review presets**: Configurable review profiles
180
+ - **Multi-language support**: Objective-C, C++, SwiftUI previews
181
+
182
+ ## Version History Summary
183
+
184
+ - **1.0.0** (2026-02-10): Initial release with comprehensive review capabilities
185
+
186
+ ---
187
+
188
+ ## How to Read This Changelog
189
+
190
+ - **Added**: New features
191
+ - **Changed**: Changes in existing functionality
192
+ - **Deprecated**: Soon-to-be removed features
193
+ - **Removed**: Removed features
194
+ - **Fixed**: Bug fixes
195
+ - **Security**: Vulnerability fixes
196
+
197
+ ## Contributing
198
+
199
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on proposing changes.
200
+
201
+ ## Release Process
202
+
203
+ 1. Update version in SKILL.md
204
+ 2. Update CHANGELOG.md with changes
205
+ 3. Create git tag: `git tag -a v1.0.0 -m "Release 1.0.0"`
206
+ 4. Push tag: `git push origin v1.0.0`
207
+ 5. Create GitHub release with notes from CHANGELOG
208
+
209
+ ---
210
+
211
+ **Note**: This skill follows [Semantic Versioning](https://semver.org/):
212
+ - **MAJOR**: Incompatible API changes
213
+ - **MINOR**: Backward-compatible functionality additions
214
+ - **PATCH**: Backward-compatible bug fixes
@@ -0,0 +1,271 @@
1
+ # Contributing to Swift Code Reviewer Agent Skill
2
+
3
+ Thank you for your interest in contributing! This document provides guidelines for contributing to the Swift Code Reviewer skill.
4
+
5
+ ## How to Contribute
6
+
7
+ ### Reporting Issues
8
+
9
+ If you find a bug or have a suggestion:
10
+
11
+ 1. **Search existing issues** to avoid duplicates
12
+ 2. **Create a new issue** with:
13
+ - Clear, descriptive title
14
+ - Detailed description of the issue or suggestion
15
+ - Code examples (if applicable)
16
+ - Expected vs actual behavior
17
+ - Swift/SwiftUI version and platform
18
+
19
+ ### Suggesting Enhancements
20
+
21
+ We welcome suggestions for:
22
+
23
+ - New review patterns to detect
24
+ - Additional best practices to check
25
+ - Improved feedback templates
26
+ - Better project standard integration
27
+ - Performance optimizations
28
+ - Documentation improvements
29
+
30
+ ### Contributing Code
31
+
32
+ #### Setting Up Development Environment
33
+
34
+ 1. Fork the repository
35
+ 2. Clone your fork:
36
+ ```bash
37
+ git clone https://github.com/yourusername/swift-code-reviewer-skill.git
38
+ cd swift-code-reviewer-skill
39
+ ```
40
+
41
+ 3. Create a branch:
42
+ ```bash
43
+ git checkout -b feature/your-feature-name
44
+ ```
45
+
46
+ #### Making Changes
47
+
48
+ **Skill Logic (SKILL.md)**
49
+
50
+ When modifying the main skill file:
51
+
52
+ 1. Maintain YAML frontmatter format
53
+ 2. Keep sections well-organized
54
+ 3. Update table of contents if adding sections
55
+ 4. Test with real Swift/SwiftUI code
56
+
57
+ **Reference Files (references/*.md)**
58
+
59
+ When updating reference documentation:
60
+
61
+ 1. **swift-quality-checklist.md**: Add Swift language patterns
62
+ 2. **swiftui-review-checklist.md**: Add SwiftUI patterns
63
+ 3. **performance-review.md**: Add performance anti-patterns
64
+ 4. **security-checklist.md**: Add security concerns
65
+ 5. **architecture-patterns.md**: Add architectural patterns
66
+ 6. **feedback-templates.md**: Add review templates
67
+ 7. **custom-guidelines.md**: Update guidelines parsing logic
68
+ 8. **review-workflow.md**: Update review process steps
69
+
70
+ **Format Guidelines:**
71
+
72
+ - Use clear, descriptive headings
73
+ - Include code examples (bad ❌ and good ✅)
74
+ - Add comments explaining why something is an issue
75
+ - Reference official documentation when possible
76
+ - Keep examples concise and focused
77
+
78
+ #### Code Example Format
79
+
80
+ Always use this format for examples:
81
+
82
+ ```markdown
83
+ **Check for:**
84
+ - [ ] Pattern or rule to check
85
+
86
+ **Examples:**
87
+
88
+ ❌ **Bad: [Description]**
89
+ ```swift
90
+ // Code showing the anti-pattern
91
+ ```
92
+
93
+ ✅ **Good: [Description]**
94
+ ```swift
95
+ // Code showing the correct pattern
96
+ ```
97
+
98
+ **Why This Matters**: [Explanation of impact]
99
+ ```
100
+
101
+ #### Testing Your Changes
102
+
103
+ 1. **Test with real code**: Review actual Swift/SwiftUI files
104
+ 2. **Test different scenarios**:
105
+ - Single file review
106
+ - Git diff review
107
+ - PR/MR review
108
+ - Project standards validation
109
+
110
+ 3. **Verify output**:
111
+ - All severity levels work
112
+ - File:line references are correct
113
+ - Code examples are accurate
114
+ - Positive feedback is included
115
+
116
+ 4. **Check integration**:
117
+ - References to other skills work
118
+ - Project standards (.claude/CLAUDE.md) parsing works
119
+ - Git commands execute correctly
120
+
121
+ #### Commit Guidelines
122
+
123
+ Write clear, descriptive commit messages:
124
+
125
+ ```
126
+ Add force unwrap detection in security checklist
127
+
128
+ - Added pattern detection for !, as!, and try!
129
+ - Included examples of safe alternatives
130
+ - Updated security-checklist.md with new section
131
+ ```
132
+
133
+ **Format:**
134
+ - First line: Summary (50 chars or less)
135
+ - Blank line
136
+ - Detailed description (if needed)
137
+ - List specific changes
138
+
139
+ #### Pull Request Process
140
+
141
+ 1. **Update documentation** if you changed functionality
142
+ 2. **Add examples** demonstrating your changes
143
+ 3. **Test thoroughly** with various Swift/SwiftUI code
144
+ 4. **Create pull request** with:
145
+ - Clear title and description
146
+ - Reference related issues
147
+ - List of changes
148
+ - Examples of new functionality
149
+
150
+ 5. **Respond to feedback** from reviewers
151
+ 6. **Keep commits clean** (squash if needed)
152
+
153
+ ## What to Contribute
154
+
155
+ ### High Priority
156
+
157
+ - **New Swift 6 patterns**: Add checks for latest Swift features
158
+ - **iOS 18 patterns**: Add SwiftUI iOS 18+ patterns
159
+ - **Performance patterns**: Add new performance anti-patterns
160
+ - **Security checks**: Add security vulnerability detection
161
+ - **Real-world examples**: Add examples from actual code reviews
162
+
163
+ ### Medium Priority
164
+
165
+ - **Improved templates**: Better feedback templates
166
+ - **Documentation**: Clearer explanations and examples
167
+ - **Edge cases**: Handle unusual code patterns
168
+ - **Integration**: Better integration with other skills
169
+
170
+ ### Low Priority
171
+
172
+ - **Formatting**: Improve markdown formatting
173
+ - **Typos**: Fix spelling and grammar
174
+ - **Organization**: Reorganize sections for clarity
175
+
176
+ ## Style Guide
177
+
178
+ ### Markdown
179
+
180
+ - Use `#` for main headings, `##` for sections, `###` for subsections
181
+ - Use **bold** for emphasis
182
+ - Use `code` for inline code
183
+ - Use code blocks with language tags: ```swift
184
+ - Use tables for structured data
185
+ - Use lists for sequential items
186
+ - Use checkboxes `- [ ]` for checklist items
187
+
188
+ ### Code Examples
189
+
190
+ - Always show both bad ❌ and good ✅ examples
191
+ - Include comments explaining key points
192
+ - Keep examples minimal but complete
193
+ - Use realistic variable/function names
194
+ - Follow Swift naming conventions
195
+
196
+ ### Writing Style
197
+
198
+ - **Clear and concise**: Avoid unnecessary words
199
+ - **Active voice**: "Use @Observable" not "@ Observable should be used"
200
+ - **Specific**: "View body exceeds 50 lines" not "View is too large"
201
+ - **Educational**: Explain *why*, not just *what*
202
+ - **Respectful**: Assume good intentions, be constructive
203
+
204
+ ## Review Criteria
205
+
206
+ Pull requests are evaluated on:
207
+
208
+ 1. **Correctness**: Does it accurately identify issues?
209
+ 2. **Completeness**: Are examples clear and comprehensive?
210
+ 3. **Clarity**: Is documentation easy to understand?
211
+ 4. **Consistency**: Does it match existing style?
212
+ 5. **Value**: Does it improve the skill's effectiveness?
213
+
214
+ ## Recognition
215
+
216
+ Contributors will be:
217
+ - Listed in the README
218
+ - Credited in release notes
219
+ - Thanked in the community
220
+
221
+ Significant contributions may result in becoming a maintainer.
222
+
223
+ ## Questions?
224
+
225
+ - **General questions**: Open a discussion
226
+ - **Bug reports**: Open an issue
227
+ - **Feature ideas**: Open an issue with [Feature Request] tag
228
+ - **Code questions**: Comment on relevant PR
229
+
230
+ ## Code of Conduct
231
+
232
+ ### Our Pledge
233
+
234
+ We are committed to providing a welcoming and inclusive environment for all contributors, regardless of:
235
+ - Experience level
236
+ - Background
237
+ - Identity
238
+ - Location
239
+
240
+ ### Expected Behavior
241
+
242
+ - Be respectful and considerate
243
+ - Welcome newcomers and help them learn
244
+ - Give and accept constructive feedback gracefully
245
+ - Focus on what's best for the community
246
+ - Show empathy towards others
247
+
248
+ ### Unacceptable Behavior
249
+
250
+ - Harassment or discrimination
251
+ - Trolling or insulting comments
252
+ - Personal or political attacks
253
+ - Publishing others' private information
254
+ - Other unprofessional conduct
255
+
256
+ ### Enforcement
257
+
258
+ Violations will result in:
259
+ 1. Warning
260
+ 2. Temporary ban
261
+ 3. Permanent ban (severe or repeated violations)
262
+
263
+ Report violations to [maintainer email].
264
+
265
+ ## License
266
+
267
+ By contributing, you agree that your contributions will be licensed under the MIT License.
268
+
269
+ ---
270
+
271
+ Thank you for contributing to making Swift code reviews better! 🎉
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Swift Code Reviewer Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.