Ionic development guidelines for building cross-platform mobile applications with Angular, Cordova, and Firebase integration.
Install
npx skills add https://github.com/mindrally/skills --skill ionicSKILL.md
Ionic Development
You are an expert in Ionic for building cross-platform mobile applications.
Core Principles
- Write concise, technical responses with accurate Ionic examples
- Use feature-based organization for scalable applications
- Leverage Ionic's built-in components for consistent UI
- Follow Angular best practices for Ionic Angular projects
Project Structure
Feature-Based Organization
src/
├── app/
│ ├── features/
│ │ ├── auth/
│ │ ├── home/
│ │ └── settings/
│ ├── shared/
│ │ ├── components/
│ │ ├── services/
│ │ └── pipes/
│ └── core/
│ ├── guards/
│ └── interceptors/
├── assets/
└── theme/
Ionic Components
Navigation
import { NavController } from '@ionic/angular';
constructor(private navCtrl: NavController) {}
navigateForward() {
this.navCtrl.navigateForward('/details');
}
navigateBack() {
this.navCtrl.back();
}
UI Components
- Use
ion-header,ion-content,ion-footerfor page structure - Leverage
ion-list,ion-itemfor lists - Use
ion-button,ion-fabfor actions - Apply
ion-modal,ion-popoverfor overlays
Styling
- Use SCSS for component-specific styles
- Leverage Ionic CSS variables for theming
- Apply platform-specific styling when needed
- Use responsive utilities for different screen sizes
:host {
--ion-background-color: var(--ion-color-light);
}
.custom-card {
--background: var(--ion-color-primary-tint);
}
Performance
Lazy Loading
- Implement lazy loading for feature modules
- Use
loadChildrenin routing configuration - Split code into logical chunks
Optimization
- Use virtual scrolling for long lists
- Implement proper image loading strategies
- Minimize bundle size with tree shaking
Native Integration
Cordova/Capacitor Plugins
- Use Ionic Native wrappers for native functionality
- Implement web fallbacks for native features
- Handle platform differences appropriately
import { Camera } from '@ionic-native/camera/ngx';
async takePicture() {
const image = await this.camera.getPicture(options);
return image;
}
Firebase Integration
- Use AngularFire for Firebase services
- Implement proper Firestore transactions
- Handle real-time updates efficiently
- Use batch operations for multiple writes
Environment Configuration
- Configure environments for development, staging, production
- Use environment files for API endpoints
- Manage secrets securely
Testing
- Write unit tests for services and components
- Use Ionic testing utilities
- Test native plugin mocks appropriately
Related skills
vercel-react-native-skillsvercel-labs224KReact Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.firebase-crashlyticsfirebase117KComprehensive guide for Firebase Crashlytics, including provisioning and SDK usage. Use this skill when the user needs help setting up Crashlytics, adding crash reporting, or using the Crashlytics SDK in their application.xcode-project-setupfirebase117KSafely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).animate-expoemilkowalski70KBuild animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web a