@moon791017/neo-skills 1.0.1

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.
Files changed (69) hide show
  1. package/GEMINI.md +115 -0
  2. package/README.md +155 -0
  3. package/bin/install-claude-skills.js +72 -0
  4. package/commands/neo/cd-app-service.toml +20 -0
  5. package/commands/neo/cd-iis.toml +20 -0
  6. package/commands/neo/ci-dotnet.toml +21 -0
  7. package/commands/neo/clarification.toml +48 -0
  8. package/commands/neo/code-review.toml +33 -0
  9. package/commands/neo/dotnet-gen-interface.toml +31 -0
  10. package/commands/neo/explain.toml +44 -0
  11. package/commands/neo/git-commit.toml +49 -0
  12. package/dist/hooks/secret-guard.js +2 -0
  13. package/dist/server.js +220 -0
  14. package/gemini-extension.json +15 -0
  15. package/package.json +39 -0
  16. package/skills/azure-pipelines/SKILL.md +45 -0
  17. package/skills/azure-pipelines/templates/build/build-dotnet.yml +92 -0
  18. package/skills/azure-pipelines/templates/deploy/deploy-app-service.yml +71 -0
  19. package/skills/azure-pipelines/templates/deploy/deploy-iis.yml +189 -0
  20. package/skills/azure-pipelines/templates/util/clean-artifact.yml +40 -0
  21. package/skills/azure-pipelines/templates/util/extract-artifact.yml +57 -0
  22. package/skills/azure-pipelines/templates/util/iis/iis-backup.yml +92 -0
  23. package/skills/azure-pipelines/templates/util/iis/iis-deploy-files.yml +112 -0
  24. package/skills/azure-pipelines/templates/util/iis/iis-manage-website.yml +112 -0
  25. package/skills/azure-pipelines/templates/util/iis/iis-rollback.yml +98 -0
  26. package/skills/azure-pipelines/templates/util/iis/iis-start-website.yml +89 -0
  27. package/skills/azure-pipelines/templates/util/iis/iis-stop-website.yml +80 -0
  28. package/skills/azure-pipelines/templates/util/iis/iis-task.yml +157 -0
  29. package/skills/azure-pipelines/templates/util/set-aspnetcore-env.yml +77 -0
  30. package/skills/clarification/SKILL.md +22 -0
  31. package/skills/code-review/SKILL.md +72 -0
  32. package/skills/csharp/SKILL.md +87 -0
  33. package/skills/csharp/reference/anti-patterns.md +142 -0
  34. package/skills/csharp/reference/coding-style.md +86 -0
  35. package/skills/csharp/reference/patterns.md +142 -0
  36. package/skills/csharp-interface-generator/SKILL.md +40 -0
  37. package/skills/dotnet/SKILL.md +41 -0
  38. package/skills/dotnet-ef-core/SKILL.md +78 -0
  39. package/skills/dotnet-ef-core/reference/anti-patterns.md +51 -0
  40. package/skills/dotnet-ef-core/reference/coding-style.md +42 -0
  41. package/skills/dotnet-ef-core/reference/patterns.md +53 -0
  42. package/skills/dotnet-minimal-apis/SKILL.md +78 -0
  43. package/skills/dotnet-minimal-apis/reference/anti-patterns.md +59 -0
  44. package/skills/dotnet-minimal-apis/reference/coding-style.md +54 -0
  45. package/skills/dotnet-minimal-apis/reference/patterns.md +68 -0
  46. package/skills/dotnet-mvc/SKILL.md +78 -0
  47. package/skills/dotnet-mvc/reference/anti-patterns.md +49 -0
  48. package/skills/dotnet-mvc/reference/coding-style.md +43 -0
  49. package/skills/dotnet-mvc/reference/patterns.md +56 -0
  50. package/skills/dotnet-webapi/SKILL.md +78 -0
  51. package/skills/dotnet-webapi/reference/anti-patterns.md +48 -0
  52. package/skills/dotnet-webapi/reference/coding-style.md +47 -0
  53. package/skills/dotnet-webapi/reference/patterns.md +52 -0
  54. package/skills/explain/SKILL.md +27 -0
  55. package/skills/git-commit/SKILL.md +84 -0
  56. package/skills/python/SKILL.md +61 -0
  57. package/skills/python/reference/anti-patterns.md +177 -0
  58. package/skills/python/reference/coding-style.md +92 -0
  59. package/skills/python/reference/patterns.md +112 -0
  60. package/skills/python-manager/SKILL.md +61 -0
  61. package/skills/start-plan/SKILL.md +29 -0
  62. package/skills/swift/SKILL.md +78 -0
  63. package/skills/swift/reference/anti-patterns.md +75 -0
  64. package/skills/swift/reference/coding-style.md +56 -0
  65. package/skills/swift/reference/patterns.md +94 -0
  66. package/skills/swift-ui/SKILL.md +76 -0
  67. package/skills/swift-ui/reference/anti-patterns.md +52 -0
  68. package/skills/swift-ui/reference/coding-style.md +46 -0
  69. package/skills/swift-ui/reference/patterns.md +87 -0
@@ -0,0 +1,52 @@
1
+ # SwiftUI Anti-Patterns and Best Practices
2
+
3
+ ## 1. The "God View"
4
+ **Problem**: A single view contains excessive functionality, leading to a `body` that exceeds 100 lines.
5
+ **Impact**: Code becomes difficult to maintain, and performance decreases during re-rendering.
6
+ **Recommendation**: Split the view into smaller, single-responsibility `struct` views.
7
+
8
+ ## 2. In-View Logic
9
+ **Problem**: Writing complex conditional logic, mathematical calculations, or network calls within `body` or View Modifiers.
10
+ **Impact**: View rendering becomes unstable and difficult to unit test.
11
+ **Recommendation**: Move logic to a ViewModel (traditional projects) or Model (projects using `@Observable`).
12
+
13
+ ## 3. Excessive use of `AnyView`
14
+ **Problem**: Frequently using `AnyView` to erase types.
15
+ **Impact**: SwiftUI cannot optimize the view tree, leading to significant rendering performance issues.
16
+ **Recommendation**: Prioritize the use of `@ViewBuilder`, `Group`, or `if-else`.
17
+
18
+ ```swift
19
+ // Bad
20
+ func content() -> AnyView {
21
+ if isTrue {
22
+ return AnyView(Text("True"))
23
+ } else {
24
+ return AnyView(Circle())
25
+ }
26
+ }
27
+
28
+ // Good
29
+ @ViewBuilder
30
+ func content() -> some View {
31
+ if isTrue {
32
+ Text("True")
33
+ } else {
34
+ Circle()
35
+ }
36
+ }
37
+ ```
38
+
39
+ ## 4. Forced Unwrapping in `body`
40
+ **Problem**: Using `!` to force unwrap optional types within `body`.
41
+ **Impact**: The application will crash directly when rendering an incomplete state.
42
+ **Recommendation**: Always use `if let` or `guard let` (within helper functions) to provide safe fallback content.
43
+
44
+ ## 5. Unnecessary `@State` Updates
45
+ **Problem**: Modifying `@State` during the view rendering process (Side Effect).
46
+ **Impact**: Leads to update cycles or infinite loop crashes.
47
+ **Recommendation**: Only modify state when triggered by actions (e.g., `.onAppear`, `onTapGesture`).
48
+
49
+ ## 6. Deprecated Navigation Patterns
50
+ **Problem**: Still using `NavigationView` in iOS 16+ projects.
51
+ **Impact**: Lacks support for modern data-driven navigation.
52
+ **Recommendation**: Fully migrate to `NavigationStack` and `NavigationPath`.
@@ -0,0 +1,46 @@
1
+ # SwiftUI Coding Style and Naming Conventions
2
+
3
+ ## View Declaration
4
+ - **View Name**: Should use `PascalCase` and be named after its functionality (e.g., `UserProfileView.swift`).
5
+ - **Structs over Classes**: Views should always be defined as `struct` and conform to the `View` protocol.
6
+
7
+ ## View Body Structure
8
+ - **Keep `body` Clean**: The `body` should not contain complex calculation logic, network requests, or data processing.
9
+ - **Sub-view Deconstruction**:
10
+ - When the `body` exceeds 30-50 lines, it should be considered for splitting into independent sub-views.
11
+ - Prioritize using `struct` sub-views over computed properties (`var subview: some View`).
12
+
13
+ ## View Modifier Ordering
14
+ The order of modifiers affects the rendering result. Follow this logical sequence:
15
+ 1. **Layout**: `frame`, `padding`, `layoutPriority`.
16
+ 2. **Effects**: `background`, `border`, `shadow`, `clipShape`, `opacity`.
17
+ 3. **Interaction**: `onTapGesture`, `onHover`.
18
+ 4. **Positioning**: `offset`, `position`.
19
+
20
+ ```swift
21
+ // Good
22
+ Text("Hello")
23
+ .frame(maxWidth: .infinity) // 1. Layout
24
+ .background(Color.blue) // 2. Effects
25
+ .onTapGesture { ... } // 3. Interaction
26
+
27
+ // Bad
28
+ Text("Hello")
29
+ .background(Color.blue) // The background will follow the text only, not the frame
30
+ .frame(maxWidth: .infinity)
31
+ ```
32
+
33
+ ## State Management Naming
34
+ - **Private State (@State)**: Should be marked as `private`.
35
+ - **Two-way Binding (@Binding)**: Should be clearly named, reflecting the data it represents rather than the UI behavior.
36
+
37
+ ## Preview Patterns (iOS 17+)
38
+ - Always use the `#Preview` macro for view development.
39
+ - Provide mock data and ensure testing for Dark Mode and Dynamic Type.
40
+
41
+ ```swift
42
+ #Preview {
43
+ UserProfileView(user: User.mock)
44
+ .preferredColorScheme(.dark)
45
+ }
46
+ ```
@@ -0,0 +1,87 @@
1
+ # Modern SwiftUI Patterns (iOS 16+)
2
+
3
+ ## 1. View Composition (Small Views)
4
+ **Concept**: Splitting large UIs into multiple small views.
5
+ **Advantages**: Clearer code, easier testing, and reduced Swift compilation time.
6
+
7
+ ```swift
8
+ struct UserCard: View {
9
+ let user: User
10
+ var body: some View {
11
+ HStack {
12
+ UserAvatar(imageName: user.avatar)
13
+ UserInfoDetails(name: user.name, email: user.email)
14
+ }
15
+ }
16
+ }
17
+ ```
18
+
19
+ ## 2. Modern Observation (iOS 17+)
20
+ **Pattern**: Using the `@Observable` macro for state management.
21
+ **Features**: Eliminates the need for `@Published` annotations, automatically tracks properties, and provides better rendering performance.
22
+
23
+ ```swift
24
+ @Observable
25
+ class AppState {
26
+ var count = 0
27
+ }
28
+
29
+ struct CounterView: View {
30
+ @State private var state = AppState()
31
+ var body: some View {
32
+ Button("Count: \(state.count)") { state.count += 1 }
33
+ }
34
+ }
35
+ ```
36
+
37
+ ## 3. Custom View Modifiers
38
+ **Purpose**: Encapsulating common styles or behaviors (e.g., standard button styles).
39
+ **Advantages**: Provides a unified design language and reduces confusion within the view hierarchy.
40
+
41
+ ```swift
42
+ struct BrandButtonModifier: ViewModifier {
43
+ func body(content: Content) -> some View {
44
+ content
45
+ .padding()
46
+ .background(Color.blue)
47
+ .foregroundColor(.white)
48
+ .clipShape(Capsule())
49
+ }
50
+ }
51
+
52
+ extension View {
53
+ func brandButtonStyle() -> some View {
54
+ modifier(BrandButtonModifier())
55
+ }
56
+ }
57
+ ```
58
+
59
+ ## 4. Modern Navigation (iOS 16+)
60
+ **Recommendation**: Use `NavigationStack` combined with path binding (`Path Binding`).
61
+ **Advantages**: Complete control over the navigation stack, supporting deep linking.
62
+
63
+ ```swift
64
+ struct MainApp: View {
65
+ @State private var path = NavigationPath()
66
+ var body: some View {
67
+ NavigationStack(path: $path) {
68
+ List(Items) { item in
69
+ NavigationLink(value: item) { Text(item.name) }
70
+ }
71
+ .navigationDestination(for: Item.self) { item in
72
+ DetailView(item: item)
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## 5. ViewThatFits
80
+ **Purpose**: Automatically select the appropriate layout across different device sizes (e.g., iPhone mini vs. iPhone Pro Max).
81
+
82
+ ```swift
83
+ ViewThatFits {
84
+ HStack { ... } // Try first
85
+ VStack { ... } // Fallback here if width is insufficient
86
+ }
87
+ ```