SkillAgentSearch skills...

Skills

Claude Skills for integrating and working with the Play.fun ecosystem

Install / Use

/learn @playdotfun/Skills
About this skill

Quality Score

0/100

Supported Platforms

Claude Code
Claude Desktop

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

View on GitHub
GitHub Stars2
CategoryDevelopment
Updated7d ago
Forks0

Languages

JavaScript

Security Score

70/100

Audited on Mar 23, 2026

No findings