AI Skills
Install the sub.games skills for most coding agents and integrate the SDK into any game with a single prompt.
The sub.games skills package gives AI coding agents a guided integration workflow for @subgames/sdk. It works across most agents that support the shared skills install flow, and walks through SDK setup, tier-gating, pause and unpause wiring, validation, deployment, and registration.
Installation
Install the skills package:
npx skills add subdotgames/skillsAfter installation, ask your agent to add sub.games subscriptions to your game.
What You Get
The package includes:
- sub.games SDK Integration — adds
@subgames/sdk, wires pause and unpause handling, and inserts tier gates - Deploy & Register — helps deploy your game and register it on sub.games
- Validation scripts — checks that the SDK, init call, pause handlers, and tier gates were added correctly
- Reference material — SDK API docs and framework-specific integration patterns
Usage
In your game project, tell your agent something like:
Add sub.games subscriptions to my gameOr be more specific:
Integrate sub.games tier-gating into this Phaser gameThe agent will typically:
- Detect your game — identifies the entry point, build system, and framework
- Ask what to gate — helps decide which features belong in Free, Supporter, and Founder tiers
- Install the SDK — adds
@subgames/sdkor uses the browser bundle when needed - Initialize the SDK — configures
SubGamesSDK.init()with your game key and overlay - Add tier gates — inserts
requireTier()at the right feature boundaries - Wire pause and unpause — connects subscribe and login modals to your game loop
- Validate the integration — checks the finished integration for missing pieces
Install Methods
The skills can guide either install path:
- npm using
@subgames/sdk - CDN using
https://sdk.sub.games/sdk.js
Supported Agents
The npx skills add subdotgames/skills flow works for most coding agents that support shared skills. Claude Code is supported, but this package is not Claude-specific anymore.
Supported Frameworks
The integration flow adapts to your game framework:
| Framework | Pause Mechanism |
|---|---|
| Phaser | scene.pause() / scene.resume() |
| Three.js | Set a paused flag in the animation loop |
| Pixi.js | app.ticker.stop() / app.ticker.start() |
| Vanilla Canvas | cancelAnimationFrame() / requestAnimationFrame() |
| Custom | Reuse existing pause menu or loop control if found |
Quick Start Example
After installing the skills, tell your agent:
Add sub.games subscriptions to my gameTypical result:
- Subscribe prompts that auto-trigger after 30 seconds for non-subscribers
- Feature gates with automatic subscribe modals
- Pause and unpause handling so the game freezes when modals are open
- Social overlay with like, comment, share, and subscribe buttons
Tier-Gating Convention
The integration flow uses the sparkle convention from sub.games:
| Marker | Tier | Cost |
|---|---|---|
| (none) | Public | Free, no account |
| One sparkle | Free | Email signup |
| Two sparkles | Supporter | $3-8/month |
| Three sparkles | Founder | $150/year |
Repository
The public skills package lives here:
https://github.com/subdotgames/skillsManual Integration
If you prefer to integrate manually without AI skills, see:
- Browser SDK — full API reference
- React SDK — React bindings
- Server SDK — server-side verification
- Events Reference — event system details