This skill should be used when the user asks about "nativephp api", "camera api", "device api", "biometrics", "geolocation", "scanner api", "microphone api", "nativephp_call", "god method", "bridge function", "SecureStorage", "Dialog api", "Share api", "PushNotifications api", "Network status", "Browser api", "Haptics", "File api", or needs to use any NativePHP native functionality in their app.
/plugin marketplace add NativePHP/ClaudePlugins/plugin install nativephp-mobile@nativephp-mobile-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill provides guidance for using NativePHP's native APIs to access device features like camera, biometrics, geolocation, and more.
NativePHP provides PHP Facades that wrap native device functionality. All APIs are accessible via Native\Mobile\Facades\* namespace. Most async operations use a fluent "Pending*" builder pattern.
| Facade | Purpose |
|---|---|
Camera | Photos, videos, gallery picker |
Device | Device ID, info, battery, vibration, flashlight |
Dialog | Native alerts and toasts |
Scanner | QR code and barcode scanning |
Biometrics | Face ID, Touch ID, fingerprint |
Geolocation | GPS location and permissions |
Microphone | Audio recording |
Network | Network status |
Browser | Open URLs in browser or in-app |
Share | Native share sheet |
SecureStorage | Keychain/Keystore secure storage |
File | Move and copy files |
PushNotifications | Push notification enrollment |
System | Platform detection, app settings |
Haptics | Haptic feedback (deprecated, use Device) |
Async operations return Pending* objects for configuration:
use Native\Mobile\Facades\Camera;
Camera::getPhoto()
->id('profile-photo') // Track this request
->event(MyPhotoEvent::class) // Custom event class
->remember() // Store ID in session
->start(); // Execute (or auto-executes on destruct)
Common fluent methods:
id(string $id) - Unique identifier for trackingevent(string $class) - Custom event class for responseremember() - Flash ID to session for retrievallastId() - Get last remembered ID from sessionuse Native\Mobile\Facades\Camera;
// Take photo
Camera::getPhoto()->id('avatar')->start();
// Record video with max duration
Camera::recordVideo()->maxDuration(30)->start();
// Pick from gallery
Camera::pickImages()
->images() // Only images (or ->videos(), ->all())
->multiple(true, 5) // Allow up to 5 selections
->start();
Events: PhotoTaken, PhotoCancelled, VideoRecorded, VideoCancelled, MediaSelected
use Native\Mobile\Facades\Device;
$deviceId = Device::getId();
$info = Device::getInfo(); // Returns JSON with platform, model, etc.
$battery = Device::getBatteryInfo();
Device::vibrate();
Device::flashlight(); // Toggle flashlight
use Native\Mobile\Facades\Dialog;
// Alert with buttons
Dialog::alert('Title', 'Message', ['OK', 'Cancel'])
->id('confirm-delete')
->show();
// Toast notification
Dialog::toast('Operation complete', 'long'); // 'short' or 'long'
Events: ButtonPressed with index and label properties
use Native\Mobile\Facades\Scanner;
Scanner::scan()
->prompt('Scan product barcode')
->formats(['qr', 'ean13', 'code128']) // or 'all'
->continuous(true) // Keep scanning
->id('product-scan')
->scan();
Supported formats: qr, ean13, ean8, code128, code39, upca, upce, all
Events: CodeScanned with data and format properties
use Native\Mobile\Facades\Biometrics;
Biometrics::prompt()
->id('auth-check')
->prompt();
Events: Completed with success boolean
use Native\Mobile\Facades\Geolocation;
// Get current position
Geolocation::getCurrentPosition()
->fineAccuracy(true) // GPS-level accuracy
->id('location')
->get();
// Check permissions
Geolocation::checkPermissions()->get();
// Request permissions
Geolocation::requestPermissions()->get();
Events: LocationReceived, PermissionStatusReceived, PermissionRequestResult
use Native\Mobile\Facades\Microphone;
// Start recording
Microphone::record()->id('voice-note')->start();
// Control recording
Microphone::pause();
Microphone::resume();
Microphone::stop();
// Get status and recording
$status = Microphone::getStatus(); // 'idle', 'recording', 'paused'
$path = Microphone::getRecording(); // Path to last recording
Events: MicrophoneRecorded, MicrophoneCancelled
use Native\Mobile\Facades\Network;
$status = Network::status();
// Returns: { connected, type, isExpensive, isConstrained }
use Native\Mobile\Facades\Browser;
Browser::open('https://example.com'); // Default browser
Browser::inApp('https://example.com'); // In-app browser
Browser::auth('https://oauth.example.com'); // Auth session
use Native\Mobile\Facades\Share;
Share::url('Check this out', 'Description', 'https://example.com');
Share::file('Document', 'Here is the file', '/path/to/file.pdf');
SecureStorage is a synchronous API that stores data in the native keychain (iOS) or keystore (Android). It can be used directly in Blade templates and conditionals.
use Native\Mobile\Facades\SecureStorage;
// Store in native keychain/keystore
SecureStorage::set('api_token', $token);
$token = SecureStorage::get('api_token');
SecureStorage::delete('api_token');
Because SecureStorage is synchronous, you can use it directly in Blade conditionals:
@if(SecureStorage::get('api_token'))
{{-- User is authenticated --}}
<x-dashboard />
@else
{{-- Show login --}}
<x-login-form />
@endif
This is particularly useful for auth-gated content without needing to pass auth state through controllers.
use Native\Mobile\Facades\PushNotifications;
// Request permission and enroll
PushNotifications::enroll()->id('main')->enroll();
// Get token (APNS on iOS, FCM on Android)
$token = PushNotifications::getToken();
Events: TokenGenerated with token property
use Native\Mobile\Facades\System;
if (System::isMobile()) { /* running on device */ }
if (System::isIos()) { /* iOS specific */ }
if (System::isAndroid()) { /* Android specific */ }
System::appSettings(); // Open native app settings
use Native\Mobile\Facades\File;
File::move('/from/path', '/to/path');
File::copy('/from/path', '/to/path');
For advanced usage, call bridge functions directly:
$result = nativephp_call('Camera.GetPhoto', json_encode(['id' => 'test']));
Bridge function names follow Category.Action pattern:
Camera.GetPhoto, Camera.RecordVideo, Camera.PickMediaDevice.GetId, Device.GetInfo, Device.VibrateDialog.Alert, Dialog.ToastQrCode.ScanBiometric.PromptGeolocation.GetCurrentPosition, Geolocation.CheckPermissionsNetwork.StatusBrowser.Open, Browser.OpenInApp, Browser.OpenAuthMicrophone.Start, Microphone.Stop, Microphone.Pause, Microphone.ResumeSecureStorage.Set, SecureStorage.Get, SecureStorage.DeleteShare.Url, Share.FileSystem.OpenAppSettingsPushNotification.RequestPermission, PushNotification.GetTokenEnable required permissions in config/nativephp.php:
'permissions' => [
'camera' => true,
'microphone' => true,
'biometric' => true,
'location' => true,
'push_notifications' => true,
'scanner' => true,
// etc.
],
For detailed API documentation, fetch from:
https://nativephp.com/docs/mobile/2/apis/overviewhttps://nativephp.com/docs/mobile/2/apis/camerahttps://nativephp.com/docs/mobile/2/apis/biometricshttps://nativephp.com/docs/mobile/2/apis/geolocationhttps://nativephp.com/docs/mobile/2/apis/scannerhttps://nativephp.com/docs/mobile/2/apis/push-notificationsUse WebFetch for the most current API details.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.