Declare new iOS Feature cases by collecting details via interactive form and automatically updating all required files (Feature.swift, FeatureInfo.swift, Localizable.strings, ScreenID, Routes). Use when "add new feature", "declare new feature", "create feature case", "add feature to menu", or "new feature declaration".
Interactively collects feature details via form and automatically updates all required iOS files (Feature.swift, Localizable.strings, ScreenID, Routes) to declare new Feature cases. Use when adding new features to avoid manual file editing and ensure consistency across Domain and Presentation layers.
/plugin marketplace add daispacy/py-claude-marketplace/plugin install py-plugin@py-claude-marketplaceThis skill is limited to using the following tools:
examples.mdtemplates.mdInteractively declare new Feature cases in the iOS app by collecting all necessary information via a form, then automatically updating all required files across Domain and Presentation layers.
Use AskUserQuestion to collect all necessary information in a single form:
Required Information:
Conditional Information:
Available Categories:
Before proceeding, validate:
[category]/[feature]If validation fails, show errors and ask user to correct.
Update these files automatically using Edit tool:
File: Domain/Model/Others/Feature.swift
Location 1: Add feature case (in appropriate section with comment)
Location 2: Add permission code in code computed property
Location 3: Add FeatureInfo mapping in getInfo() method
Location 4: Add to category array (if category specified)
Location 5: Add identifier in identifier computed property
Use templates from templates.md.
File: Domain/Model/Others/FeatureInfo.swift
Add static property with icon and localized title (only if has icon).
Use template from templates.md.
Files:
PayooMerchant/Resources/Localization/vi.lproj/Localizable.stringsPayooMerchant/Resources/Localization/en.lproj/Localizable.stringsAdd localization keys:
menu.label.[feature-name-kebab] - For menu itemshome.label.feature-[feature-name-kebab] - For home screenUse append approach to avoid breaking existing content.
If deep linking is enabled:
File: Domain/Model/Setting/ScreenID.swift
Add screen ID case with deep link path.
File: PayooMerchant/Library/DeepLink/Route.swift
Add route case and URL mapping (4 locations: enum case, init URL mapping, Equatable, getPermissionFeature).
Use templates from templates.md.
IMPORTANT: These files have exhaustive switch statements and MUST be updated to avoid compilation errors.
File: PayooMerchant/Library/DeepLink/DeepLinkNavigator.swift
Add case to getViewController(from destination:) switch statement.
makeHomeViewController()) until actual controller is implementedFile: PayooMerchant/Models/Feature+Ext.swift
Add to navigationBarTitle computed property:
File: PayooMerchant/AppDelegateViewModel.swift
Add to route filtering switch (around line 171):
trueUse templates from templates.md.
Generate code snippets for manual implementation (don't auto-update these):
Use templates from templates.md.
Before presenting results, verify:
Show comprehensive summary:
✅ Feature Declared: [FeatureName]
📋 Collected Details:
- Name: [featureName]
- Vietnamese: [vietnameseDesc]
- English: [englishDesc]
- Permission Code: [code or "None"]
- Category: [category]
- Icon: [iconName or "None"]
- Deep Link: [path or "None"]
📁 Files Updated:
✅ Domain/Model/Others/Feature.swift (5 locations)
✅ Domain/Model/Others/FeatureInfo.swift (if has icon)
✅ PayooMerchant/Resources/Base.lproj/Localizable.strings (Vietnamese)
✅ PayooMerchant/Resources/en.lproj/Localizable.strings (English)
✅ PayooMerchant/Library/DeepLink/DeepLinkNavigator.swift (CRITICAL)
✅ PayooMerchant/Models/Feature+Ext.swift (CRITICAL)
✅ PayooMerchant/AppDelegateViewModel.swift (CRITICAL)
[✅ Domain/Model/Setting/ScreenID.swift] (if deep linking)
[✅ PayooMerchant/Library/DeepLink/Route.swift - 4 locations] (if deep linking)
📝 Manual Steps Required:
1. Add Icon Assets (if has icon):
- Location: PayooMerchant/Resources/Assets.xcassets/
- Create: [iconName].imageset/
- Add images: 1x, 2x, 3x (24x24, 48x48, 72x72 pt)
2. Add ViewControllerFactory Method:
[Show code snippet]
3. Register in DependencyContainer:
[Show code snippet]
4. Create ViewController and ViewModel:
- [FeatureName]ViewController.swift
- [FeatureName]ViewModel.swift
- Follow MVVM + RxSwift Input/Output pattern
[5. Add Navigator Extension (if deep linking):
[Show code snippet]]
✅ Verification Checklist:
- [ ] Build project successfully
- [ ] Run SwiftLint (bundle exec fastlane lint)
- [ ] Test without permission (should hide feature)
- [ ] Test with permission (should show feature)
- [ ] Verify Vietnamese and English text
- [ ] Test icon displays correctly
- [ ] Test deep link (if applicable)
- [ ] Test navigation to feature
🔗 Next Steps:
1. Add icon assets to Assets.xcassets
2. Implement ViewController and ViewModel
3. Add factory method to ViewControllerFactory
4. Register ViewModel in DependencyContainer
5. Test thoroughly before committing
📚 Reference: NEW_FEATURE_DECLARATION_PLAN.md
[category]/[feature] or [category]/[feature]/[subfeature]See templates.md for code templates.
See examples.md for complete example.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.