Skip to content

OneSignal/sdk-ai-prompts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneSignal SDK AI Prompts

AI-powered SDK integration prompts for OneSignal. This repository contains structured prompts that enable AI coding assistants (Cursor, GitHub Copilot, etc.) to automatically integrate the OneSignal SDK into mobile and web applications.

Live Site

Visit the GitHub Pages site to get started:

https://onesignal.github.io/sdk-ai-prompts/

Supported Platforms

  • Android (Kotlin & Java)
  • iOS (Swift & Objective-C)
  • Flutter (Dart)
  • Unity (C#)
  • React Native (JavaScript & TypeScript)

How It Works

  1. Select your platform on the homepage
  2. Copy the AI prompt that appears
  3. Paste into your AI-enabled IDE (Cursor, GitHub Copilot Chat, etc.)
  4. Answer a few questions (App ID, language preference)
  5. Let the AI integrate the OneSignal SDK
  6. Review the PR with all changes ready to merge

Quick Start

Copy and paste this prompt into your AI editor:

Integrate the OneSignal SDK into this codebase.

Follow the instructions at:
https://raw.githubusercontent.com/OneSignal/sdk-ai-prompts/main/docs/android/ai-prompt.md

Replace android with your platform: ios, flutter, unity, react-native, or react-native-expo.

Repository Structure

docs/
├── index.html              # Landing page with platform selector
├── styles.css              # Dark/light mode styles
├── shared/
│   └── guidelines.md       # Shared guidelines (source)
├── android/
│   ├── integrate.md        # Android-specific guidance (source)
│   └── ai-prompt.md        # Combined prompt (auto-generated)
├── ios/
│   ├── integrate.md        # iOS-specific guidance (source)
│   └── ai-prompt.md        # Combined prompt (auto-generated)
├── flutter/
│   ├── integrate.md
│   └── ai-prompt.md
├── unity/
│   ├── integrate.md
│   └── ai-prompt.md
└── react-native/
    ├── integrate.md
    └── ai-prompt.md
script/
└── generate-prompts.sh     # Generates ai-prompt.md files

Note: The ai-prompt.md files are auto-generated by combining shared/guidelines.md with each platform's integrate.md. Edit the source files, not the generated ones.

What the AI Does

When you use these prompts, the AI will:

  1. Create a new branch (onesignal-integration)
  2. Add the correct SDK version for your platform
  3. Follow your existing architecture (MVVM, MVC, etc.)
  4. Create a centralized OneSignal manager class
  5. Handle threading correctly (off main thread)
  6. Add unit tests for the integration
  7. Create a Pull Request with all changes
  8. Output a PR summary for you to copy

Demo Mode

If you don't have a OneSignal App ID, you can use the demo mode:

  1. When asked for your App ID, say "use demo"
  2. The AI will create a Welcome View with:
    • Email input field
    • Submit button
  3. On submit, it triggers a welcome email journey

Raw Markdown Access

For AI agents, use the combined prompt file (single URL per platform):

  • https://raw.githubusercontent.com/OneSignal/sdk-ai-prompts/main/docs/{platform}/ai-prompt.md

Example:

  • Android: https://raw.githubusercontent.com/OneSignal/sdk-ai-prompts/main/docs/android/ai-prompt.md
  • iOS: https://raw.githubusercontent.com/OneSignal/sdk-ai-prompts/main/docs/ios/ai-prompt.md

Features

  • Dark/Light Mode: Automatically respects system preference
  • Copy to Clipboard: Easy prompt copying
  • Platform Detection: URL parameter based platform selection
  • Pre-flight Checklists: Platform-specific verification steps
  • Code Examples: Production-ready code snippets

Development

Generate Combined Prompts

After editing shared/guidelines.md or any {platform}/integrate.md, regenerate the combined files:

./script/generate-prompts.sh

This creates/updates ai-prompt.md in each platform folder.

Local Preview

# Using Python
cd docs
python -m http.server 8000
# Visit http://localhost:8000

Deployment

The site automatically deploys to GitHub Pages on push to main via GitHub Actions. The workflow runs generate-prompts.sh before deploying.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a Pull Request

Links

License

MIT License - See LICENSE for details.

About

This repository will host all the AI SDK prompts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages