sub.games

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/skills

After 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 game

Or be more specific:

Integrate sub.games tier-gating into this Phaser game

The agent will typically:

  1. Detect your game — identifies the entry point, build system, and framework
  2. Ask what to gate — helps decide which features belong in Free, Supporter, and Founder tiers
  3. Install the SDK — adds @subgames/sdk or uses the browser bundle when needed
  4. Initialize the SDK — configures SubGamesSDK.init() with your game key and overlay
  5. Add tier gates — inserts requireTier() at the right feature boundaries
  6. Wire pause and unpause — connects subscribe and login modals to your game loop
  7. 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:

FrameworkPause Mechanism
Phaserscene.pause() / scene.resume()
Three.jsSet a paused flag in the animation loop
Pixi.jsapp.ticker.stop() / app.ticker.start()
Vanilla CanvascancelAnimationFrame() / requestAnimationFrame()
CustomReuse existing pause menu or loop control if found

Quick Start Example

After installing the skills, tell your agent:

Add sub.games subscriptions to my game

Typical 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:

MarkerTierCost
(none)PublicFree, no account
One sparkleFreeEmail signup
Two sparklesSupporter$3-8/month
Three sparklesFounder$150/year

Repository

The public skills package lives here:

https://github.com/subdotgames/skills

Manual Integration

If you prefer to integrate manually without AI skills, see:

On this page