Skills
Claude Skills for integrating and working with the Play.fun ecosystem
Install / Use
/learn @playdotfun/SkillsQuality Score
Category
Development & EngineeringSupported Platforms
README
Play.fun Skills for AI Coding Agents
Best practices, references, and templates for integrating games with the Play.fun ecosystem.
What is Play.fun?
Play.fun is a platform for integrating games with Web3 rewards. Games can register on Play.fun, track player points, and launch Playcoins (game-specific Solana tokens) that reward players based on their gameplay.
Installation
npx skills add playdotfun/skills
Skill Contents
| Topic | Description | |-------|-------------| | API Reference | Complete API endpoint reference | | API Authentication | HMAC-SHA256 authentication guide | | Server SDK | Server SDK reference (recommended for production) | | Browser SDK | Browser SDK reference (for prototypes) | | Hybrid SDK | Combined Server + Browser approach | | SDK Best Practices | Security, validation, and SDK selection | | MCP Quickstart | MCP server setup for AI assistants | | Glossary | Play.fun terminology and concepts |
Deployment
| Guide | Description | |-------|-------------| | GitHub Pages Deploy | Deploy games to GitHub Pages for free hosting |
Code Snippets
| Snippet | Description | |---------|-------------| | Server SDK Snippets | Express.js, Next.js, session validation examples | | Browser SDK Snippets | Vanilla JS, React, Phaser 3 examples |
SDK Selection Guide
| Scenario | Recommended SDK | |----------|-----------------| | Production game with token rewards | Server SDK | | Games where cheating prevention matters | Server SDK | | Security + Play.fun widget | Hybrid (Server + Browser) | | Quick prototype / demo | Browser SDK | | Game jam entry | Browser SDK |
Quick Start
Server SDK (Recommended)
import { OpenGameClient } from '@playdotfun/server-sdk';
const client = new OpenGameClient({
apiKey: process.env.OGP_API_KEY!,
secretKey: process.env.OGP_API_SECRET_KEY!,
});
await client.play.savePoints({
gameId: 'your-game-uuid',
playerId: 'player-123',
points: 100,
});
Browser SDK (Prototypes)
<meta name="x-ogp-key" content="YOUR_API_KEY" />
<script src="https://sdk.play.fun"></script>
<script>
let sdk = null;
let sdkReady = false;
if (typeof OpenGameSDK !== 'undefined') {
sdk = new OpenGameSDK({
ui: { usePointsWidget: true },
logLevel: 1,
});
sdk.on('OnReady', () => {
sdkReady = true;
});
sdk.on('SavePointsSuccess', () => console.log('Saved!'));
sdk.on('SavePointsFailed', () => console.log('Failed'));
sdk.init({ gameId: 'your-game-uuid' });
}
// During gameplay:
// if (sdk && sdkReady) sdk.addPoints(10);
//
// At game over:
// if (sdk && sdkReady) sdk.savePoints(totalScore);
</script>
Resources
License
MIT
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
