integration
Use this skill when working with Playgama Bridge SDK for HTML5 games. Activates for game development involving cross-platform publishing, advertisements, in-app purchases, leaderboards, or social features using Playgama Bridge.
What this skill does
# Playgama Bridge SDK Integration
Playgama Bridge is a cross-platform SDK for publishing HTML5 games across 20+ platforms including Playgama, YouTube, Yandex Games, Crazy Games, Poki, Facebook, Telegram, Xiaomi, and more.
## Installation
Add the SDK script to the HTML `<head>`:
```html
<script src="https://bridge.playgama.com/v1/stable/playgama-bridge.js"></script>
```
CDN options:
- `https://bridge.playgama.com/v1/stable/playgama-bridge.js` - Recommended (latest v1.x.x)
- `https://bridge.playgama.com/latest/playgama-bridge.js` - Bleeding edge
- `https://bridge.playgama.com/v1.27.0/playgama-bridge.js` - Specific version
## Initialization
```javascript
bridge.initialize()
.then(() => {
// SDK ready
})
.catch(error => {
// Handle error
})
```
After game is fully loaded and ready for player interaction:
```javascript
bridge.platform.sendMessage('game_ready')
```
## Device
```javascript
// Device type
bridge.device.type // 'mobile', 'tablet', 'desktop', 'tv'
```
## Platform Detection
```javascript
// Platform ID
bridge.platform.id
// Values: 'playgama', 'facebook', 'crazy_games', 'mock', etc.
// User language (ISO 639-1)
bridge.platform.language // 'en', 'ru', etc.
// Top-level domain
bridge.platform.tld // 'com', 'ru', null
// URL payload
bridge.platform.payload
// Server time (UTC milliseconds)
bridge.platform.getServerTime().then(result => console.log(result))
```
## Platform Messages
```javascript
bridge.platform.sendMessage('in_game_loading_started')
bridge.platform.sendMessage('in_game_loading_stopped')
bridge.platform.sendMessage('gameplay_started')
bridge.platform.sendMessage('gameplay_stopped')
bridge.platform.sendMessage('player_got_achievement')
```
## Player
```javascript
// Player ID (null if not authorized)
bridge.player.id
// Player name (null if unavailable)
bridge.player.name
// Player photos (array sorted by increasing resolution)
bridge.player.photos
// Platform-specific player data for verification
bridge.player.extra
```
## Authorization
```javascript
// Check if authorization is supported
bridge.player.isAuthorizationSupported
// Check if player is authorized
bridge.player.isAuthorized
// Authorize player
let options = {}
bridge.player.authorize(options)
.then(() => {
// Player successfully authorized
})
.catch(error => {
// Authorization failed or cancelled
})
```
## Audio & Pause State
```javascript
// Audio state
bridge.platform.isAudioEnabled
bridge.platform.on(bridge.EVENT_NAME.AUDIO_STATE_CHANGED, isEnabled => {
// Mute/unmute game audio
})
// Pause state
bridge.platform.on(bridge.EVENT_NAME.PAUSE_STATE_CHANGED, isPaused => {
// Pause/resume game
})
```
## Storage
```javascript
// Get single value
bridge.storage.get('key')
.then(data => console.log(data))
// Get multiple values
bridge.storage.get(['key1', 'key2'])
.then(data => console.log(data))
// Set single value
bridge.storage.set('key', 'value')
.then(() => { /* saved */ })
// Set multiple values
bridge.storage.set(['key1', 'key2'], ['value1', 'value2'])
.then(() => { /* saved */ })
// Delete
bridge.storage.delete('key')
bridge.storage.delete(['key1', 'key2'])
```
## Banner Ads
```javascript
// Check support
bridge.advertisement.isBannerSupported
// Show banner
let position = 'bottom' // 'top' or 'bottom'
let placement = 'menu' // optional
bridge.advertisement.showBanner(position, placement)
// Hide banner
bridge.advertisement.hideBanner()
// Banner state
bridge.advertisement.bannerState // 'loading', 'shown', 'hidden', 'failed'
bridge.advertisement.on(bridge.EVENT_NAME.BANNER_STATE_CHANGED, state => {
console.log('Banner state:', state)
})
```
## Interstitial Ads
```javascript
// Check support
bridge.advertisement.isInterstitialSupported
// Show interstitial
let placement = 'level_complete' // optional
bridge.advertisement.showInterstitial(placement)
// Minimum delay between interstitials (default: 60 seconds)
bridge.advertisement.minimumDelayBetweenInterstitial
bridge.advertisement.setMinimumDelayBetweenInterstitial(30)
// State tracking
bridge.advertisement.interstitialState // 'loading', 'opened', 'closed', 'failed'
bridge.advertisement.on(bridge.EVENT_NAME.INTERSTITIAL_STATE_CHANGED, state => {
if (state === 'opened') {
// Your logic
} else if (state === 'closed' || state === 'failed') {
// Your logic
}
})
```
## Rewarded Ads
```javascript
// Check support
bridge.advertisement.isRewardedSupported
// Show rewarded ad
let placement = 'double_coins' // optional
bridge.advertisement.showRewarded(placement)
// State tracking
bridge.advertisement.rewardedState
// States: 'loading', 'opened', 'closed', 'rewarded', 'failed'
bridge.advertisement.on(bridge.EVENT_NAME.REWARDED_STATE_CHANGED, state => {
if (state === 'opened') {
// Your logic
} else if (state === 'rewarded') {
// Grant reward to player
} else if (state === 'closed' || state === 'failed') {
// Your logic
}
})
// Current placement
bridge.advertisement.rewardedPlacement
```
## In-App Purchases
```javascript
// Check support
bridge.payments.isSupported
// Get catalog
bridge.payments.getCatalog()
.then(items => {
items.forEach(item => {
console.log('ID:', item.id)
console.log('Price:', item.price)
console.log('Currency:', item.priceCurrencyCode)
console.log('Value:', item.priceValue)
})
})
// Purchase
bridge.payments.purchase('product_id')
.then(purchase => console.log('Purchased:', purchase.id))
.catch(error => { /* cancelled or failed */ })
// Consume purchase (for consumable items)
bridge.payments.consumePurchase('product_id')
.then(purchase => console.log('Consumed:', purchase.id))
// Get purchased items
bridge.payments.getPurchases()
.then(purchases => {
purchases.forEach(p => console.log('Owned:', p.id))
})
```
Config example (playgama-bridge-config.json):
```json
{
"payments": [
{
"id": "coins_100",
"playgama": { "amount": 1 },
"playdeck": { "amount": 1, "description": "100 Coins" }
}
]
}
```
## Leaderboards
```javascript
// Check type
bridge.leaderboards.type
// 'not_available', 'in_game', 'native', 'native_popup'
// Set score
bridge.leaderboards.setScore('leaderboard_id', 1000)
.then(() => { /* saved */ })
// Get entries (only when type = 'in_game')
bridge.leaderboards.getEntries('leaderboard_id')
.then(entries => {
entries.forEach(entry => {
console.log('Name:', entry.name)
console.log('Score:', entry.score)
console.log('Rank:', entry.rank)
console.log('Photo:', entry.photo)
})
})
// Show native popup (only when type = 'native_popup')
bridge.leaderboards.showNativePopup('leaderboard_id')
```
Config example:
```json
{
"leaderboards": [
{
"id": "high_score"
}
]
}
```
## Social Features
### Share
```javascript
bridge.social.isShareSupported
let options = {}
switch (bridge.platform.id) {
case 'vk':
options = { link: 'https://...' }
break
case 'facebook':
options = { image: 'base64...', text: 'Check this game!' }
break
}
bridge.social.share(options)
```
### Invite Friends
```javascript
bridge.social.isInviteFriendsSupported
bridge.social.inviteFriends({ text: 'Join me!' })
```
### Join Community
```javascript
bridge.social.isJoinCommunitySupported
let options = {}
switch (bridge.platform.id) {
case 'vk':
case 'ok':
options = { groupId: 123456 }
break
}
bridge.social.joinCommunity(options)
```
### Other Social Methods
```javascript
// Add to favorites
bridge.social.isAddToFavoritesSupported
bridge.social.addToFavorites()
// Rate game
bridge.social.isRateSupported
bridge.social.rate()
// Add to home screen
bridge.social.isAddToHomeScreenSupported
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.