ワンクリックで
enhance-component
Improve or extend an existing gluestack-ui component with new features, variants, or fixes
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Improve or extend an existing gluestack-ui component with new features, variants, or fixes
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | enhance-component |
| description | Improve or extend an existing gluestack-ui component with new features, variants, or fixes |
Help improve or extend an existing gluestack-ui component. This skill guides you through safely modifying existing components while maintaining backward compatibility and following established patterns.
@gluestack-ui/core/[component]/creator not @gluestack-ui/[component]src/components/ui/gluestack-ui-provider/config.tssrc/components/ui/Step 1.1: Identify Component
Ask the user:
questions:
- question: "Which component would you like to enhance?"
header: "Component"
multiSelect: false
options:
- label: "List component name"
description: "E.g., button, accordion, alert-dialog"
Step 1.2: Read Existing Implementation
Use Read tool to understand current implementation:
src/components/ui/[component]/index.tsxsrc/components/ui/[component]/styles.tsxpackages/gluestack-core/src/[component]/creator/index.tsx (if exists)src/components/ui/[component]/docs/index.mdxsrc/components/ui/[component]/examples/Step 1.3: Understand What Needs Enhancement
Ask the user:
Step 2.1: Check Usage
Use Grep to find where the component is used:
# Search for component usage in examples
Grep: "import.*from.*[component-name]" in src/components/ui/
# Check documentation
Grep: "[ComponentName]" in src/components/ui/**/docs/
Step 2.2: Identify Breaking Changes
Analyze if the enhancement:
If breaking changes exist:
Step 2.3: Present Impact Analysis
Show the user:
## Impact Analysis
### Files to Modify:
- [ ] src/components/ui/[component]/index.tsx
- [ ] src/components/ui/[component]/styles.tsx
- [ ] packages/gluestack-core/src/[component]/creator/index.tsx
- [ ] src/components/ui/[component]/docs/index.mdx
- [ ] examples
### Breaking Changes:
[List any breaking changes]
### Migration Required:
[If yes, explain migration path]
### Affected Examples:
[List examples that need updates]
CHECKPOINT 1: Get user confirmation on impact and approach
Step 3.1: Design the Enhancement
Based on the type of enhancement:
For New Variants:
// Before
variants: {
size: {
sm: '...',
md: '...',
lg: '...',
}
}
// After (adding xl)
variants: {
size: {
sm: '...',
md: '...',
lg: '...',
xl: '...', // NEW
}
}
For New Props:
// Before
interface ButtonProps {
size?: 'sm' | 'md' | 'lg';
variant?: 'default' | 'outline';
}
// After (adding isLoading)
interface ButtonProps {
size?: 'sm' | 'md' | 'lg';
variant?: 'default' | 'outline';
isLoading?: boolean; // NEW
}
For New Sub-components:
// Add new sub-component to compound component
export {
Accordion,
AccordionItem,
AccordionHeader,
AccordionNewSubComponent, // NEW
}
Step 3.2: Show Before/After
Present the changes clearly:
## Proposed Changes
### Before:
[Show current code]
### After:
[Show enhanced code]
### New Features:
- Feature 1 description
- Feature 2 description
### API Changes:
- New prop: `propName` (type) - description
- Modified prop: `existingProp` - what changed
CHECKPOINT 2: Get user approval on enhancement design
Step 4.1: Setup Development Environment
yarn link:create
yarn link:apps
yarn dev
Step 4.2: Implement Changes
CRITICAL REMINDERS:
@gluestack-ui/core/[component]/creator)bg-background, text-foreground, border-bordersrc/components/ui/ - NEVER manually edit apps/ directoriesMake changes in order:
Update Core Package (if needed)
packages/gluestack-core/src/[component]/creator/index.tsxpackages/gluestack-core/src/[component]/index.tsx is still correctUpdate UI Component
src/components/ui/[component]/index.tsx@gluestack-ui/core/[component]/creatorUpdate Styles
src/components/ui/[component]/styles.tsxUpdate TypeScript Types
Update Examples
Update Documentation
Step 4.3: Verify Backward Compatibility
Test that existing usage still works:
Step 5.1: Test Enhanced Component
# Test in kitchen-sink
cd apps/kitchen-sink && yarn dev
# Test in website
cd apps/website && yarn dev
Test:
Step 5.2: Regression Testing
Ensure no regressions:
Step 5.3: Present Results
Show the user:
## Testing Results
### New Features Tested:
- ✅ Feature 1 works on iOS, Android, Web
- ✅ Feature 2 works with all variants
- ✅ New examples render correctly
### Regression Testing:
- ✅ All existing examples work
- ✅ No console errors
- ✅ Backward compatible
- ✅ TypeScript compiles
### Documentation:
- ✅ Updated API reference
- ✅ Added examples
- ✅ Migration guide (if needed)
CHECKPOINT 3: Get user approval on implementation
Step 6.1: Final Checklist
## Enhancement Completion Checklist
### Code Changes
- [ ] Core package updated (if needed)
- [ ] UI component updated
- [ ] Styles updated
- [ ] TypeScript types updated
- [ ] All exports updated
### Documentation
- [ ] API reference updated
- [ ] New examples added
- [ ] Migration guide (if breaking changes)
- [ ] Changelog entry (if applicable)
### Testing
- [ ] New features tested
- [ ] Regression tests passed
- [ ] Accessibility verified
- [ ] Cross-platform tested
### Backward Compatibility
- [ ] Existing examples work
- [ ] No breaking changes (or documented)
- [ ] Default behavior preserved
Step 6.2: Cleanup
yarn unlink:apps
Step 6.3: Summary
## ✅ Component Enhancement Complete!
### What Changed:
[Summary of changes]
### Files Modified:
- src/components/ui/[component]/index.tsx
- src/components/ui/[component]/styles.tsx
- [other files]
### Testing:
- ✅ Tested on iOS, Android, Web
- ✅ All existing features work
- ✅ New features work correctly
### Next Steps:
1. Review all changes
2. Run final tests
3. Commit with message: `feat([component]): [description]` or `fix([component]): [description]`
4. Create PR
Ready to commit?
CHECKPOINT 4: Final confirmation before commit
If issues arise:
Ready to enhance a component! 🔧
Guide for installing gluestack-ui v4 per the official Installation doc - CLI and Manual paths only. Follow https://v4.gluestack.io/ui/docs/home/getting-started/installation strictly.
Enforces constrained, opinionated styling patterns for gluestack-ui v4. Main overview skill that coordinates specialized sub-skills for setup, components, styling, variants, performance, and validation.
Migrate a gluestack-ui project from v2, v3, or v4 to v5 (NativeWind v5 or UniWind). Covers automated CLI upgrade and manual step-by-step migration for all source versions.
Main entry point for gluestack-ui contributor tasks and workflows
Create a new React Native/Expo component with guided workflow following compound component API pattern
Create or modify gluestack-core and gluestack-utils packages for component creators and utilities