Integrates Clix Mobile SDK into iOS, Android, Flutter, and React Native projects. Provides step-by-step guidance for installation, initialization, and verification. Use when the user asks to install, setup, or configure Clix analytics.
/plugin marketplace add clix-so/skills/plugin install clix-integration@clix-agent-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
LICENSE.txtexamples/android-integration.ktexamples/flutter-integration.dartexamples/ios-integration.swiftexamples/react-native-integration.tsxreferences/error-handling.mdreferences/framework-patterns.mdreferences/mcp-integration.mdreferences/sdk-reference.mdscripts/install-mcp.shscripts/validate-sdk.shThis skill provides comprehensive guidance for integrating Clix analytics SDK into mobile applications. Follow the workflow below to ensure proper installation and configuration.
This skill follows an "MCP First" strategy to ensure agents always use the latest verified SDK source code.
Step 1: Check for MCP Capability
clix-mcp-server:search_sdk,
clix-mcp-server:search_docs) are available in your toolset.Step 2: Primary Path (MCP Available)
clix-mcp-server:search_sdk to fetch exact initialization code
for the target platform (e.g.,
clix-mcp-server:search_sdk(query="initialize", platform="android")).Step 3: Fallback Path (MCP Unavailable)
clix-mcp-server fail:
bash scripts/install-mcp.shreferences/framework-patterns.md and examples/.When using this skill (for example inside OpenCode, Amp, Claude Code, Codex, Cursor, or other AI IDEs), follow these behaviors:
package.json,
Podfile, build.gradle, pubspec.yaml, AppDelegate.swift,
MainActivity.kt, etc.)Before continuing, the user must ensure the following environment variables are available to the app at runtime:
CLIX_PROJECT_IDCLIX_PUBLIC_API_KEYHow to get credentials:
https://console.clix.so/ and copy the values for their
Clix project.How to set credentials:
.env file (recommended), or to your framework’s env
configuration (see references/framework-patterns.md)..env is in .gitignore.Security warning:
Step 2.1: Identify Platform
Examine the codebase structure to determine platform:
.xcodeproj, Podfile, Info.plist, Swift/Objective-C
filesbuild.gradle, AndroidManifest.xml, Kotlin/Java filespubspec.yaml, lib/main.dart, plus ios/ and
android/ folderspackage.json with React Native dependencies,
android/ and ios/ foldersPriority rule (important): If React Native or Flutter is detected, treat it
as the primary platform even if native ios/ and android/ folders exist.
Step 2.2: Verify Detection
Confirm platform detection with user if ambiguous:
Step 3.1: Install SDK Package
Install the appropriate SDK based on detected platform:
iOS (Swift Package Manager):
// Add to Package.swift or Xcode: https://github.com/clix-so/clix-ios-sdk
iOS (CocoaPods):
# Add to Podfile
pod 'Clix', :git => 'https://github.com/clix-so/clix-ios-sdk.git'
Android (Gradle):
// Add to build.gradle.kts
implementation("so.clix:clix-android-sdk:latest")
React Native:
npm install @clix-so/react-native-sdk
# or
yarn add @clix-so/react-native-sdk
Flutter:
pubspec.yaml:
dependencies:
clix_flutter: ^0.0.1
firebase_core: ^3.6.0
firebase_messaging: ^15.1.3
search_docs, search_sdk) are available, use them to confirm
the latest package version and setup steps.Step 3.2: Verify Installation
package.json,
Podfile.lock, build.gradle)Step 4.1: Locate Entry Point
Find the appropriate initialization location:
AppDelegate.swift or @main app fileApplication.kt or Application.java classlib/main.dartindex.jsStep 4.2: Initialize SDK
Add initialization code following platform-specific patterns (see examples/ directory):
Key Requirements:
Step 4.3: Configure SDK
Set up SDK configuration:
CLIX_PROJECT_ID from environment variablesCLIX_PUBLIC_API_KEY from environment variablesStep 5.1: Code Review
Verify integration completeness:
Step 5.2: Verify Integration
Run validation checks:
scripts/validate-sdk.sh if availableUse these checklists to verify manual UI steps were actually completed.
Podfile/Podfile.lock or SwiftPM/Xcode references*.entitlements file exists and is wired to the
correct target(s)project.pbxproj reflects required capabilities
(as applicable to Push Notifications / Background Modes)build.gradle / build.gradle.kts
includes required SDK dependenciesAndroidManifest.xml contains required permissions,
services/receivers (as required by the SDK)google-services.json exists in the
expected module directory (commonly app/)package.json includes the Clix packageios/Podfile.lock updated after pod install (when required)pubspec.yaml includes the required packages and
pubspec.lock is updated after flutter pub getios/Podfile.lock updated after pod install (when required)runAppStep 5.3: Documentation
Create or update documentation:
.env.example if it existsInitialization Pattern:
import Clix
@main
struct MyApp: App {
init() {
// Load credentials from your app configuration (do NOT hardcode).
// Example: store values in Info.plist keys.
let projectId = Bundle.main.object(forInfoDictionaryKey: "CLIX_PROJECT_ID") as? String ?? ""
let apiKey = Bundle.main.object(forInfoDictionaryKey: "CLIX_PUBLIC_API_KEY") as? String
let config = ClixConfig(projectId: projectId, apiKey: apiKey)
Clix.initialize(config: config)
}
}
Key Points:
@main app struct or AppDelegateInitialization Pattern:
import so.clix.core.Clix
import so.clix.core.ClixConfig
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
// Load credentials from BuildConfig (do NOT hardcode).
val config = ClixConfig.Builder()
.projectId(BuildConfig.CLIX_PROJECT_ID)
.apiKey(BuildConfig.CLIX_PUBLIC_API_KEY)
.build()
Clix.initialize(this, config)
}
}
Key Points:
Application.onCreate()Application context, not Activity contextAndroidManifest.xmlInitialization Pattern:
import { Clix } from "@clix-so/react-native-sdk";
import Config from "react-native-config";
// In App.tsx or index.js
Clix.initialize({
projectId: Config.CLIX_PROJECT_ID || "",
apiKey: Config.CLIX_PUBLIC_API_KEY,
});
Key Points:
react-native-config (or similar) for environment variablesInitialization Pattern:
import 'package:clix_flutter/clix_flutter.dart';
Future<void> main() async {
// Load credentials from build-time configuration (do NOT hardcode).
// Example:
// flutter run --dart-define=CLIX_PROJECT_ID=... --dart-define=CLIX_PUBLIC_API_KEY=...
const projectId = String.fromEnvironment('CLIX_PROJECT_ID');
const apiKey = String.fromEnvironment('CLIX_PUBLIC_API_KEY');
await Clix.initialize(
ClixConfig(
projectId: projectId,
apiKey: apiKey,
),
);
runApp(const MyApp());
}
Key Points:
runApp--dart-define (or your chosen secret mechanism), never hardcodeCommon Issues:
Missing Credentials
.env file exists and contains required variablesWrong Initialization Location
Environment Variables Not Loading
undefined or empty values.env to .gitignore, commit .env.examplesearch_sdk results as the source of truth
for initialization/API usage.examples/ + references/ for code patterns.Official quickstarts:
https://docs.clix.so/sdk-quickstart-ioshttps://docs.clix.so/sdk-quickstart-androidhttps://docs.clix.so/sdk-quickstart-react-nativehttps://docs.clix.so/sdk-quickstart-flutterreferences/ directory (loaded when needed for specific topics)examples/ directory (loaded when framework-specific examples
needed)scripts/ directory (executed directly, not loaded into context)For detailed information, see:
references/sdk-reference.md - Complete SDK API documentationreferences/framework-patterns.md - Framework-specific integration patternsreferences/error-handling.md - Common errors and troubleshootingreferences/mcp-integration.md - Optional: MCP server usage guide (for
tool-augmented mode)Working code examples available in examples/ directory:
ios-integration.swift - iOS integration (UIKit/SwiftUI)android-integration.kt - Android integration (Application)flutter-integration.dart - Flutter integration (main.dart)react-native-integration.tsx - React Native integration (App.tsx)Utility scripts available in scripts/ directory:
validate-sdk.sh - Validate SDK installation and initialization (bash,
deterministic)Run scripts with --help first to see usage. Do not read source code unless
customization is absolutely necessary.