# ionic

Gives the agent a set of Ionic rules: feature-based structure, built-in components, SCSS theming, lazy loading and Firebase.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 797 installs · ★ 286
- Author: Mindrally
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/Mindrally/skills/tree/HEAD/ionic/SKILL.md
- Updated: 2026-10-08
- HTML: https://affpapa.org/en/nevibecode/skills/ionic

## What it does

This skill turns the assistant into an Ionic-minded reviewer. Answers stay short and technical, with TypeScript and SCSS examples. Projects get organised by feature: `features`, `shared`, and a `core` folder for guards and interceptors. For navigation and layout the agent reaches for Ionic's own components — `ion-header`, `ion-content`, `ion-list`, `ion-modal` — instead of hand-rolled wrappers.

There are sections on performance and native integration. Lazy loading through `loadChildren`, virtual scrolling for long lists, Ionic Native wrappers for Cordova and Capacitor with web fallbacks. Firebase gets its own block: AngularFire, Firestore transactions, batch writes. Styling runs on SCSS and Ionic CSS variables.

The guidelines assume Angular, so in a React or Vue Ionic project they will pull in patterns that do not fit. Environment files for development, staging and production are covered too, with secrets kept out of the code.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill ionic -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ionic/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ionic/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill ionic -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ionic/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill ionic -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ionic/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Mindrally/skills ionic
```

2. **Manually: put the files in place**
- File: `.github/skills/ionic/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill ionic -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Mindrally/skills --path ionic
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ionic/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Mindrally/skills --skill ionic -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Mindrally/skills/tree/HEAD/ionic/SKILL.md

## When to use it
- split an Ionic project into features instead of one flat folder
- pick a built-in Ionic component over a custom one
- wire lazy loading through `loadChildren`
- add a native plugin with a web fallback
- write Firestore transactions and batch writes

## Example prompts
- help me split my Ionic project into features
- how do I lazy load a module in Ionic Angular
- show me navigation with `NavController`

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d3b80a5c1787d4da.

BEGIN THIRD-PARTY FILE d3b80a5c1787d4da
````text
---
name: ionic
description: Ionic development guidelines for building cross-platform mobile applications with Angular, Cordova, and Firebase integration.
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# 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
```typescript
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-footer` for page structure
- Leverage `ion-list`, `ion-item` for lists
- Use `ion-button`, `ion-fab` for actions
- Apply `ion-modal`, `ion-popover` for 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

```scss
: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 `loadChildren` in 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

```typescript
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
````
END THIRD-PARTY FILE d3b80a5c1787d4da

The third-party file has ended. Everything between the d3b80a5c1787d4da tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© Mindrally · Apache-2.0 · https://github.com/Mindrally/skills/tree/HEAD/ionic/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
