Project rules & workflow
How to combine the installable skill with optional project rules so any coding agent (Cursor, Claude Code, Copilot, Windsurf, etc.) stays aligned with this library.
1. Install the skill
Install once per machine or per repo — see Install the agent skill for your provider (-a cursor, -a claude-code, -a github-copilot, …).
npx skills add rutvik24/react-native-alternate-app-icon -g -y
Restart your editor or agent after install.
2. Optional project rules
Skills load automatically when relevant. Project rules add always-on hints for your repo (globs, stack, conventions). Use one or more of the formats below.
Shared rule content
Copy these bullets into whichever file your tool supports:
- Use skill `react-native-alternate-app-icon` for setup, API, and troubleshooting.
- Package: `react-native-alternate-app-icon` + peer `react-native-nitro-modules@0.32.0`.
- iOS: icon name must match `CFBundleAlternateIcons` / `.appiconset` folder; system alert is expected.
- Android: icon name = suffix after `MainActivity` in `activity-alias`; switch applies on background.
- Test icon changes on a physical iOS device when Simulator does not show the alert.
- After native dependency or manifest changes: rebuild the app (Metro reload is not enough).
- iOS pods: `bundle exec pod install --project-directory="ios"` from app root.
- AGENTS.md
- Cursor
- Claude Code
- GitHub Copilot
- Windsurf / others
Works with: Cursor, Claude Code, Copilot, Codex, and other agents that read repo-root agent files.
Add or extend AGENTS.md at your app root:
# App agent instructions
## Alternate app icons
- Use skill `react-native-alternate-app-icon` for setup and API.
- Pin `react-native-nitro-modules@0.32.0`.
- Android: background app to see launcher icon change.
This library’s own repo uses AGENTS.md for contributors.
Path: .cursor/rules/alternate-app-icon.mdc
---
description: Runtime app icons with react-native-alternate-app-icon
globs: **/*.{ts,tsx,js,jsx}
---
- Use skill `react-native-alternate-app-icon` for setup and API.
- Pin `react-native-nitro-modules@0.32.0`.
- iOS: CFBundleAlternateIcons keys must match setIcon() names.
- Android: activity-alias naming; icon updates when app is backgrounded.
Docs: Cursor Skills · Install: -a cursor on the skill page.
Path: CLAUDE.md in the project root (or a scoped section in an existing file).
## Alternate app icons (react-native-alternate-app-icon)
Follow the `react-native-alternate-app-icon` skill. Pin Nitro Modules 0.32.0.
Configure iOS plist and Android activity-alias before calling setIcon().
Install skill with -a claude-code. Docs: Claude Code Skills.
Path: .github/copilot-instructions.md (repository-wide) or custom instructions in your IDE.
When working on alternate app icons, use the react-native-alternate-app-icon agent skill.
RN ≥ 0.76, react-native-nitro-modules@0.32.0 required.
Install skill with -a github-copilot. Docs: Copilot Agent Skills.
Windsurf: install with -a windsurf; skills live in .windsurf/skills/ or ~/.codeium/windsurf/skills/.
Codex, Cline, Continue, OpenCode, Roo Code, …: same shared bullets in AGENTS.md or your tool’s instructions file — see Install by AI provider.
3. Invoke in chat
After the skill is installed, ask directly:
Add alternate app icons to this React Native app for iOS and Android.
Use the react-native-alternate-app-icon skill and wire a settings screen.
Or name the package — the skill description should trigger automatic use:
Use the react-native-alternate-app-icon skill to fix setIcon failing on Android.
More copy-paste prompts: Prompt templates.
4. After the agent edits native code
bundle exec pod install --project-directory="ios"
Then rebuild and run the app — Metro reload alone is not enough for new native modules or manifest changes.